While loading a product into the Forge viewer using latest version of Chrome, user receives a message that states "WebGL context lost". They had a model loaded into the viewer which was working fine, clicked on another model to view it and that is when they received the error message (see attachment).
Is there anything that can be done to mitigate or resolve this issue?
Click for Picture of Error Message
Here are two possibilities for this issue:
The graphic card driver is out-date, please try to upgrade it: https://knowledge.autodesk.com/support/bim-360/troubleshooting/caas/sfdcarticles/sfdcarticles/Error-WebGL-context-lost-when-viewing-files-in-BIM-360.html
There might be some viewer instances that haven't been destroyed properly. you can type NOP_VIEWERS in your browser console to see if the array length is greater than two. To fix this, you can take advantage of viewer.finish() before loading other models.
Related
We have a Forge Viewer (GuiViewer3D, v. 7) implementation in our Nuxt app, using a few extensions (MarkupsCore, Measure, FullScreen) and custom docking panels such as a list of viewables to select from. Ever since we upgraded from Revit version 2021 to 2022, we haven't been able to display the 2D viewables from our svf files in the viewer. When we select any 2D viewable, the viewer freezes in this state:
With a few warnings thrown in the console:
Deprecated API usage: No “GlobalWorkerOptions.workerSrc” specified.
and
Warning: getOperatorList - ignoring errors during "GetOperatorList: page 0" task: "r: Cannot read properties of undefined (reading 'X')"
of which the former lead to this stackoverflow post, to which Augusto Goncalves suggested we tried uploading our revit file in your online viewer at https://viewer.autodesk.com/designviews. This works, and so we tried to create a new Nuxt app with a simple Forge Viewer implementation following the v. 7 example guide. This also works.
What we did next was to re-implement the v. 7 viewer in our production app by following the official documentation once again, thus removing any customization and leaving out everything else than the bare minimum. With this v. 7 viewer, running in a node environment on either node version 10.0 or 14.9, the bug persists, ruling out the possibility of any custom code being the cause.
Upon further debugging of scripts (loaded in via Autodesk) such as pdf.js, CompGeom.min.js, PDFLoader.js, path2d.js etc., we’ve gotten to a point where this message appears, and this is where our current trail ends:
TypeError: Cannot read properties of undefined (reading 'X') at c.strokeClipperContour (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:173979) at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177686 at https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177811 at Array.map (<anonymous>) at c.fill (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:177413) at t.value https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:16067) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/CompGeom/CompGeom.min.js:17:9554) at e.beginDrawing (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:211570) at t.value (https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:185323) at ttps://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/extensions/PDF/PDF.min.js:39:158419
We cannot effectively debug these minified scripts, and are hoping you can provide some insight as to what might be causing this issue.
I am new to forge. I have been trying to create a basic server and authentication using nodejs by following exact steps in the youtube training videos. But i am facing errors in the initial phase itself getting an error code: ECONNRESET. I have a feeling that my firewall is blocking the servers but not able to make anything concrete out of this. The url that i tried hitting is "http://localhost:3000/api/forge/oauth/token". For some reason it always goes to catch block. Kindly let me know how to debug the error, and figure out the urls that need unblocking if necessary.
I need to activate the profile setting forceDoubleSided in order to display properly a model derivated from a Revit project that has mirrored external references.
Using the latest version of the Forge Viewer, I set the profile settings in the config parameter when I call new GuiViewer3D(container, config) and, while the model is loading, the materials property "side" = 2 (THREE.DoubleSide) and it looks good.
The problem is when the model has loaded, or after have used the cutting plane extension, because the materials "side" is then reset to 0 (THREE.FrontSide) so the model stops looking correctly.
As a workaround, in the GEOMETRY_LOADED_EVENT and CUTPLANES_CHANGE_EVENT events I am executing _viewer.impl.setDoubleSided(true, _viewer.model) every time.
It seems like a bug in the viewer... is there a better approach to handle this problem?
That does sound like a bug. Let me notify the engineering team, and thanks for reporting it! For now, please continue manually overriding the "sidedness" as needed.
When I turn on the tablet mode or the phone mode in Chrome, I get a javascript error :
Uncaught TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite.
at HTMLHtmlElement.avp.disableTouchSafari (viewer3D.min.js:18)
I've just update Chrome to the last version.
Any idea?
This might an issue of Forge Viewer. Apologizing for any inconvenience caused.
I have logged a request LMV-3401 [Autodesk.Viewing.Private.disableTouchSafari() reports error while viewing model with Chrome DevTools' Device Mode in macOS] to our development team to allocate time to investigate. As it requires further exploration and possibly a modification to our Viewer, please make a note of this number for future reference.
You are welcome to request an update on the status of this request or to provide additional information on it at any time quoting this request number via forge.help#autodesk.com.
However, I think this error didn't affect main features of Viewer. At the meanwhile, I think a real mobile device will help you in this case since this error didn't show up while testing on my Ipad.
Cheers,
I have a Windows Phone 8.1 app with Google login, which uses the
GoogleWebAuthorizationBroker.AuthorizeAsync
method. 90 % of the time, the authentication works, however, occasionally, the app just crashes on this line (I am logging right before it, so I am sure). I have the call wrapped inside try - catch, but that doesn't seem to work - exception is never caught.
I am also sure I am calling the method on a UI thread, I am using the DispatcherHelper from MVVMLight for that.
The fact that I am not able to reproduce the crash complicates this a lot, I have not experienced it with debugger attached, only in Release mode, on target device, run locally.
Do you guys have any ideas / clues / pointers? I know I'm not providing a lot of information, but I don't have any..
EDIT> So the error now happened with debugger attached - and the app just froze, last message in Ouput window was
"WinRT information: Cannot get credential from Vault"
But that's normal behavior..