Hi there, we’ve searched through the forums and documentation but can’t find anything that could be explaining our issue.
It’s not easy to reproduce, but our users are encountering an issue when trying to interact with our model in production. I’ve attached a screenshot below of the error message that’s rendered.
It seems to happen unexpectedly and usually after the model loads once. We’ve seen it happen when navigating away from the tab and coming back to it after a few minutes. There are no issues reported by the client/browser.
Is there a reason this could be happening? Any guidance would be appreciated.
A link to our model that’s causing issues can be found here: ShapeDiver
Just to be clear, does this issue happen only in your integration of the model using the viewer API, or also on the ShapeDiver platform directly? In the first case, can you reproduce the issue on a minimal page that we could have access to?
this is our error message when WebGL crashes and we are not able to restore it. Are you using any other WebGL context in this applications? Could there be something else that increases the load on the GPU?
We are attempting to load two sessions (for separate models) and two viewports on this page. The canvas element for the second model is not being rendered on this page, as we are still debating on how we would want to show it. Could that be causing the issue? Is there a better way we should be doing this?
Here’s the example code in react (we’re using nextjs):
so one thing would be for now to just not create the second viewport. As this one is not even shown no ones knows what could be happening there. Besides that there is not a lot I can do from my side. We are of course always looking into improving our error handling with WebGL, but we are restricted to the technology that is available to us.
If this happens again, please try to evaluate if other programs might have taken a lot of resources from the GPU (did you have other tools like GH open?), or if there are other external factors that could have created this situation.
I noticed that this issue is happening directly on the Shapediver website when viewing our model. I’ve found that to reproduce, the tab will need to be made idle (navigate away from it), and come back to it after a few minutes.
In response to your point here: so one thing would be for now to just not create the second viewport. As this one is not even shown no ones knows what could be happening there.
If we want to use two models and hide / show them based on the user preference, are you recommending that we use one viewport for each session?
Exactly, that is a local issue. This can occur on our platform or your application the same way. From our side, there is not much we can do besides trying to re-create the WebGL context. Due to browser limitations, unfortunatly, this cannot always be guaranteed.