[openstreetmap/openstreetmap-website] JS crash when WebGL is disabled (Issue #6240)
danielrainer
notifications at github.com
Thu Jul 24 14:29:39 UTC 2025
danielrainer created an issue (openstreetmap/openstreetmap-website#6240)
### URL
_No response_
### How to reproduce the issue?
The new vector tile layers (Shortbread, MapTiler OMT) use WebGL. WebGL is not available on all browsers (e.g. disabled for privacy). The code does not seem to be able to handle this and crashes with
```text
Uncaught Error: {"requestedAttributes":{"antialias":false,"preserveDrawingBuffer":false,"powerPreference":"high-performance","failIfMajorPerformanceCaveat":false,"desynchronized":false,"alpha":true,"depth":true,"stencil":true,"premultipliedAlpha":true},"statusMessage":"WebGL is currently disabled.","type":"webglcontextcreationerror","message":"Failed to initialize WebGL"}
```
This happens as soon as the "Layers" button is clicked, since that tries to render a bit of the map using each style as a preview. The previews of the Shortbread and MapTiler OMT layers just appear gray, and so does the main map if either of them is selected. The main map stays gray even when switching back to a raster layer, which needs a page reload to fix.
Tested on Librewolf 140 (with WebGL disabled, the default for this browser).
### Screenshot(s) or anything else?
Shortbread and MapTiler OMT in gray:
<img width="3598" height="1794" alt="Image" src="https://github.com/user-attachments/assets/e5f387b8-98e8-4379-a7ce-d3061ac01330" />
Whole map gray if Shortbread is selected:
<img width="3590" height="1794" alt="Image" src="https://github.com/user-attachments/assets/f609ae63-98f7-4b58-a496-4877484c89b2" />
Map stays gray even when switching back to the Standard layer:
<img width="3602" height="1786" alt="Image" src="https://github.com/user-attachments/assets/73c9ee82-abf4-42fd-b5cd-c016a3126599" />
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6240
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6240 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250724/31e26f81/attachment.htm>
More information about the rails-dev
mailing list