MongoError: "Encountered exception while executing Javascript. Query root must be specified."
Hi guys,
I have my parse server on Azure now and everything has been working great for a month. Just today when Parse shut down I'm getting this error in my server console:
Error generating response. { [MongoError: Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (__.sys.commonUpdate.js:2288:17)\n at __docDbMain (__.sys.commonUpdate.js:4:5)\n at Global code (__.sys.commonUpdate.js:1:2)"]}
Don't know what the problem is. What I've done so far:
- I changed SERVER_URL field in CoreManager.js from https://api.parse.com/1 to my Azure server url
Hope someone has a solution and has encountered it before, thank you!
I've the exact same problem ! I'also host my parse server on azure and everything worked without problems until now. but today I'get the following error
Uncaught internal server error. { [MongoError: Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified
Looks like it's an azure related issue. Can you try downgrading parse-sever or mongodb. Or look if there are known issues with the latests mongodb versions and azure's DocumentDB (I assume you're using azure's database)
Yes I use azure DocumentDB. What I do not understand is that the problem has appeared suddenly on a release (2.3.1) that has worked well until now
Uhm, that's odd indeed. But I have never seen that error before. Does that error occur on every queries?
No only when I'try to "modify" an existing object
Can you get in touch with Azure support? Their mongodb driver compatibility is hidden, and I don't recognize those errors.
Also, __docDbMain hints to DocumentDB issue :)
I've create an issue here https://github.com/felixrieseberg/parse-server-azure/issues/13
@skynext what release 2.3.1 are you talking about? The parse server version?
@adambarghouthi yes the problem first appeared on parse server version 2.3.1 (while I had no problems with this version until then) I've update parse server to 2.3.2 but the problem persists
@skynext On my iOS app I'm seeing this error in the console of XCode {"code":1,"message":"Internal server error."}, looking around some people who encountered this general message said that there might be something wrong with Express version. What do you think?
I get the exact same error !
fatal error: 'try!' expression unexpectedly raised an error: Error Domain=Parse Code=1 "{"code":1,"message":"Internal server error."}"
Honestly I do not know, I do not see how the logs on the servers involve the express version. Just like @flovilmart suggests I've contacted the Azure support via stackoverflow http://stackoverflow.com/questions/41981297/mongoerror-encountered-exception-while-executing-javascript-query-root-must-b?noredirect=1#comment71142563_41981297 I m waiting for their answers
CAN you downgrade to 2.3.0 and see if the problem persists?
Ok I will try ! Can you please very quickly explain me (or just give me a link) how can I downgrade parse server version on azure ? Thank you very much
@skynext
npm install packageName@versionNum --save --save-exact in the console of the cloud code portal
Another option would be to try with :latest as explained in as explained here it contains an updated version of the mongodb npm package
I'm contacting Azure support about this now since I've seen the same issue with no changes to our server side in weeks.
The Azure team is looking into it.
@oproulx Thanks man!
@skynext any update?
None yet. They've been pretty responsive in the past though.