[COMPASS-6495] Error using Mongo shell in mongo compass app Created: 05/Feb/23  Updated: 03/Oct/23  Resolved: 21/Feb/23

Status: Closed
Project: Compass
Component/s: Embedded Shell
Affects Version/s: 1.35.0
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Wiktor Janiszewski Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mongo compass version: latest (1.35.0)
Operating system: MacOS


Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

Encountering this issue after running even simple query (db.coll.findOne({}) in mongo shell inside mongo compass.

ReferenceError: app is not defined
  if (_fs === "returned") return _srv;else if (_fs === "threw") throw _srv;
                                                                ^
 
ReferenceError: app is not defined
    at evalmachine.<anonymous>:36:162
    at evalmachine.<anonymous>:208:5
    at evalmachine.<anonymous>:213:3
    at Script.runInContext (node:vm:139:12)
    at Object.runInContext (node:vm:289:6)
    at ElectronInterpreterEnvironment.sloppyEval (/Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js:1917:2160437)
    at ShellEvaluator.innerEval (/Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js:1917:3905059)
    at ShellEvaluator.customEval (/Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js:1917:3905203)
    at OpenContextRuntime.evaluate (/Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js:1917:2159555)
    at ElectronRuntime.evaluate (/Applications/MongoDB Compass.app/Contents/Resources/app.asar.unpacked/node_modules/@mongosh/node-runtime-worker-thread/dist/worker-runtime.js:1917:2160971) 

Steps to Reproduce

Encountered this during using the MongoSH in mongo compass.

Expected Results

Able to run the commands on database inside mongosh.

Actual Results

The error visible above.



 Comments   
Comment by Jessica Sigafoos [ 21/Feb/23 ]

wiktor.janiszewski@itstartechs.com thanks for the additional information, glad to hear the update helped resolve the issue!

Comment by Wiktor Janiszewski [ 08/Feb/23 ]

Hello, @Alena Khineika we've managed to overcome this issue by updating atlas plan from M0 to M10, but quite frankly, it'd be amazing if the proper message would be displayed to user in such case.

Comment by Alena Khineika [ 06/Feb/23 ]

Hey wiktor.janiszewski@itstartechs.com, I tried to reproduce the issue, but it seems to be working well for me. Could you please try the current latest Beta (1.35.1-beta.2) and let me know if the issue is gone there?

Generated at Wed Feb 07 22:43:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.