A JavaScript error occured in the main process : Compass

I got this error because I closed the app without disconnecting. I tried to start up the program and received the error. I waited about 30 seconds and then, surprise! Compass popped up and is running - even though the error showed. It must have cleaned itself up. I am using MongoDB Compass 4.0.3 Enterprise.


Here's some additional ways how to solve:


  1. From \AppData\Local\MongoDBCompass\app-1.13.1\resources delete the file named as app.asar, before it copy somewhere (in my case was desktop). Then paste file app.asar to this path again \AppData\Local\MongoDBCompass\app-1.13.1\resources and rerun Compass.
  2. Restart Windows and try to run again Compass.
  3. If nothing helps, reinstall the application (another version, for instance).

Stuck?

open app -> get error -> no reboot ->

task manager -> "The MongoDB GUI" or "MongoDBCompassCommunity" -> kill process


Prevention?

Never quit the app using native close methods ("X" button / "Close window")

Always quit via Connect -> Quit (Ctrl+Q)


No need to disconnect first. It is just badly done electron app.


Answer based on solution from @Senne Verhaegen


Solution that worked for me:

  1. Go to task manager
  2. Kill the process called: "The MongoDB GUI"

Tags:

Mongodb