[COMPASS-7129] Invalid MongoDB semver version breaks Compass Created: 21/Aug/23  Updated: 23/Oct/23

Status: Open
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Alexandre Habersaat Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: needs-prioritization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Windows 11 22H2 (64-bits)
MongoDB server version: v4.2.18
MongoDB Compass version: 1.39.1


Attachments: Text File compass_64ef05a4ae2f8a2193550bf3_log.txt    
Story Points: 3
Documentation Changes: Not Needed

 Description   

When someone connects to a MongoDB deployment with an invalid version (Ex: `4.2.18-`) Compass breaks on the parsing. This involves making Compass handle these without breaking.

V Old description below V

Problem Statement/Rationale

I have a mongoDB server running on an embedded Linux device, connected to a Windows laptop through a direct RNDIS/USB ethernet connection.

On the laptop, I'm running MongoDB Compass to connect to the database.

The data on the server is not protected (public), there is not any user defined nor any authentication.

  • I can connect with MongoDB Compass.
  • I can see the list of databases and the list of collections.
  • But I cannot open any collection nor see any item in any collection from the UI.

Steps to Reproduce

  • Start MongoDB Compass and connect to the mongoDB server with the following connection options:
    • Connect string: mongodb://192.168.XXX.XXX:27017 (where X is the real IP address)
    • Authentication: None
    • TLS/SSL: Default (Disabled)
    • Proxy/SSH: None
    • All the rest by default
  • Wait for the list of databases to appear, and open one.
  • Wait for the list of collections to appear, and try to open one (non-empty, obviously).

Expected Results

The collections can be opened and each individual entry can be read.

Actual Results

The collections cannot be opened (no arrow in the UI), nothing happens when clicking on a collection.

Additional Notes

  • It used to work well with a previous version of MongoDB Compass from ~2 years ago (that I don't have anymore). Not sure though about the corresponding mongoDB server at that time.
  • I can send commands from the terminal to Browse the database. I also tried Studio3T software and I can execute commands from the laptop, so it does not seem to be a configuration on the server nor a user permission issue.
  • If I run the same database locally on the laptop (i.e. Windows version of the mongoDB server), it works and I can open the collections.


 Comments   
Comment by Alexandre Habersaat [ 23/Oct/23 ]

After checking our build scripts and fixing the versioning of mongoDB to not contain any dash at the end, MongoDBCompass manages the connect correctly.

I think this ticket can be closed. Thank you for the help.

Comment by Alexandre Habersaat [ 06/Sep/23 ]

Thank you for the first investigation.
As it's running on an embedded device, we probably build it from source at some point; I'll check if we find a reason why the version gets a dash at the end.

Comment by Rhys Howell [ 01/Sep/23 ]

alexandre.habersaat@flyability.com Thanks those logs are helpful, I'm seeing an error `TypeError: Invalid Version: 4.2.18-`
It looks like it's seeing your MongoDB version is "4.2.18-" and it fails parsing it because of the `-`. Is there any custom configuration on the MongoDB instance that might cause the version to have the dash at the end? I'm not sure why the version would be not be "4.2.18"

Comment by Alexandre Habersaat [ 30/Aug/23 ]

I just uploaded a log file (after updating Compass to the latest version 1.39.3 this morning).

Thanks !

Comment by Rhys Howell [ 28/Aug/23 ]

Hi alexandre.habersaat@flyability.com if possible can you share your log file with us? It would help us see if any commands are failing or errors happening in the process. You can get the log text file from the Help Menu -> Open Log File -> Extract and open as .txt
Be sure to redact any personal information.
Thanks, hopefully we can understand what's going on here.

Comment by PM Bot [ 21/Aug/23 ]

Hello alexandre.habersaat@flyability.com, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible.

Please review your issue to ensure you've included your environment details and have attached relevant logs (with any sensitive data redacted), so that we're best able to provide you a timely and thorough response. Thanks again!

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