zed-industries/zed · error

No browser graphics backend could be initialized. Only {back

Error message

No browser graphics backend could be initialized. Only {backend_name} was tried because the application requested it explicitly. {backend_name} failure: {error:#}

What it means

Error "No browser graphics backend could be initialized. Only {backend_name} was tried because the application requested it explicitly. {backend_name} failure: {error:#}" thrown in zed-industries/zed.

Source

Thrown at crates/gpui_web/src/platform.rs:256

                    log::warn!(
                        "WebGPU initialization failed; falling back to WebGL2: {webgpu_error:#}"
                    );

                    let webgl_canvas =
                        WebWindow::prepare_canvas(browser_window).map_err(|error| {
                            anyhow::anyhow!(
                                "WebGPU initialization failed: {webgpu_error:#}. \
                             Failed to prepare a replacement canvas for WebGL2: {error:#}"
                            )
                        })?;
                    match WgpuContext::new_web(&webgl_canvas, WebBackendPreference::WebGl).await {
                        Ok(PreparedWebGraphics { context, surface }) => {
                            Ok((webgl_canvas, context, surface))
                        }
                        Err(webgl_error) => {
                            let canvas: &web_sys::Element = webgl_canvas.as_ref();
                            canvas.remove();
                            Err(anyhow::anyhow!(
                                "No browser graphics backend could be initialized. \
                                 Tried WebGPU, then WebGL2. \
                                 WebGPU failure: {webgpu_error:#}. \
                                 WebGL2 failure: {webgl_error:#}"
                            ))
                        }
                    }
                }
            }
        }
        WebBackendPreference::WebGpu | WebBackendPreference::WebGl => {
            let backend_name = if preference == WebBackendPreference::WebGpu {
                "WebGPU"
            } else {
                "WebGL2"
            };
            let canvas = WebWindow::prepare_canvas(browser_window)?;
            match WgpuContext::new_web(&canvas, preference).await {

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Report both the exclusive backend name and {error} so users know exactly which single backend was tried
  2. Suggest switching the explicit preference to Auto to allow the other backend as fallback
  3. Check browser flags/settings for the chosen backend (WebGPU enablement or WebGL2 availability)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/gpui_web/src/platform.rs:256 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/2732177b7dbade46. Report an issue: GitHub.