{"action":"opened","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/3003","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/3003/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/3003/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/3003/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/3003","id":187086525,"number":3003,"title":"Cloud code returning undefined sessionToken for user.getSessionToken();","user":{"login":"gopal-aressindia","id":17723611,"avatar_url":"https://avatars.githubusercontent.com/u/17723611?v=3","gravatar_id":"","url":"https://api.github.com/users/gopal-aressindia","html_url":"https://github.com/gopal-aressindia","followers_url":"https://api.github.com/users/gopal-aressindia/followers","following_url":"https://api.github.com/users/gopal-aressindia/following{/other_user}","gists_url":"https://api.github.com/users/gopal-aressindia/gists{/gist_id}","starred_url":"https://api.github.com/users/gopal-aressindia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gopal-aressindia/subscriptions","organizations_url":"https://api.github.com/users/gopal-aressindia/orgs","repos_url":"https://api.github.com/users/gopal-aressindia/repos","events_url":"https://api.github.com/users/gopal-aressindia/events{/privacy}","received_events_url":"https://api.github.com/users/gopal-aressindia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T15:07:14Z","updated_at":"2016-11-03T15:07:14Z","closed_at":null,"body":" I have implemented google+ login with Parse.com by the Cloud code  with the reference of https://groups.google.com/forum/#!topic/parse-developers/UUvTreGYOrI. Now our Parse app (Parse-server) is migrated to Heroku. \r\nLogin and signup with Email and password , with Facebook and with Twitter is working properly.\r\n\r\n I have added ParseUser.enableRevocableSessionInBackground();  after the initialization of Parse for session migration (https://parse.com/tutorials/session-migration-tutorial) to migrate users session to revocable session .\r\n\r\n With Google+ Signup/Login my app getting crashed, with some server logs i have found that sessionToken getting undefined which is required for ParseUser.becomeInBackground() for registering user.  \r\n\r\nI have already check  following ref. but get nothing specific. \r\n1. https://github.com/ParsePlatform/parse-server/pull/1749\r\n2. https://github.com/ParsePlatform/parse-server/issues/1392\r\n3. https://github.com/ParsePlatform/parse-server/issues/1605\r\n\r\nMy App is already live on both Android and iOS platforms and now i want to migrate legacy sessions to improved revocable session, but now stuck on the  undefined response from cloud code.\r\n\r\n \r\n#### Expected Results\r\n\r\n[sessionToken]\r\n\r\n#### Actual Outcome\r\n\r\n[undefined]\r\n\r\n### Environment Setup\r\n\r\n- **Server**\r\n  - parse-server version (Be specific! Don't say 'latest'.) : [2.2.21]\r\n  - Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [Heroku]\r\n\r\n- **Database**\r\n  - MongoDB version: [FILL THIS OUT]\r\n  - Storage engine:  [FILL THIS OUT]\r\n  - Hardware:        [FILL THIS OUT]\r\n  - Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [mLab]\r\n\r\n### Logs/Trace\r\n\r\nYou can turn on additional logging by configuring VERBOSE=1 in your environment.\r\n\r\n[2016-11-03T13:48:13.965095+00:00 app[web.1]: verbose: REQUEST for [GET] /server/classes/_User/GJ2LHh1k6S: {} method=GET, url=/server/classes/_User/GJ2LHh1k6S, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=*/*, content-type=text/plain, x-request-id=74772963-ec61-445b-bc21-03f881c4fd00, x-forwarded-for=54.87.78.152, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478180893972, total-route-time=0, content-length=217,\r\n2016-11-03T13:48:14.067598+00:00 app[web.1]: verbose: RESPONSE from [GET] /server/classes/_User/GJ2LHh1k6S: {\r\n2016-11-03T13:48:14.067601+00:00 app[web.1]:   \"response\": {\r\n2016-11-03T13:48:14.067602+00:00 app[web.1]:     \"objectId\": \"GJ2LHh1k6S\",\r\n2016-11-03T13:48:14.067603+00:00 app[web.1]:     \"username\": \"U7yt5Rolfb0W1/4HULJOe7JsShs8bAVR\",\r\n2016-11-03T13:48:14.067604+00:00 app[web.1]:     \"email\": \"kushal.aressindia@gmail.com\",\r\n2016-11-03T13:48:14.067604+00:00 app[web.1]:     \"firstName\": \"Kushal\",\r\n2016-11-03T13:48:14.067605+00:00 app[web.1]:     \"lastName\": \"Dixit\",\r\n2016-11-03T13:48:14.067606+00:00 app[web.1]:     \"account_type\": \"g\",\r\n2016-11-03T13:48:14.067606+00:00 app[web.1]:     \"createdAt\": \"2016-10-05T11:01:15.284Z\",\r\n2016-11-03T13:48:14.067607+00:00 app[web.1]:     \"updatedAt\": \"2016-10-05T11:01:15.284Z\",\r\n2016-11-03T13:48:14.067608+00:00 app[web.1]:     \"ACL\": {\r\n2016-11-03T13:48:14.067609+00:00 app[web.1]:       \"*\": {\r\n2016-11-03T13:48:14.067609+00:00 app[web.1]:         \"read\": true\r\n2016-11-03T13:48:14.067610+00:00 app[web.1]:       },\r\n2016-11-03T13:48:14.067610+00:00 app[web.1]:       \"GJ2LHh1k6S\": {\r\n2016-11-03T13:48:14.067611+00:00 app[web.1]:         \"read\": true,\r\n2016-11-03T13:48:14.067612+00:00 app[web.1]:         \"write\": true\r\n2016-11-03T13:48:14.067612+00:00 app[web.1]:       }\r\n2016-11-03T13:48:14.067613+00:00 app[web.1]:     }\r\n2016-11-03T13:48:14.067614+00:00 app[web.1]:   }\r\n2016-11-03T13:48:14.067615+00:00 app[web.1]: } objectId=GJ2LHh1k6S, username=U7yt5Rolfb0W1/4HULJOe7JsShs8bAVR, email=kushal.aressindia@gmail.com, firstName=Kushal, lastName=Dixit, account_type=g, createdAt=2016-10-05T11:01:15.284Z, updatedAt=2016-10-05T11:01:15.284Z, read=true, read=true, write=true\r\n2016-11-03T13:48:14.132654+00:00 app[web.1]: verbose: REQUEST for [PUT] /server/classes/TokenStorage/Egvw7pYR11: {} method=PUT, url=/server/classes/TokenStorage/Egvw7pYR11, host=espressoft-parse-server.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.9.1 (NodeJS 5.11.1), accept=*/*, content-type=text/plain, x-request-id=35692a8e-cddb-4ad0-bda6-8965f32aadae, x-forwarded-for=54.87.78.152, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=1, x-request-start=1478180894118, total-route-time=0, content-length=217,\r\n2016-11-03T13:48:14.528455+00:00 heroku[router]: at=info method=POST path=\"/server/classes/TokenStorage/Egvw7pYR11\" host=espressoft-parse-server.herokuapp.com request_id=35692a8e-cddb-4ad0-bda6-8965f32aadae fwd=\"54.87.78.152\" dyno=web.1 connect=1ms service=408ms status=200 bytes=522\r\n2016-11-03T13:48:14.532305+00:00 heroku[router]: at=info method=POST path=\"/server/functions/accessGoogleUser\" host=espressoft-parse-server.herokuapp.com request_id=b6962a03-325a-4937-9f98-4fdf1b7a3a57 fwd=\"49.248.139.244\" dyno=web.1 connect=1ms service=1149ms status=200 bytes=483\r\n2016-11-03T13:48:14.506716+00:00 app[web.1]: verbose: RESPONSE from [PUT] /server/classes/TokenStorage/Egvw7pYR11: {\r\n2016-11-03T13:48:14.506730+00:00 app[web.1]:   \"response\": {\r\n2016-11-03T13:48:14.506732+00:00 app[web.1]:     \"updatedAt\": \"2016-11-03T13:48:14.132Z\"\r\n2016-11-03T13:48:14.506732+00:00 app[web.1]:   }\r\n2016-11-03T13:48:14.506733+00:00 app[web.1]: } updatedAt=2016-11-03T13:48:14.132Z\r\n2016-11-03T13:48:14.510413+00:00 app[web.1]: Session_Token:undefined\r\n2016-11-03T13:48:14.511265+00:00 app[web.1]: info: Ran cloud function accessGoogleUser for user undefined with:\r\n2016-11-03T13:48:14.511267+00:00 app[web.1]:   Input: {\"email\":\"kushal.aressindia@gmail.com\",\"code\":\"ya29.CjGKAxy9fFeCNYtgI7Gswiug8iIH_rnFTy7RytNtWrsm5rku3CJdyviSiD1AR768Cg31\"}\r\n2016-11-03T13:48:14.511268+00:00 app[web.1]:   Result: undefined functionName=accessGoogleUser, email=kushal.aressindia@gmail.com, code=ya29.CjGKAxy9fFeCNYtgI7Gswiug8iIH_rnFTy7RytNtWrsm5rku3CJdyviSiD1AR768Cg31, user=undefined\r\n2016-11-03T13:48:14.511886+00:00 app[web.1]: verbose: RESPONSE from [POST] /server/functions/accessGoogleUser: {\r\n2016-11-03T13:48:14.511899+00:00 app[web.1]:   \"response\": {}\r\n2016-11-03T13:48:14.511900+00:00 app[web.1]: } result=undefined]\r\n"}}
{"actor":{"display_login":"gopal-aressindia"}}