Extension 'GL_EXT_frag_depth' not supported

I got error about "Extension 'GL_EXT_frag_depth' not supported" when run cesium sandcastle (the easiest example with only viewer) on mobile devices.

After investigation it seems error occurs only on Firefox and on certain mobile devices. Probably on devices with GPU (Mali) but it is only guess.

Look attached pictures with webgl report and error.

How I can catch that situation to prevent crash of application and be able to display information for user?

I tried viewer.scene._context._fragDepth but it gives me 'true'

This sounds like the browser is reporting that the extension is supported, but when trying to use it it crashes. It might be a bug with that version of Firefox.

Can you tell me if EXT_frag_depth shows up in your WebGL 1 tab on WebGL report? Also, does this demo also crash on the same devices?

http://potree.org/demo/potree_interpolation/lion.html

I tested your link on two devices:
Galaxy S7 edge - lion is not displayed
Xiaomi Redmi Note 5 - lion is visible

Also cesium is not working on Firefox on that Galaxy S7 Edge. On Xiaomi Red Note 5 Cesium is working (Firefox). Last time I checked it on several mobile devices and it wasn't work on Samsung devices. So I guess there is problem with hardware support.

Look at webglraport for both devices in attachments.

For me it seems that there is support in Firefox for that extension but it's crashing in runtime when it is compiled.

Tested on Firefox 65.0.1 version.

For now I need a way to catch that situation and avoid crash of application.

Any idea?

I think you might need to create a WebGL context and attempt to render with the extension, and try/catch/see if it succeeds, to determine if the browser correctly supports it regardless of whether it reports that it supports it.

I tried to avoid that solution but it seems that there is no other option.
Anyway thank you for your help.