[COMPASS-4913] Schema Analyzer tab crashes on a certain query Created: 30/Jun/21  Updated: 14/Jun/23

Status: Open
Project: Compass
Component/s: Schema
Affects Version/s: 1.26.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File screenshot-1.png    
Issue Links:
Related
related to COMPASS-4281 Schema tab goes blank when typing a q... Open
Story Points: 2

 Description   

Problem Statement/Rationale

Seems like certain data types crash the schema analyzer tab

Steps to Reproduce

  • Open sample_geospatial.shipwrecks collection in Compass
  • Go to the "Schema" tab
  • Change query to {depth: {$type: 'number'}} and press Analyze

Expected Results

You see analyze results in the UI

Actual Results

Tab goes blank and there are errors in the console

Additional Notes

Stack trace from packaged application:

TypeError: Expected a function
    at it (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309)
    at pt (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309)
    at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309
    at m (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309)
    at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309
    at t.exports (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309)
    at t.exports (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:309)
    at SVGRectElement.<anonymous> (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-schema/lib/index.js:325)
    at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:962
    at d3_selection_each (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:968)

Seems to happen with a Double type for some reason


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