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…
asked Jan 17, 2019 at 9:16
if you have two GPU installed on your system you might want to try to enable
Override software rendering list
in chrome://flags/
answered Jan 13, 2021 at 14:12
repyrepy
1491 silver badge7 bronze badges
2
I’ll leave this here for anyone else apparently it’s a browser and graphic card issue
mrdoob: The graphics card is only one of the reasons why the context
can’t be created
https://github.com/mrdoob/three.js/issues/4927
This seems to be why unless anyone else has any other ideas…
The issue is on going and not fixed it would be interesting to know why this happens though and why opening dev tools and refreshing resolves the issue for me.
EDIT-
Apparently for me this was due to my graphic card being blacklisted because it’s old.
answered Jan 17, 2019 at 9:39
user3112634user3112634
4654 gold badges10 silver badges24 bronze badges
2
The fix for me was manually enabling WebGL acceleration under Chrome’s feature flags: chrome://flags/
answered Mar 26, 2021 at 8:16
I have encountered this several times with THREE.js. It arises for me once memory resources are shared, abandoned, or overwhelmed, for example:
- I have a good render loop but then I introduce long tasks.
- I perform extensive, continuous testing. As I modify live settings in Chrome Inspector, THREE does not reflect all changes without fail. Memory may not be released until I restart.
- I leave the program running overnight. The next morning the browser is froze, black, OOM…
- I use multiple instances of a resource, for example
Web Audio and Magenta Music. The quality may perceptibly degrade and
throw its own errors, but… I will also encounter worse silent
errors. For example when I also steam music in another tab, or click
audio/video media on Twitter… frozen browser, black screen, WebGL
context loss.
answered Jul 13, 2021 at 14:02
I just wanted to comment that I saw this due to other unrelated errors in my app that got thrown first.
answered Jan 20, 2021 at 16:57
Kyle BakerKyle Baker
3,2572 gold badges24 silver badges32 bronze badges
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.
answered Nov 5, 2021 at 23:57
HRK44HRK44
2,1421 gold badge11 silver badges29 bronze badges
This was resolved for me by simply installing the latest and restarting my browser — thought I’d add it here to hopefully save some future soul from wasting an hour like i did.
answered Apr 13, 2021 at 15:49
jaredjared
6439 silver badges19 bronze badges
1
Error creating webGL Context in three.js.min ver 93
I had the same problem with Chrome version 104.5112.102 and managed to fix it by going to Chrome, Settings, and switching off the
Use hardware acceleration when available.
the graphics card is an old GE Force 8600 card running on Windows 10.
answered Aug 25, 2022 at 8:39
For me, I restarted my computer and the error did not appear again. You can try doing this before you do anything more complicated.
answered Sep 16, 2022 at 7:11
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
Closed
arefin86 opened this issue
Jun 15, 2014
· 66 comments
Closed
Error creating WebGL context
#4927
arefin86 opened this issue
Jun 15, 2014
· 66 comments
Comments
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 ?
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.
Things were fine about a week ago. Been running my website since May 2013.
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)
Windows 8.1 64-bit
ATI Radeon HD 6800 series
ATI Driver Packaging Version 14.10.1006-140417a-171099C
chrome://gpu shows
«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)GoogleChromeApplication) 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.
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.
I guess you can close this issue.
Thanks
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
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.
Make sure this option is selected in your chrome settings.
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
Canvas: Software only, hardware acceleration unavailable
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.
The driver should be fine since I do not have any problem loading the same page in Firefox.
@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
THREE.WebGLRenderer: Error creating WebGL context.WebGLRenderer @ three.js:19571
Uncaught TypeError: Cannot read property 'getExtension' of null
at Object.get (three.js:16906)
at new WebGLRenderer (three.js:19577)
at init ((index):59)
at (index):54
case 'WEBGL_depth_texture':
extension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );
break;
I tried chrome://flags/ and enabled this one:
WebGL Draft Extensions Mac, Windows, Linux, Chrome OS, Android
Enabling this option allows web applications to access the WebGL Extensions that are still in draft status.
Still no luck…
Canary? You should probably report the regression to the Chromium project.
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
OS: Mac OS X 10.12.3
Browser: Chrome 56.0.2924
And here is what the error tracker caught in the console:
THREE.WebGLRenderer 84
THREE.WebGLRenderer: Error creating WebGL context.
TypeError: Cannot read property 'getExtension' of null
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?
I have the same error…
It seems as Intel HD 2000 is blacklisted in Chrome 58.0.3029.81 (64-bit), Ubuntu 14.04
I set chrome://flags/ —ignore-gpu-blacklist ; and it works fine.
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.
fand
mentioned this issue
Sep 25, 2017
@YoneMoreno I don’t see a Error creating WebGL context. in your issue. What makes you think you’re having this same issue?
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 Version 72.0.3626.121 (Official Build) Arch Linux (64-bit). Works with Firefox 65.0.1 on the same OS.
GPU: NVidia 2080TI.
Make sure this option is selected in your chrome settings.
After relaunching the chrom setting, the WebGL works rightly as it does before.
Good answer.
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().
function handleContextLost() {
event.preventDefault();
cancelAnimationFrame(requestId)
init();
}
canvas.addEventListener("webglcontextlost", handleContextLost, false)
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)
Repository owner
locked as resolved and limited conversation to collaborators
Jul 5, 2021
Содержание
- Error creating WebGL context во всех браузерах
- 1 ответ 1
- Похожие
- Подписаться на ленту
- Error creating WebGL context. Three js chrome?
- 9 Answers 9
- Ошибка создания контекста WebGL. Три js хрома?
- Ошибка создания контекста WebGL. Три js хрома?
- Object with three.js WebGLRenderer importing error #3905
- Comments
Error creating WebGL context во всех браузерах
WebGL отказывается работать на компьютере. Пробовал разные браузеры, проверял на различных сайтах, например, здесь
«It doesn’t appear your computer can support WebGL.»
Браузеры обновлены. Драйвер на видеокарту обновлен.
Результат тот же. В чем может быть причина?
Видео: ATI Radeon HD 3600 Series
Пробовал браузеры: Opera, Google Chrome, Firefox.
ОС: Windows 7.
Кстати, месяц назад все работало.
1 ответ 1
Если Вы пользуетесь Google Chrome, то запустите его с параметром —ignore-gpu-blacklist . Чтобы определить этот параметр, правой кнопкой мышки кликните на значке браузера Chrome и выберите пункт Properties (Свойства) в контекстном меню. Добавьте обозначенный параметр в конец командной строки в поле Target (Объект). После этого Chrome всегда будет запускаться с данным параметром.
Если вы пользуетесь браузером Firefox, введите в адресной строке about:config . Браузер выведет предупреждение: «This might void your warranty!» («Будьте осторожны, а то лишитесь гарантии!»). Щёлкните на кнопке «I’ll be careful, I promise!» («Я обещаю, что буду осторожен!»). Введите webgl в текстовое поле с подписью Search (Поиск) или Filter (Фильтр), после чего Firefox оставит в списке только параметры, имеющие отношение к WebGL. Дважды щёлкните на параметре webgl.force-enabled, чтобы его значение изменилось с false на true .
Похожие
Подписаться на ленту
Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.1.14.43159
Нажимая «Принять все файлы cookie» вы соглашаетесь, что Stack Exchange может хранить файлы cookie на вашем устройстве и раскрывать информацию в соответствии с нашей Политикой в отношении файлов cookie.
Источник
Error creating WebGL context. Three js chrome?
Hi I’m getting the error
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.
9 Answers 9
if you have two GPU installed on your system you might want to try to enable Override software rendering list in chrome://flags/
I’ll leave this here for anyone else apparently it’s a browser and graphic card issue
mrdoob: The graphics card is only one of the reasons why the context can’t be created
This seems to be why unless anyone else has any other ideas. The issue is on going and not fixed it would be interesting to know why this happens though and why opening dev tools and refreshing resolves the issue for me.
EDIT- Apparently for me this was due to my graphic card being blacklisted because it’s old.
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:
- I have a good render loop but then I introduce long tasks.
- I perform extensive, continuous testing. As I modify live settings in Chrome Inspector, THREE does not reflect all changes without fail. Memory may not be released until I restart.
- I leave the program running overnight. The next morning the browser is froze, black, OOM.
- I use multiple instances of a resource, for example Web Audio and Magenta Music. The quality may perceptibly degrade and throw its own errors, but. I will also encounter worse silent errors. For example when I also steam music in another tab, or click audio/video media on Twitter. frozen browser, black screen, WebGL context loss.
Источник
Ошибка создания контекста WebGL. Три js хрома?
Привет, я получаю сообщение об ошибке
Это происходит в Google Chrome 71, но мне это кажется странным, потому что если я открою инструмент разработчика и обновлю страницу, он будет работать отлично. Я не понимаю, что вызывает эту идею?
Он работал отлично, до сегодняшнего дня ничего не изменилось ни на ПК, ни в браузере. У меня все драйверы в актуальном состоянии, включен webgl .
Я оставлю это здесь для всех, очевидно, это проблема браузера и видеокарты.
mrdoob: The graphics card is only one of the reasons why the context can’t be created
Кажется, поэтому, если у кого-то еще нет других идей . Проблема продолжается и не решена, было бы интересно узнать, почему это происходит, и почему открытие инструментов разработчика и обновление решают проблему для меня.
РЕДАКТИРОВАТЬ- По-видимому, для меня это было из-за того, что моя графическая карта была внесена в черный список, потому что она старая.
Я получаю эту ошибку в Chrome: «THREE.WebGLRenderer: Ошибка создания контекста WebGL». но он отлично работает в Firefox.
То же самое. Прекрасно работает в Firefox, а не в Chrome. Старый Macbook Pro со встроенной графикой, но никогда раньше не было проблем ..
если в вашей системе установлено два графических процессора, вы можете попробовать включить Переопределить список программного рендеринга в chrome: // flags /
Это сделало это для меня! У меня нет 2 GPU, я просто запустил хром в виртуальной машине Debian, и это решило проблему!
Это сделало это для меня! Теперь Pixlr работает.
Я просто хотел прокомментировать, что увидел это из-за других несвязанных ошибок в моем приложении, которые были выброшены первым.
Для меня исправлением было включение ускорения WebGL вручную с помощью флагов функций Chrome: chrome: // flags /
Это было решено для меня, просто установив последнюю версию и перезапустив свой браузер — подумал, что добавлю его сюда, чтобы, надеюсь, спасти какую-то будущую душу от потери часа, как я.
Устанавливаете последнюю версию Chrome?
Я сталкивался с этим несколько раз с THREE.js. Это возникает у меня, когда ресурсы памяти разделяются, заброшены или перегружены, например:
- У меня есть хороший цикл рендеринга, но затем я представляю длинные задачи.
- Я провожу обширное непрерывное тестирование. Когда я изменяю живые настройки в Chrome Inspector, THREE не обязательно отражает все изменения. Память может не высвободиться, пока я не перезапущусь.
- Я оставить программу включенной на ночь. Наутро браузер завис, черный, ООМ .
- Я использую например несколько экземпляров ресурса Веб-аудио и пурпурная музыка. Качество может заметно ухудшиться и выкидывать свои ошибки, но . еще встречу и похуже тихих ошибки. Например, когда я играю музыку в другой вкладке или нажимаю аудио / видео в Twitter . зависший браузер, черный экран, WebGL потеря контекста.
Я обновил свои графические драйверы (NVIDIA) и не перезапускал ни Chrome, ни компьютер, и у меня возникла эта проблема.
Я только что перезагрузил компьютер, и теперь все в порядке.
Источник
Ошибка создания контекста WebGL. Три js хрома?
Привет, я получаю сообщение об ошибке
Это происходит в Google Chrome 71, но мне это кажется странным, потому что если я открою инструмент разработчика и обновлю страницу, он будет работать отлично. Я не понимаю, что вызывает эту идею?
Он работал отлично, до сегодняшнего дня ничего не изменилось ни на ПК, ни в браузере. У меня все драйверы в актуальном состоянии, включен webgl .
Я оставлю это здесь для всех, очевидно, это проблема браузера и видеокарты.
mrdoob: The graphics card is only one of the reasons why the context can’t be created
Кажется, именно поэтому, если у кого-то еще нет других идей . Проблема продолжается и не исправлена, было бы интересно узнать, почему это происходит, хотя и почему открытие инструментов разработчика и обновление решают проблему для меня.
РЕДАКТИРОВАТЬ — По-видимому, для меня это было связано с тем, что моя графическая карта была внесена в черный список, потому что она старая.
если в вашей системе установлено два графических процессора, вы можете попытаться включить список программной рендеринга Override в chrome: // flags /
Исправлением для меня было включение ускорения WebGL вручную с помощью флагов функций Chrome: chrome: // flags /
Я просто хотел прокомментировать, что увидел это из-за других несвязанных ошибок в моем приложении, которые были выброшены первым.
Это было решено для меня, просто установив последнюю версию и перезапустив свой браузер — подумал, что добавлю его сюда, чтобы, надеюсь, спасти какую-то будущую душу от потери часа, как это сделал я.
Я сталкивался с этим несколько раз с THREE.js. Это возникает у меня, когда ресурсы памяти разделяются, заброшены или перегружены, например:
- У меня есть хороший цикл рендеринга, но затем я предлагаю длинные задачи .
- Я провожу обширное непрерывное тестирование. Когда я изменяю текущие настройки в Chrome Inspector, THREE не обязательно отражает все изменения. Память может не освободиться, пока я не перезапущусь.
- Я оставляю программу включенной на ночь. Наутро браузер завис, черный, ООМ .
- Я использую несколько экземпляров ресурса , например Web Audio и Magenta Music. Качество может заметно ухудшаться и выдавать собственные ошибки, но . Я также буду сталкиваться с более серьезными тихими ошибками. Например, когда я использую музыку в другой вкладке или щелкаю аудио / видео в Twitter . зависший браузер, черный экран, потеря контекста WebGL.
Источник
Object with three.js WebGLRenderer importing error #3905
- jest version: 20.0.4
- node version: 8.0.0
- yarn version: 0.21.3
- npm version: 5.0.3
Do you want to request a feature or report a bug?
It may be a bug.
What is the current behavior?
I created a class with a render function and set a Three.js renderer in it. like below:
there is no error when run jest .
What is the expected behavior?
I want to abstract this property to a default value of this class. like below:
but there is a error occur when I run jest (include jest —no-cache , jest —env=jsdom ):
This might because there is no WebGL context in test environment, So how to fix it?
- refrence: openwisp/netjsongraph.js@552cceb#commitcomment-22709412
The text was updated successfully, but these errors were encountered:
I believe this is more like a feature request.
The jsdom environment does not have webgl context. If your tests are focus on scripts rendering data rather than other scripts, you better chose those test framework that run in browser.
So you need to mock those functions that need render context or send data to render context, and focus on other parts of scripts.
Источник











