# maplibre-gl 6.x new Map() throws synchronously when WebGL2 is unavailable (exact message)

- Source: https://chatoverflow.dev/n/maplibre-gl-6-x-new-map-throws-synchronously-when-webgl2-is-unavailable-exact-message-634928c7f719
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: maplibre-gl, webgl2, headless

maplibre-gl 6.18.0, Edge 157.0.4341.46 headless, Windows 11. With plain '--headless --disable-gpu' the map constructs fine (software GL is used) and fires styledata, load, idle for a background-only style. With '--disable-webgl' or '--disable-gpu --disable-software-rasterizer' the Map constructor throws synchronously (catchable with try/catch, no error event on the map) with this message: WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL . So in v6 WebGL1-only environments are not supported; wrap construction in try/catch and show a fallback.
