New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating WebGL context #4927
Comments
You should share your system specs. (CPU, OS, Graphics card model, drivers version, browser...) |
AMD FX-4130, Win 7 build 7600, GeForce GTX 650 running 9.18.13.2018, Chrome 35.0.1916.153 m. |
Latest drivers? Tried on other browser? |
I mean, if things used to work and you haven't changed the code, it's probably something related to the OS, browser and/or graphic drivers... |
I think the latest dev channel Chrome on Windows is doing something funny after update. After updating just now, threejs can't create the webgl context on any example - was working fine right before the update. Chrome version 37.0.2054.2 dev-m (64-bit) chrome://gpu shows 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. Maybe this isn't the same issue but check this first if you see this issue after updating. |
Let me try that and get back to you. I saw this issue here as well - http://japhr.blogspot.in/2014/05/webgl-in-chrome-36-linux-is-not-working.html Thanks |
Now everything's back to normal. I guess things fixed themselves when Chrome updated ? Most people didn't face this issue, maybe only a handful. Still, Chrome should address problems like these. |
Restarting Chrome fixed this for me. |
still i have a problem after restarting chrome my chrome Version 37.0.2062.120 (64-bit)....please help me to resolve this problem. |
and its on ubuntu linux 13.04 |
Latest Chrome for linux is 39.0.2171.95. |
I have the same trouble (Error creating WebGL context.) with the latest version, 39.0.217.95 (64-bits) on Ubuntu 14.10. |
Sorry to resurrect this thread, but I have the same issue (error creating WebGL context, Cannot read property getExtension of null), Chrome 47.0.2526.106 (64), Ubuntu 15.10, nVidia Optimus on dedicated gpu (three.js doesn't run at all if I set it to integrated). I don't really care because I generally use Firefox, but other people might and it prevents me from testing with Chrome. |
Same issue here, on both Dev channel and Canary, it's been happening for weeks. three.js works on FF but not Chrome. Pretty big issue because I mainly use Chrome. Chrome 49.0.2609.0 canary (64-bit), 49.0.2593.0 dev-m (64-bit), Windows 8.1, nVidia Optimus |
In these situation it's best to check https://get.webgl.org/. If that page doesn't work, there is nothing three.js can do about it, and you should report the issue to Google/Chrome instead. |
Yeah it's broken there. Really strange that a problem like this would go
|
I would like to point out that on my Mac which has a switching Nvidia GPU, modifying its GPU switch behavior e.g. with gfxCardStatus is likely to cause Chrome to fail at creating the context until such time as you quit Chrome and re-open it. This is one way I am able to make the issue manifest on this particular machine. This is the type of issue that a logout/reboot can often address quite nicely. |
Yeah that's not the problem at all. It's been checked the whole time, the problem still persists even with the most recent Chrome Canary update and most recent NVIDIA drivers. |
This seems to have randomly happened after doing some intense testing of a Three.js app. One moment everything was rendering fine, now I can't load any WebGL contexts. Hardware acceleration is turned on in settings. However in chrome://gpu: Rasterization: Software only. Hardware acceleration disabled Any ideas? |
I'm also seeing this problem on Linux. Restarting Chrome does not fix it. |
I get the same error "Error creating WebGL context." on Chrome 50.0.2661.75 m (64-bit) /Windows 7. |
@JamesMilnerUK Same issue here, loaded a lot of collada models, froze the browser until it crashed and now I can no longer get a WebGL context. Closing/reopening Chrome didn't fix it. Were you able to find a resolution? Edit: Found a fix -- had to uncheck hardware acceleration, restart, recheck it and restart again |
Started from restarting Chrome and restarting Mac Mac - Chrome - Version 52.0.2743.116 (64-bit) - OK Mac - Chrome Canary - Version 55.0.2850.0 canary (64-bit) - FAIL
I tried
Still no luck... |
Canary? You should probably report the regression to the Chromium project. |
S**T!!! My Chrome auto updated - the stable is at 53.0.2785.101 and stopped working, so did I... EDIT: Bug Report: https://bugs.chromium.org/p/chromium/issues/detail?id=645390 |
I saw this error pop up in the error tracking system I use. In case it's helpful, here's the system info for the user that had a bug as captured by the tracker: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 And here is what the error tracker caught in the console:
|
That system info is missing the Graphics Card details to be fully useful. |
Graphics card: Intel HD Graphics 4000 1024 MB I was able to talk to the user that hit this error, and they passed along the graphics card info above. Hope that helps! Thank you! |
@kenrussell Is Intel HD Graphics 4000 baclkisted? Actually, is there a public list of blacklisted graphics cards? |
@mrdoob No, the Intel HD 4000's not blacklisted. Need the contents of about:gpu (plaintext is preferred, just copy/paste) to diagnose issues like this. If the card is blacklisted then the reason why will be described on that page. These two files describe which GPUs are blacklisted and which have driver bug workarounds applied. https://cs.chromium.org/chromium/src/gpu/config/software_rendering_list_json.cc https://cs.chromium.org/chromium/src/gpu/config/gpu_driver_bug_list_json.cc Note though that a refactoring is underway so these two files will likely be replaced by .json files in the same directory in the next week or two. See http://crbug.com/691703 . |
I have the same error... |
If it's any help to anyone looking at this from a different angle. I get this error when trying to mount a react component containing THREE bits and bobs when attempting to test it. I'm making it as not testable for the time being. |
@YoneMoreno I don't see a |
Why is this closed? It looks like a lot of people are still experiencing this issue. |
@nicolethenerd Unfortunately, there is nothing what we can do in the library. |
You could add a more helpful error message. Skimming through this thread, it's hard to get a sense of what the resolution actually was - people claim to have resolved this by changing a few different flags. If the solution is more complicated than can fit in an error message, having the message link out to a FAQ page that explains the problem and recommends which flags to set depending on your browser. |
If this is a common error that cannot be resolved by fixing the library, maybe add it to an FAQ section of the demo site? @nicolethenerd If I recall correctly, it was Chrome's hardware acceleration flag that needed to be turned on for my 2012 MacBook Pro. |
The graphics card is only one of the reasons why the context can't be created. We wouldn't want to add a message that could be misleading. Maybe we could start collecting reasons. |
However, we shouldn't recommend users disabling blacklisting. If these graphic cards have been blacklisted is due to bugs and/or security reasons. |
I saw this response when I had too many tabs with WebGL scenes open at the same time. |
Same error for me with GPU: NVidia 2080TI. |
This comment has been minimized.
This comment has been minimized.
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. EDIT: Actually I've ended up finding the WebGL canvas inside of the renderer (THREE.WebGLRenderer). I used the canvas method renderer.getContext().canvas and added webglcontextlost listener, which in turn called handleContextLost function with the init().
|
Had the same issue when React 18 (concurrent mode) with threejs. Chrome: Version 91.0.4472.124 (Official Build) (64-bit) |
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. Linux drivers) |
I am getting
Error creating WebGL context.
Uncaught TypeError: Cannot read property 'getExtension' of null
on http://threejs.org/examples and my website http://arefin.in ( r58 ).
chrome:// gpu / shows everything enabled.
What do you think is wrong ?
The text was updated successfully, but these errors were encountered: