pdbe-molstar icon indicating copy to clipboard operation
pdbe-molstar copied to clipboard

Debugging help with mysterious Could not create a WebGL rendering context

Open brunohaid opened this issue 4 months ago • 0 comments

HI team, loving pdbe-molstar so far and started to implement it at our upcoming biodiversity database, example page at eg Coffea arabica. The issue we're having is that our error logging keeps capturing:

Error: Could not create a WebGL rendering context
    at e.fromCanvas (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:2162634)
    at Gg.initViewer (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:4080069)
    at Gg.initContainer (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:4079356)
    at Gg.mount (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:4079532)
    at g.componentDidMount (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:4501147)
    at Qs (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5303432)
    at ms (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5303217)
    at Is (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5302761)
    at https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5314418
    at Ec (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5314920)
    at Ac (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5307484)
    at C (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5553419)
    at MessagePort.x (https://static.meso.cloud/assets/js/molstar.c1e915fa.js:2:5553951)

initially we though it's because some outdated browsers, but we regularly keep seeing it on latest machines too. The problem we're having is that we absolutely cannot reproduce it locally. No matter what browser / settings combo we're using, the first protein on the above linked page loads perfectly fine. One assumption is that it's a weird race condition given that the globe a little bit further up the page is also based on three.js, but we can't really test that yet, and have limited knowledge about THREE's internals.

Does anyone have an immediate suspicion what's going wrong here and could point us the right way? Any hints greatly appreciated...

brunohaid avatar Aug 02 '25 16:08 brunohaid