Autodesk-Forge / viewer-nodejs-tutorial

DEPRECATED, please visit our new Forge Learning material here:
https://learnforge.autodesk.io/#/
MIT License
52 stars 43 forks source link

Cannot read property 'numGeoms' and onDemandLoadingEnabled #4

Closed b-rohit closed 7 years ago

b-rohit commented 7 years ago

I followed modelderivative project and got a urn of a model. I uncommented the code you mentioned in the readme. Earlier I had used this project successfully and I was able to see the model in the viewer. Now when I run I get following errors >

blob:http://localhost:3000/86762004-1fd9-431a-9836-287cba60048d:20 An LMV resource (https://developer.api.autodesk.com/derivativeservice/v2/derivatives/urn%3Aadsk.viewing%3Afs.file%3AdXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6NWN6cWhkZ3g1Y2N6cWhkZ3hlc25zNGplYXlkbmR3Z2NtZ3llZzR5MC9SZXZpdF8yMDE3X0dldHRpbmdfU3RhcnRlZC5ydnQ%2Foutput%2FResource%2F3D%20View%2F%7B3D%7D%20307584%2FMaterials.json.gz?domain=http%3A%2F%2Flocalhost%3A3000) was not uncompressed by the browser. This hurts performance. Check the Content-Encoding header returned by the server and check whether you're getting double-compressed streams. The warning prints only once but it's likely the problem affects multiple resources.
p @ blob:http://localhost:3000/86762004-1fd9-431a-9836-287cba60048d:20
wgs.min.js:13 Uncaught TypeError: Cannot read property 'numGeoms' of undefined
    at d.initialize (wgs.min.js:13)
    at e.onModelRootLoadDone (viewer3D.min.js:10)
    at n (viewer3D.min.js:10)
    at Worker.d (viewer3D.min.js:9)
wgs.min.js:13 Uncaught TypeError: Cannot read property 'onDemandLoadingEnabled' of null
    at Wa.initialize (wgs.min.js:13)
    at d.setBVH (wgs.min.js:13)
    at n (viewer3D.min.js:10)
    at Worker.d (viewer3D.min.js:9)
jaimerosales commented 7 years ago

Which version of the viewer are you using? Check in the console by typing LMV_VIEWER_VERSION

That can give me a better idea of what is happening. Thanks

b-rohit commented 7 years ago

LMV_VIEWER_VERSION "2.17" Later on I restarted my system and it started working :)

jaimerosales commented 7 years ago

Ok cool, Yeah maybe a cache problem. Let me know if it happens again. Cheers!