Breaking change after updating from Parse server 2.2.12

I recently have had to migrate my Parse server from HerokuApp to MongoDB Atlas, and to do so, it is required to update my parse server from 2.2.12 to at least 2.8.4. During the installation I see a lot of warnings and errors, but it does in the end say ‘Build succeeded!’. Click here for a text file containing the full log during the update.

I don’t know if these warnings/errors are the issue or if there was a breaking change after parse server 2.2.12, but now in my front end code (I am using Parse-SDK-iOS-OSX) I am receiving an error whenever I request objects:

JSON text did not start with array or object and option to allow fragments not set.

I have changed the parse server back to 2.2.12, and it works again, then back to 2.8.4 and it doesn’t work, so obviously it is something to do with changes or problems with the parse server, which is why I’m posting now in the parse server topic. (I previously posted this as an iOS issue here: iOS SDK: findObjectsInBackground query returns strange JSON error)

Is anyone aware of breaking changes in parse server that I need to adjust my code for? Or would the issue be related to the errors/warnings in updating parse server, in which case, any advice there?

More info:

  1. I am using the latest Parse-SDK-iOS-OSX (version 1.19.1).
  2. I have seen that it might be possible to get a more meaningful error message if I add logging to the parse server and set up the Parse dashboard. Unfortunately this potential solution was a dead-end for me also, after installing Parse dashboard, I see:

[Error] Origin http:// localhost:4040 is not allowed by Access-Control-Allow-Origin.

If resolving this Parse dashboard issue would be the easiest way to diagnose my iOS code issue, I have posted about this issue in StackOverflow here: stackoverflow .com/questions/64706303/parse-dashboard-access-control-allow-origin-error. (sorry I had to put the space into the URL so that I could post this topic as new users can only include two links)

  • You could debug the iOS app or make a request using the REST API to look at the raw response the iOS SDK is receiving.

  • You could enable verbose logging in Parse Server and look at the logs to see whether the iOS SDK request is received at all and if so, which error is causes.

Thank you so much for taking the time to check my query and for the tips.

  1. Yes unfortunately the iOS parse framework just spits out the json error and even debugging there’s no way of seeing the text that was returned - that most likely contains the actual error! good idea with going via the rest api - though labour intensive, it might find the solution - though how depressing it would be if all I get returned is the same json error from the server!

  2. I thought that Parse dashboard was required to see logs, is that not the case? (See ‘more info 2’ in my original post)

Oh! I think I’ve worked out how to see logs here with:

heroku logs --tail 

I can see the error:

Error: getaddrinfo ENOTFOUND

No idea what it means, but it’s a start!

Actually, running simply:

heroku logs

I see an error:

no implicit conversion from nil to integer

Don’t know if it’s an error of the ‘heroku logs’ command, because it seems to hang, or if it’s an error associated with my app.

You could look at the logs when you restart the Heroku dyno and see whether Parse Server logs any error on start-up.

The logs you see in the Parse Dashboard are the same you see in the log files.

The error you see in the app is generic and means that the SDK cannot interpret the server response. It could be that Parse Server is not running and the response is a 5xx error code. You could also check the /health endpoint of Parse Server to see whether it is even running.

Thanks for the tips about checking logs without the Dashboard, I was able to find that Parse was crashing due to an expired push notification file, I updated it and now both my app and the Dashboard are working!

Thanks for updating us on this. I would not expect Parse Server to crash due to an expired Push notification certificate but rather fail gracefully when sending a Push notification with an error message in the logs.

Could you double check that and if that was indeed the reason, open an issue in the Parse Server repository?

Actually I realised that this could be the problem by discovering it described in a closed Parse-server issue (closed not because it was fixed but because it was deemed to be a problem with Node APN library) link here.

1 Like

Thanks, I reopened the issue and posted an update about the possible next steps. If you are interested in looking into this, please feel free to pick it up.