Parse request.object.get(“KEY”) always returns undefined

Finally I was able to solve this. This is definitely a bug in Parse’s Javascript SDK. I changed the Javascript SDK version in the global.json back to version “1.4.2” instead of “latest”, uploaded this to the cloudcode folder and everything went back to normal.

You can also test other versions, maybe v1.5.0 is working too, but as soon as I found out v1.4.2 worked fine, I didn’t try out more recent versions.

EDIT

So, I discovered, that Parse must have changed something in their command line tool. It seems that the global.json file isn’t there anymore if you create your CloudCode folder with the most recent version of their command line tool. However, you can manually create it and upload the complete folder to your Parse app.

This is how my CloudCode folder looks like, just for example:
CloudCode folder contains three subfolders

• cloud – containing cloud code files

• config – containing the global.json file

• public – containing the index.html file

The global.json file contains these lines of code:

{
  "global": {
    "parseVersion": "1.4.2"
  },
  "applications": {
    "YOUR_PARSE_APPS_NAME": {
      "applicationId": "YOUR_APP_ID",
      "masterKey": "YOUR_APP_MASTER_KEY"
    },
    "_default": {
      "link": "YOUR_PARSE_APPS_NAME"
    }
  }
}

Leave a Comment