{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1846","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1846/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1846/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1846/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/1846","id":155938793,"number":1846,"title":"Cloud code unable to reference Facebook auth data","user":{"login":"antonfire","id":5494230,"avatar_url":"https://avatars.githubusercontent.com/u/5494230?v=3","gravatar_id":"","url":"https://api.github.com/users/antonfire","html_url":"https://github.com/antonfire","followers_url":"https://api.github.com/users/antonfire/followers","following_url":"https://api.github.com/users/antonfire/following{/other_user}","gists_url":"https://api.github.com/users/antonfire/gists{/gist_id}","starred_url":"https://api.github.com/users/antonfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonfire/subscriptions","organizations_url":"https://api.github.com/users/antonfire/orgs","repos_url":"https://api.github.com/users/antonfire/repos","events_url":"https://api.github.com/users/antonfire/events{/privacy}","received_events_url":"https://api.github.com/users/antonfire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-20T11:03:02Z","updated_at":"2016-05-20T15:16:09Z","closed_at":null,"body":"Check out https://github.com/ParsePlatform/parse-server/issues/1271 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!\r\n\r\nMany members of the community use Stack Overflow and Server Fault to ask questions. Read through the existing questions or ask your own!\r\n\r\n- Stack Overflow: http://stackoverflow.com/questions/tagged/parse.com \r\n- Server Fault: https://serverfault.com/tags/parse\r\n\r\nFor database migration help, please file a bug report at https://parse.com/help#report\r\n\r\nMake sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!\r\n\r\n- [ y] You've met the prerequisites: https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#prerequisites.\r\n\r\n- [ y] You're running the latest version of Parse Server: https://github.com/ParsePlatform/parse-server/releases\r\n\r\n- [ y] You've searched through existing issues: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue Chances are that your issue has been reported or resolved before.\r\n\r\n#### Environment Setup\r\n\r\n- Server: 2.2.10, node running on ASW Elastic Beanstalk\r\n- Database: Mlab\r\n\r\n#### Steps to reproduce\r\n\r\nWhen running cloud code in parse server 2.1.6 everything works fine, upon upgrade to 2.2.10 when referencing the Facebook user id held in authdata I get an authdata undefined error. I had similar issues when I attempted to upgrade to 2.2.7, see > https://github.com/ParsePlatform/parse-server/issues/1579. \r\n\r\nI am referencing authdata in the cloud function as follows:\r\n\r\n`var currentUserFacebookID = request.user.attributes.authData.facebook.id;`\r\n\r\nAs noted above this works in v2.1.6.\r\n\r\n#### Logs/Trace\r\n\r\nElastic beanstalk logs this as:\r\n\r\n[31merror\u001B[39m: Uncaught internal server error. [TypeError: Cannot read property 'facebook' of undefined] TypeError: Cannot read property 'facebook' of undefined\r\n    at /var/app/current/cloud/main.js:1149:74\r\n"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/220634264","html_url":"https://github.com/ParsePlatform/parse-server/issues/1846#issuecomment-220634264","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1846","id":220634264,"user":{"login":"steven-supersolid","id":5364685,"avatar_url":"https://avatars.githubusercontent.com/u/5364685?v=3","gravatar_id":"","url":"https://api.github.com/users/steven-supersolid","html_url":"https://github.com/steven-supersolid","followers_url":"https://api.github.com/users/steven-supersolid/followers","following_url":"https://api.github.com/users/steven-supersolid/following{/other_user}","gists_url":"https://api.github.com/users/steven-supersolid/gists{/gist_id}","starred_url":"https://api.github.com/users/steven-supersolid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven-supersolid/subscriptions","organizations_url":"https://api.github.com/users/steven-supersolid/orgs","repos_url":"https://api.github.com/users/steven-supersolid/repos","events_url":"https://api.github.com/users/steven-supersolid/events{/privacy}","received_events_url":"https://api.github.com/users/steven-supersolid/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T15:16:09Z","updated_at":"2016-05-20T15:16:09Z","body":"Does this work in 2.2.8?\r\nThe bug in 2.2.7 was that a queried for user would not contain authData.\r\nYour issue may be that request.user does not contain the attributes. There are a number of tickets about this, with some feedback in #1836\r\n\r\nIf it is the latter then one workaround is to do a fetch/query on request.user"}}
{"actor":{"display_login":"steven-supersolid"}}