Open rohan-deshpande opened 4 years ago
I guess there is an issue with puppeteer and headless chrome. Maybe this one https://stackoverflow.com/a/48063721/1190041?
Hmm, okay! Thanks for the link. What a shame, maybe that is fixed in a later version (since I'm using 1.10.0
, but I can't upgrade because of #240 - Are there any reasons why you think that might be happening?
I have not much insights than this. You may post issue in puppeteer repo
I'm wondering if I can use some sort of environment variable to stop it from entering the WebGL codepath when running postbuild
because really, I don't need it to attempt to try to do this when snapshotting. As long as when the site is accessed and the WebGL context can be created, things should be fine.
navigator.userAgent === 'ReactSnap'
may help
This did the trick! Thanks very much. Not sure if the bug should be closed because the error still happens, but maybe it's a Puppeteer issue. Might be handy to document it in the README perhaps?
Bug Report
Note I'm using
v1.10.0
because I kept getting #240 Myreact-scripts
isv2.1.8
Current Behavior THREE.WebGLRenderer: Error creating WebGL context.
Reproducible demo here
Expected behavior/code
react-snap
should build the static site without errorPossible Solution Use
react-snapshot
which works without error, but it isn't really supported anymore it seems.Additional context/Screenshots