Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoError: "Encountered exception while executing Javascript. Query root must be specified." #3462

Closed
adambarghouthi opened this issue Feb 1, 2017 · 30 comments

Comments

@adambarghouthi
Copy link

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:

Hope someone has a solution and has encountered it before, thank you!

@michael-mansour
Copy link

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

@flovilmart
Copy link
Contributor

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)

@michael-mansour
Copy link

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

@flovilmart
Copy link
Contributor

Uhm, that's odd indeed. But I have never seen that error before. Does that error occur on every queries?

@michael-mansour
Copy link

No only when I'try to "modify" an existing object

@flovilmart
Copy link
Contributor

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 :)

@michael-mansour
Copy link

I've create an issue here felixrieseberg/parse-server-azure#13

@adambarghouthi
Copy link
Author

@Skynext what release 2.3.1 are you talking about? The parse server version?

@michael-mansour
Copy link

@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

@adambarghouthi
Copy link
Author

@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?

@michael-mansour
Copy link

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

@flovilmart
Copy link
Contributor

CAN you downgrade to 2.3.0 and see if the problem persists?

@michael-mansour
Copy link

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

@adambarghouthi
Copy link
Author

adambarghouthi commented Feb 1, 2017

@Skynext

npm install packageName@versionNum --save --save-exact
in the console of the cloud code portal

@flovilmart
Copy link
Contributor

Another option would be to try with :latest as explained in as explained here it contains an updated version of the mongodb npm package

@oproulx
Copy link

oproulx commented Feb 1, 2017

I'm contacting Azure support about this now since I've seen the same issue with no changes to our server side in weeks.

@oproulx
Copy link

oproulx commented Feb 1, 2017

The Azure team is looking into it.

@adambarghouthi
Copy link
Author

@oproulx Thanks man!

@adambarghouthi
Copy link
Author

@Skynext any update?

@oproulx
Copy link

oproulx commented Feb 1, 2017

None yet. They've been pretty responsive in the past though.

@adambarghouthi
Copy link
Author

@oproulx how do I contact them also? maybe they'll up the ante on this issue when more people raise it

@oproulx
Copy link

oproulx commented Feb 1, 2017

Azure team has identified the issue and they are currently deploying a fix. ETA 2-3 hours.

@adambarghouthi
Copy link
Author

@oproulx GOLD, thanks a bunch!!

@michael-mansour
Copy link

@oproulx Thanks a lot !

@oproulx
Copy link

oproulx commented Feb 1, 2017

I'm no longer seeing the errors on my end but we are running more tests to make sure everything is still operational.

@flovilmart
Copy link
Contributor

That's good news! Sorry you guys experienced a downtime with azure.

@adambarghouthi
Copy link
Author

Same thing @oproulx, will update if I see anything unusual
No worries @flovilmart thanks for sticking around the thread. Coming to you from mtl too btw

@flovilmart
Copy link
Contributor

@adambarghouthi pretty cool!

@michael-mansour
Copy link

Thanks a lot to everyone for your Help !
@oproulx how do you have contact the Azur team ? It can be interesting for the future

@natanrolnik
Copy link
Contributor

Closing this as resolved by the Azure team in Azure instances :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants