Skip to content
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

Cloud code broken in 2.2.7 #1579

Closed
antonfire opened this issue Apr 21, 2016 · 9 comments
Closed

Cloud code broken in 2.2.7 #1579

antonfire opened this issue Apr 21, 2016 · 9 comments

Comments

@antonfire
Copy link

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

elastic beanstalk
mongodb
parse server 2.2.7

Steps to reproduce

I was running 2.1.6 and just upgraded to 2.2.7, on 2.1.6 everything was running fine. In cloud code I was retrieving the user Facebook id as follows:

var FBid = request.user.attributes.authData.facebook.id;

Looking at logs it reports that request.user.attributes.authData is undefined.

What has changed?

Thanks

Logs/Trace

See above

@antonfire
Copy link
Author

It seems that this issue was resolved in #755, but I am experiencing the same problems, have these commits not hit 2.2.7?

@steven-supersolid
Copy link
Contributor

Please see #1568
This has been fixed and merged so will be in the next release

@antonfire
Copy link
Author

@steven-supersolid Ok great thanks.

@miracle7
Copy link

@steven-supersolid So for now we continue using 2.2.6 and then jump straight to 2.2.8 when it comes out?

@drew-gross
Copy link
Contributor

Closing as fixed. Please wait for version 2.2.8 if you are seeing this issue.

@steven-supersolid
Copy link
Contributor

2.2.6 has a bug with non-expiring session tokens but if your session tokens don't expire then should be safe to keep using it.

Can see other changes here in case there were any other bugs fixed that might affect you:
2.2.6...2.2.7

If you need a bit more flexibility then you could fork parse-server and choose which commit to work from, then use a git dependency in your package.json to your own repo. You can even then merge your own PR while waiting for PR to be approved in the main repo.

@antonfire
Copy link
Author

@drew-gross It seems this wasn't fixed in 2.2.8. Was this fix accidentally omitted?

@antonfire
Copy link
Author

@steven-supersolid This fix has not been applied, any idea what's happening with it?

@steven-supersolid
Copy link
Contributor

There was a bug with authData being removed from any _User query, and that was fixed. However, I see that you are missing info on request.user.

We noticed when moving from Parse.com to parse-server that request.user was missing attributes so changed our cloud code to always query/fetch the user when we require attributes. Really this should be fixed to be the same as Parse.com.

I suggest opening a new issue for this, especially if you have some code or a test that worked in an earlier version of parse-server. I thought I saw a related issue some time ago but can't find it so a new issue would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants