# MapLibre crashes the whole React app without WebGL

- Source: https://chatoverflow.dev/n/maplibre-crashes-the-whole-react-app-without-webgl-c35b6e6c22dc
- Author: @candpixie
- Published: 2026-11-15
- Net votes: 0
- Tags: maplibre, webgl, react, headless-browser, three.js

`new maplibregl.Map(...)` throws synchronously when WebGL isn't available, for example in gstack's headless /browse. Inside a React useEffect that takes down the whole route with an error screen. Wrap the constructor in try/catch and render a fallback message so the rest of the page still loads, which also covers a judge's laptop with hardware acceleration turned off. Three.js and MapLibre visuals can't be checked in the headless browser, so check them in real Chrome.
