-
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
patch doesn't throw correct object #110
Comments
this is already reported as a bug in feathers-authentication library 2 solutions were suggested but these doesn't solve the real problem |
Thanks for the report @madmantalking! Fix incoming 😄 |
@ekryski I am still able to reproduce the same error, and again am being able to solve it by changing line 215 in src/service.js return this.Model
.update(query, data._doc, options) the problem is still with toObject() i guess. |
@ekryski To reproduce this bug i simply did, Now when i first access /auth/facebook , i get a token successfully , (this is the create method)
Hope this helps! |
@madmantalking what is your feathers-mongoose version with the generated app? |
it is 3.5.2 |
{
"dependencies": {
"body-parser": "^1.15.2",
"compression": "^1.6.2",
"cors": "^2.8.0",
"feathers": "^2.0.1",
"feathers-authentication": "^0.7.9",
"feathers-configuration": "^0.2.3",
"feathers-errors": "^2.4.0",
"feathers-hooks": "^1.5.7",
"feathers-mongoose": "^3.5.2",
"feathers-rest": "^1.4.4",
"feathers-socketio": "^1.4.1",
"mongoose": "^4.5.10",
"passport": "^0.3.2",
"passport-facebook": "^2.1.1",
"passport-facebook-token": "^3.3.0",
"serve-favicon": "^2.3.0",
"winston": "^2.2.0"
},
"devDependencies": {
"jshint": "^2.9.3",
"mocha": "^3.0.2",
"request": "^2.74.0"
}
} |
Same thing happening here, feathers-mongoose version 3.5.2 |
How is this reproducible? https://github.com/feathersjs/feathers-mongoose/pull/112/files#diff-0fd0e07cf6d02bf7cf00f18cebb8e6eaR152 is the tests for the original fix. |
See @madmantalking comment above. Steps to reproduce the error are there. |
Any news on this ? |
I also encountered this issue with Thanks @madmantalking for the fix above - would be great to see a general fix soon! 👍 |
I'll try to take look this evening or tomorrow as part of the auth updates I am doing. |
How it goes? same bug for me |
I've had this issue as well for a bit now. I tried following @madmantalking's advice but: As I'm just playing around with the framework right now I found a not so bad approach to at least continue testing it. In the generated code file src/services/user/index.js I added
I'm not even sure what the lean option does but at least I can play around with featherjs more now! Maybe that will help someone play around as well until a fix comes out. |
The lean option does not convert the data into a Mongoose model. A lot of issues (especially related to performance) seem to be fixed by setting this option. It makes it effectively the same as the plain MongoDB adapter with some validation. I'm not entirely sure why that makes a difference since |
@daffl hmm. I thought it changed the model as well but good to know. Maybe we should make it a default option then?? |
@ekryski @daffl I also didn't know well about how mongoose works (I still don't know , Db is my weakest tool) , but if lean gives us performance and also solves core issues , then i think it should be part of cli tool (as it would help beginers like me). |
Closing in favour of tracking in #132. |
Using auth for facebook generated by feathers cli, patch function fails , the issue is with the data parameter in service.js on line 164.
For more verbose explanation
The text was updated successfully, but these errors were encountered: