WebGLRendering error using v4.9

1989
7
11-23-2018 12:46 PM
TommyBramble
New Contributor III

I recently updated my application from version 4.7 to 4.9. After the update my web map fails to load any feature layers and I get the following errors in the console:

ERROR TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'.
at a._loadShader (js.arcgis.com/4.9/esri/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js:211)

Oddly, the map will load successfully, without error, about 1 out of every 10 times (with no code changes).

Switching back to the 4.7 version and the map loads fine with no errors. 

I can post code if necessary (large application), but hoping someone has seen this issue and has a general solution.

0 Kudos
7 Replies
NicolasGIS
Regular Contributor

Hi,

I do have noticed that as well with 4.9 but for me features are drawn anyway and it occurs out of the blue after playing a long time with the map:

Uncaught TypeError: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'.
at t._loadShader (Program.js:25)
at t.initialize (Program.js:25)
at t.bindProgram (RenderingContext.js:25)
at t.drawGeometry (WGLGeometryBrushLabel.js:25)
at eval (WGLGeometryBrush.js:25)
at Object.n [as forEachIter] (iterator.js:25)
at t.draw (WGLGeometryBrush.js:25)
at eval (WGLTile.js:25)
at Array.forEach (<anonymous>)
at e.doRender (WGLTile.js:25)

I was not able to find a pattern... not always easy with WebGL...

0 Kudos
TommyBramble
New Contributor III

Thanks for confirming you have the issue too. For me, the features are not drawn when the error occurs.

My web map has about 8-10 feature layers with a small number of features in each layer. When I remove about half the layers the errors will occur less frequently. Again, switching back to 4.7 and I get no errors and all the layers will draw.

I've tried loading the layers in various ways to try to get around the issue like loading the layers one at a time instead of using the map.addMany(), but no luck.

Hoping for a solution soon (from troubleshooting myself or from the community) as we need to use some of the new api capabilities released with 4.9.

Thanks,

0 Kudos
NicolasGIS
Regular Contributor

Actually I noticed the same thing as you on an Android device I have, using Google Chrome. It fails right away and features are not drawn. On desktop, it is working fine. WebGL joy

TommyBramble
New Contributor III

Thanks again for confirming. I'm hoping an Esri developer sees this post and has some insights. I have not been able to resolve the issue. We are stuck at 4.7 until it's resolved.

0 Kudos
TommyBramble
New Contributor III

I upgraded to v4.10 and the issue is mostly gone.

Now the issue only occurs 1 out of 10 page loads instead of 9 out of 10 page loads. 

Again, no code changes, just changing the referenced API version between 4.7, 4.9, and 4.10.

0 Kudos
NicolasGIS
Regular Contributor

Yes better for me as well on desktop browers.

Unfortunalety, my android device did make it through this release. Now the map is not loaded at all stating that:

"WebGL support for high precision fragment shaders is required but not supported"

0 Kudos
TommyBramble
New Contributor III

A rep from Esri told our team to turn off the option to 'Use hardware acceleration when available' on the Chrome browsers and that should help with the issue.

Unfortunately, I don't think the mobile Chrome browser has the option.

This is not a great solution for us either, as we don't want to give instructions to the X number of users to adjust their browser settings.

0 Kudos