Hi I'm getting the error
Error creating WebGL context.
Uncaught TypeError: Cannot read property 'getExtension' of null
This is happening on google chrome 71 but I find it odd because if I open up dev tool and refresh the page it works perfectly fine I'm at a loss to what is causing this any idea's ?
It's worked perfectly fine untill today nothing has changed on the PC or browser. My drivers are all up to date, webgl is enabled...
Failing to create a WebGL context is most of the times due to the graphics card being too old and/or the manufacturer no longer updating its drivers. Or the drivers not being reliable enough (ie.
Had the same issue when React 18 (concurrent mode) with threejs. Sorry, something went wrong. Failing to create a WebGL context is most of the times due to the graphics card being too old and/or the manufacturer no longer updating its drivers.
"WebGL: Unavailable. Hardware acceleration unavailable" It also shows that the --disable-gpu flag was passed to chrome.exe! Killing all chrome.exe processes and running by executing chrome.exe directly (in C:\Program Files (x86)\Google\Chrome\Application) seems to solve this. Check your shortcuts to ensure the flag isn't getting passed.
Make sure you're not calling the WebGL context initializer from a listener (e.g. try writing it within your init function with a boolean flag to stop it from looping or stating gl as global variable). The former worked for me and displays the context correctly.
The fix for me was manually enabling WebGL acceleration under Chrome’s feature flags: chrome://flags/
I have encountered this several times with THREE.js. It arises for me once memory resources are shared, abandoned, or overwhelmed, for example:
if you have two GPU installed on your system you might want to try to enable Override software rendering list in chrome://flags/
I updated my graphic drivers (NVIDIA) and didn't restart chrome nor the PC, and was having this issue.
I just restarted the PC and now it's fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With