[COMPASS-4144] schema.wasm: Uncaught TypeError: t.fields[Symbol.iterator] is not a function Created: 12/Feb/20  Updated: 10/Jan/24  Resolved: 17/Feb/21

Status: Closed
Project: Compass
Component/s: Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Lucas Hrabovsky (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to COMPASS-4145 @mongodb-rust/wasm-schema-parser fail... Closed
Documentation Changes: Not Needed

 Description   

You can workaround COMPASS-4145 by running the below in the upgrade-compass-schema branch of compass:

cp node_modules/@mongodb-js/compass-schema/lib/8d0feb331cc7c14b9513.module.wasm ./src/app/;
cp node_modules/@mongodb-js/compass-schema/lib/1,js ./src/app/;

Then when trying to analyze a schema, you'll get the below uncaught exception:

Uncaught TypeError: t.fields[Symbol.iterator] is not a function
    at Object.X.e._mergeSchema (/Users/lucas/compass-electron6/node_modules/@mongodb-js/compass-field-store/lib/index.js:1)
    at Object.X.e.processSchema (/Users/lucas/compass-electron6/node_modules/@mongodb-js/compass-field-store/lib/index.js:1)
    at Store.<anonymous> (/Users/lucas/compass-electron6/node_modules/@mongodb-js/compass-field-store/lib/index.js:1)
    at EventEmitter.eventHandler (/Users/lucas/compass-electron6/node_modules/reflux-core/lib/PublisherMethods.js:44)
    at EventEmitter.emit (/Users/lucas/compass-electron6/node_modules/reflux-core/node_modules/eventemitter3/index.js:137)
    at Store.trigger (/Users/lucas/compass-electron6/node_modules/reflux-core/lib/PublisherMethods.js:63)
    at Store.setState (/Users/lucas/compass-electron6/node_modules/reflux-state-mixin/lib/storeMixin.js:48)
    at /Users/lucas/compass-electron6/node_modules/@mongodb-js/compass-schema/lib/index.js:34



 Comments   
Comment by Massimiliano Marcon [ 17/Feb/21 ]

The wasm-based implementation of the schema analyzer hasn't made it into the product. For this reason, I am closing this bug and we'll pick it up again in the future if needed.

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