mongodb-js / compass

The GUI for MongoDB.
https://mongodb.com/compass
Other
1.15k stars 176 forks source link

Mongosh command keeps on loading #2155

Closed tbhaxor closed 3 years ago

tbhaxor commented 3 years ago

Bug Report

Current Behavior

Any command I enter in mongosh interface and hit enter, it keeps on loading

Code/Gist

Here is very simple example image

Expected Behavior/Code

It should print the collection name

Environment

Possible Solution

Additional Context/Screenshots

It was working in previous versions, unfortunately couldn't recall which one

tbhaxor commented 3 years ago

Any updates

addaleax commented 3 years ago

@tbhaxor Which Compass version are you seeing this problem with?

tbhaxor commented 3 years ago

@addaleax 1.26.1.beta.7-1 version here

I also tried all the packages listed here and also the git clone. It's not working

addaleax commented 3 years ago

@gribnoysup Could this be from the child process failing during startup? I know we talked about something like this, where would the error show up in that case?

gribnoysup commented 3 years ago

The symptoms are similar, yeah. We fixed error propagation in https://github.com/mongodb-js/mongosh/pull/721 but I guess latest Compass shipped with a version that doesn't include that. I'll try to set up a VM with Manjaro to investigate

gribnoysup commented 3 years ago

Just tried on a fresh Manjaro install and I can't reproduce.

image

@tbhaxor anything suspicious you can see in the devtools (you can open them by clicking View -> Toggle DevTools in the menu bar)? If there is nothing suspicious in the output there, there is this very hacky code you can run in the devtools that might help us understand the issue:

// Getting the reference to the runtime from the depths of state
var {childProcess} = global.app.appRegistry.stores['CompassShell.Store'].reduxStore.getState().runtime.runtime;
// Checking the status code of the child process
console.info('Status code', childProcess.exitCode)
// If child exited with non-zero, we spawn sync so we can get an easy access to stderr
if (childProcess.exitCode) {
var {stderr} = require('child_process').spawnSync(childProcess.spawnargs[0], [childProcess.spawnargs[1]], { env: { ...process.env, ELECTRON_RUN_AS_NODE: 1 } })
console.info('stderr:\n')
console.info(stderr.toString())
}

Do you mind doing this and posting the output here?

tbhaxor commented 3 years ago

@gribnoysup Which AUR repo you have installed?

tbhaxor commented 3 years ago

Never mind Its working. I had to delete the profile config from rm -rf ~/.config/Mongo\ Compass*/

image

tbhaxor commented 3 years ago

@gribnoysup @addaleax Are there any plans for Dark Theme?

addaleax commented 3 years ago

@tbhaxor https://github.com/mongodb-js/compass/pull/1960 had some initial conversation around this – but yes, this is something that we do want to add at some point. :)

jirikrepl commented 3 years ago

@addaleax I would be great to implement dark mode!