-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Failed to execute 'shaderSource' on 'WebGLRenderingContext #6312
Comments
Seems to originate from:
(sorry, sourcemap is missing) |
WebGL v2 support doesn't matter, it's only v1 support that GL JS requires. Can you put together a minimal test case on jsbin.com that reproduces the issue? |
I've been trying to nail it down to something reproducible, but so far haven't been able to. I'll close this for now and re-open it if/when I find a better repro case |
I've run into this exact same error. Sentry trace here: https://sentry.io/share/issue/ea4f5bd78b1a4373b5fcfa3b6542a162/ Device is Chrome 56 on Android 6.0.1. |
Saw this on Chrome 68.0.3440 on Windows 10. If it helps at all, it seems that in this particular session, the user loaded the site, things went fine, then came back to it the next day and this error occurred. Right before the error it successfully made a call out for a font, so the site was somewhat responsive. |
Yesterday this issue started to pop up for me running our test suite in Puppeteer. It spins up a Chromium We're on MapboxGL version The exact error is:
|
We're also seeing it on Chrome 70 on Android 7. Here's is sentry error: https://sentry.io/share/issue/99ca1304d7504aebbd21e15060eccc69/ |
I'm also seeing this error quite a bit and I think that it results in users seeing road labels, but not the roads themselves. According to google analytics, most that experience the issue are on android. Here are some of the devices/browsers the issue has happened on: after android, the issue appears next most often on windows: |
I'm also having problems with this issue Chrome version: 70.0.3538 |
We are also having the same issue. This issue should be reopen. |
Also customers face this issue, on FF (59.0.0, 62.0.0, 63.0.0) tho. Mostly on Windows 7 machines. We're still using v0.44.1 of mapbox-gl-js.
|
We're having this issue on a variety of devices. It's accompanied by this warning
It's intermittent and will only affect some of the maps on a page. |
This issue has stopped for me, and as @elderph has pointed out, it was related to having to many WebGL contexts so the context was being ignored resulting in this error and a few others. This was due to re-initialising the map along with 2 other instances generating their own WebGL context when changing pages on our single page app. After pages being navigated to multiple times the browser would give the warning To address this I had to persist the map instance so that it wouldn't create a new instance when routing from page to page, to debug your own projects I'd recommend checking the number of WebGL contexts that are being created and try and reduce it and see if you still get this bug... #7332 |
can't mapbox reuse old context by itself? |
I'm having this error on a server side routed web page, where there is only one map on each page, so it cannot be the cause in my case. |
We have a similar use case as @hyperknot. Could too many tabs of the same page also cause this? |
@abelvarga in Chrome at least tabs are individual processes, they shouldn't effect each other in any way. In theory at least. |
@hyperknot, I can reproduce the |
@abelvarga that's a nice idea! So we can finally reproduce it! |
@hyperknot, but are these warnings and errors actually related? |
This will happen once you try and execute other methods on the map instance when the context is not there so you get |
@abelvarga I see, that your error is different. It might be something different, or it might be related as well, I don't know. |
@jordmccordgcv, you are right! I just tried to open our site ~15 times, and voila, there's the error too. The question is, can this be checked before trying to render the map, which should be done by mapbox-gl-js IMO. |
Also, the map renders fine after a few tabs are closed. Note: sometimes it might be glitchy afterward. Adding some details, not sure if they help. Relevant console logmapbox-gl.js:33 WARNING: Too many active WebGL contexts. Oldest context will be lost. (anonymous) @ mapbox-gl.js:33 mapbox-gl.js:33 WARNING: Too many active WebGL contexts. Oldest context will be lost. r._setupPainter @ mapbox-gl.js:33 2mapbox-gl.js:33 Uncaught TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'. at new ui (mapbox-gl.js:33) at io.useProgram (mapbox-gl.js:33) at io.clearStencil (mapbox-gl.js:33) at io.render (mapbox-gl.js:33) at r._render (mapbox-gl.js:33) at mapbox-gl.js:33 3mapbox-gl.js:33 Uncaught TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'. at new ui (mapbox-gl.js:33) at io.useProgram (mapbox-gl.js:33) at io.clearStencil (mapbox-gl.js:33) at io.render (mapbox-gl.js:33) at r._render (mapbox-gl.js:33) at mapbox-gl.js:33 ui @ mapbox-gl.js:33 io.useProgram @ mapbox-gl.js:33 io.clearStencil @ mapbox-gl.js:33 io.render @ mapbox-gl.js:33 r._render @ mapbox-gl.js:33 (anonymous) @ mapbox-gl.js:33 24WebGL: INVALID_OPERATION: texParameter: no texture bound to target 30WebGL: INVALID_VALUE: bufferSubData: buffer overflow 202[.WebGL-0x7fbb794b4200]GL ERROR :GL_INVALID_OPERATION : glDrawElements: bound to target 0x8893 : no buffer identity_reviews:1 WebGL: too many errors, no more errors will be reported to the console for this context. |
I'm having this issue as well, windows 10 vmware hosting CENTOS, on chrome |
We just noticed this issue in our production build from a user on Chrome 72.0.3626 running OSX 10.13.6 |
hi, is there any solutions on this ? the map is used a couple of times in iframes on the same page on the third-party sites |
I'm getting this with
|
@thunderkid can you give please more info how to reproduce it? how many tabs with mapbox are opened? what do you see after this error? is map broken? |
@Bravecow Hard to pin down I'm afraid - this is a problem that seems to occur inconsistently, and I've found it very hard to reproduce it in a predictable way. After a reboot, it generally occurs after I've opened and closed my application on around 6 tabs. I generally have about another 20 non-mapbox tabs open. My app is only generating ~200 circles on a single layer. I am now using Chrome 78, Windows 10, and mapbox-gl 1.2.1 (I can't upgrade mapbox-gl beyond 1.2.1 yet due to the jerkiness bug of #8701, but apparently 1.6.0 will fix that so after I've transitioned to that version I'll let you know if it's different.) I'm only seeing these errors logged in the developer console - the map appears to continue running fine.
Followed by repeated errors of the form:
|
I was able to reproduce this by triggering gl context loss just before a shader is created. In this case the map is already failing to render so the error is fairly harmless but I opened a PR to clean up the logs: #9017 |
We are seeing the following error in our client side error logging (eg real users are seeing this issue, but until recently I was unable to reproduce):
Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'.
I've just used testobject.com to test something unrelated, but managed to find a device that crashes with a "Rats WebGL hit a snag." error while trying to render our map. Initially it loaded fine, but when we added a marker on the map, it crashed with that UX message and in our client side error logging the shaderSource error showed up.
Reloading the site now crashes webgl each time, regardless of adding custom markers or not. Even just rendering the map seems to do it.
The device in question is a:
Motorola Moto E2
Android version: 5.1
API level: 22
Resolution: 540 x 960 (hdpi)
Screen size: 4.5"
CPU: ARM | dual-core | 1200 MHz
RAM: 1024 MB
Internal storage: 8192 MB
Model number: Moto E2
ID: Motorola_Moto_E2_real_us
Location: United States
I suspect it's not supporting the correct webgl bits, and indeed this is dubious:
from http://webglreport.com/?v=2
(alrhough v1 is supported)
But if I try the mapbox example to test if mapbox is supported, that map renders fine... so not sure what we are doing that might be causing this?
The text was updated successfully, but these errors were encountered: