-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cast to ObjectId failed for value _id #156
Comments
@tobkle can you post some code or a link to a repo? |
That would definitely be helpful. It's probably something with the setup (or your MongoDB version), I ran the example and it looks like it is working. |
It was the code of this repository, I've just started the example of this repo. So no other code involved. But after some hours I switched my node version with nvm to node 6.9.0, did a fresh git clone of the repo, restarted iterm2, chrome and notebook and suddenly it worked. So it must have been the node version. So I suppose I close it, as it is working now. Sorry to bother you. |
Glad you got it worked out. |
Steps to reproduce
I tested now a lot of boilerplates including featherjs-mongoose. But with all examples I get the same error everytime I want to call a record by its _id:
Also with the example in this repository in folder example with the message service. As soon as I call
GET http://localhost:3030/messages/586cef705308f8134b12b7ef
I get this error: "Cast to ObjectId failed for value _id"
Tried also to cast it in the hook, but the error comes before the hook is processed.
node 5.6.0
"apollo-server": "^0.2.4",
"body-parser": "^1.15.0",
"compression": "^1.6.1",
"cors": "^2.7.1",
"feathers": "^2.0.1",
"feathers-authentication": "^0.7.9",
"feathers-configuration": "^0.2.3",
"feathers-errors": "^2.1.0",
"feathers-hooks": "^1.5.2",
"feathers-memory": "^0.6.3",
"feathers-mongoose": "^3.4.1",
"feathers-rest": "^1.3.0",
"feathers-socketio": "^1.4.0",
"graphql": "^0.6.1",
"graphql-tools": "^0.6.4",
"mongoose": "^4.5.3",
"passport": "^0.3.2",
"request": "^2.74.0",
"request-promise": "^4.1.1",
"serve-favicon": "^2.3.0",
"winston": "^2.2.0"
The text was updated successfully, but these errors were encountered: