ThatOpen / web-ifc-viewer

Graphics engine and toolkit for client applications.
MIT License
931 stars 231 forks source link

Problems updating from 1.0.103 #118

Closed iserranoe closed 2 years ago

iserranoe commented 2 years ago

My app is working fine up to version 1.0.102; however, I get different errors when trying to update:

From version 1.0.103 to 1.0.105 I get the error:

TypeError: this.wasmModule.OpenModel is not a function
    OpenModel config.json:738895
    newIfcModel config.json:674881
    parse config.json:674860
    parse config.json:677676
    parse config.json:677898
    load config.json:677884
    load config.json:799729
    promise callback*load config.json:799720
    load config.json:677878
    loadIFC config.json:5793
    loadIFC config.json:5790
    DetallesIFC config.json:5901
    commitHookEffectListMount config.json:633852
    commitLayoutEffectOnFiber config.json:633961
    commitLayoutMountEffects_complete config.json:635321
    commitLayoutEffects_begin config.json:635307
    commitLayoutEffects config.json:635245
    commitRootImpl config.json:637509
    commitRoot config.json:637383
    finishConcurrentRender config.json:636681
    performConcurrentWorkOnRoot config.json:636510
    workLoop config.json:640744
    flushWork config.json:640718
    performWorkUntilDeadline config.json:641002
    <anonymous> task.js:61
    run task.js:35
    listener task.js:46
    js task.js:84
    Webpack 7
react_devtools_backend.js:3973:25
    overrideMethod react_devtools_backend.js:3973
    load config.json:677889
    load config.json:799729
    (Asíncrono: promise callback)
    load config.json:799720
    load config.json:677878
    loadIFC config.json:5793
    loadIFC config.json:5790
    DetallesIFC config.json:5901
    commitHookEffectListMount config.json:633852
    commitLayoutEffectOnFiber config.json:633961
    commitLayoutMountEffects_complete config.json:635321
    commitLayoutEffects_begin config.json:635307
    commitLayoutEffects config.json:635245
    commitRootImpl config.json:637509
    commitRoot config.json:637383
    finishConcurrentRender config.json:636681
    performConcurrentWorkOnRoot config.json:636510
    workLoop config.json:640744
    flushWork config.json:640718
    performWorkUntilDeadline config.json:641002
    <anonymous> task.js:61
    run task.js:35
    listener task.js:46
    (Asíncrono: EventHandlerNonNull)
    js task.js:84
    Webpack 7

And from version 1.0.106 I get the error:

RuntimeError: indirect call to null
    ___errno_location web-ifc-api.js:10910
    setErrNo web-ifc-api.js:10448
    _clock_gettime web-ifc-api.js:10458
    ___wasm_call_ctors web-ifc-api.js:10892
    func web-ifc-api.js:10887
    callRuntimeCallbacks web-ifc-api.js:6736
    initRuntime web-ifc-api.js:6562
    doRun web-ifc-api.js:10989
    run web-ifc-api.js:11007
    runCaller web-ifc-api.js:10944
    removeRunDependency web-ifc-api.js:6612
    receiveInstance web-ifc-api.js:6679
    receiveInstantiatedSource web-ifc-api.js:6683
    promise callback*./node_modules/web-ifc/web-ifc-api.js/dist/web-ifc.js/WebIFCWasm2/createWasm/instantiateAsync/WebIFCWasm2< web-ifc-api.js:6697
    promise callback*instantiateAsync web-ifc-api.js:6695
    createWasm web-ifc-api.js:6716
    WebIFCWasm2 web-ifc-api.js:10890
    Init web-ifc-api.js:51910
    __async web-ifc-api.js:42
    __async web-ifc-api.js:26
    Init web-ifc-api.js:51902
    parse IFCParser.ts:94
    parse main.165c13cbe064c3cdc8e5.hot-update.js:2905
    parse main.165c13cbe064c3cdc8e5.hot-update.js:3105
    load main.165c13cbe064c3cdc8e5.hot-update.js:3091
    load config.json:791330
    promise callback*load config.json:791321
    load main.165c13cbe064c3cdc8e5.hot-update.js:3085
    loadIFC config.json:5793
    loadIFC config.json:5790
    DetallesIFC config.json:5901
    commitHookEffectListMount config.json:633852
    commitLayoutEffectOnFiber config.json:633961
    commitLayoutMountEffects_complete config.json:635321
    commitLayoutEffects_begin config.json:635307
    commitLayoutEffects config.json:635245
    commitRootImpl config.json:637509
    commitRoot config.json:637383
    performSyncWorkOnRoot config.json:636817
    flushSyncCallbacks config.json:623106
react_devtools_backend.js:3973:25

I couldn't find any information about releases, so is there any important change that may be causing this issue?

I am using node 14.19.1 on WSL2 and this is my package.json:

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@babel/core": "^7.17.9",
    "assert": "^2.0.0",
    "buffer": "^6.0.3",
    "danfojs": "^0.2.8",
    "danfojs-node": "^0.2.8",
    "i18next": "^21.6.16",
    "i18next-browser-languagedetector": "^6.1.4",
    "install": "^0.13.0",
    "mapbox-gl": "^2.4.1",
    "mdbreact": "^5.2.0",
    "moment": "^2.29.3",
    "node-fetch": "^3.2.3",
    "plotly.js": "^2.11.1",
    "postcss": "^8.4.12",
    "proj4": "^2.8.0",
    "ramda": "^0.28.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-draggable": "^4.4.4",
    "react-i18next": "^11.16.7",
    "react-map-gl": "^6.1.19",
    "react-plotly.js": "^2.5.1",
    "react-router-dom": "^6.3.0",
    "react-select": "^5.3.0",
    "sass": "^1.50.1",
    "sass-loader": "^12.6.0",
    "sass-migrator": "^1.5.4",
    "stats.js": "^0.17.0",
    "stream": "0.0.2",
    "svgo": "^2.8.0",
    "three": "^0.139.2",
    "three-mesh-bvh": "^0.5.10",
    "typescript": "^4.6.3",
    "underscore": "^1.13.3",
    "web-ifc-viewer": "^1.0.103",
    "web-vitals": "^2.1.4",
    "worker-loader": "^3.0.8"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts --max-old-space-size=3072 build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "react-scripts": "^5.0.1",
    "resize-observer-polyfill": "^1.5.1"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all",
      "not ie 11",
      "not chrome 49"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
agviegas commented 2 years ago

Hi, every time you update web-ifc-viewer, you need to reinstall the dependencies and re-copy the WASM files of node_modules/web-ifc into your app.

FYI the last version is 1.0.176, I suggest you to work with the last one to have more bugs addressed!

iserranoe commented 2 years ago

Thank you, I didn't know that! I close the issue.