{"record":{"id":"d56f166c840e22bb","repo":"remotion-dev/remotion","slug":"no-webgpu-adapter-available","errorCode":null,"errorMessage":"No WebGPU adapter available","messagePattern":"No WebGPU adapter available","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/effects/gpu-device.ts","lineNumber":30,"sourceCode":"\nexport const getGpuDevice = (): Promise<unknown> => {\n\tif (devicePromise) {\n\t\treturn devicePromise;\n\t}\n\n\tdevicePromise = (async () => {\n\t\tif (typeof navigator === 'undefined' || !('gpu' in navigator)) {\n\t\t\tthrow new Error('WebGPU is not available in this environment');\n\t\t}\n\n\t\tconst {gpu} = navigator as unknown as {\n\t\t\tgpu: {requestAdapter: () => Promise<unknown>};\n\t\t};\n\t\tconst adapter = (await gpu.requestAdapter()) as {\n\t\t\trequestDevice: () => Promise<unknown>;\n\t\t} | null;\n\t\tif (!adapter) {\n\t\t\tthrow new Error('No WebGPU adapter available');\n\t\t}\n\n\t\treturn adapter.requestDevice();\n\t})();\n\n\treturn devicePromise;\n};\n\n// Test-only: reset the cached device. Not exported from `remotion`.\nexport const _resetGpuDeviceForTesting = (): void => {\n\tdevicePromise = null;\n};\n","sourceCodeStart":12,"sourceCodeEnd":43,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/effects/gpu-device.ts#L12-L43","documentation":"After confirming navigator.gpu exists, getGpuDevice() calls requestAdapter() to obtain a hardware adapter. If the system returns null (no suitable GPU adapter available, drivers blacklisted, or WebGPU disabled at the OS/flag level despite the API being present), the promise rejects with this error. This is a hardware/driver-level failure beyond Remotion's control.","triggerScenarios":"Running on a machine whose GPU/driver is blocked by Chrome's blocklist (common on Linux with certain drivers, in some VMs, or when GPU acceleration is disabled), or in headless Chrome where the GPU adapter is unavailable.","commonSituations":"Headless/CI Linux without proper GPU drivers; VMs without GPU passthrough; Chrome launched with --disable-gpu; outdated or blocklisted drivers.","solutions":["Update GPU drivers and remove GPU blocklist overrides; ensure Chrome is not launched with --disable-gpu.","In headless, use --enable-unsafe-webgpu and a software adapter (SwiftShader) where available.","Fall back to a webgl2 effect when no adapter is available."],"exampleFix":"// launch headless chrome with webgpu + swiftshader\n// before: chrome --headless --disable-gpu\n// after:  chrome --headless=new --enable-unsafe-webgpu --use-gl=angle --use-angle=swiftshader","handlingStrategy":"fallback","validationCode":"const adapter = await navigator.gpu?.requestAdapter();\nif (!adapter) {\n  // no adapter: fall back to webgl2 backend\n}","typeGuard":null,"tryCatchPattern":"try {\n  const device = await getGpuDevice();\n} catch (e) {\n  if (String(e?.message).includes('No WebGPU adapter')) {\n    // fall back to a webgl2 effect\n  } else throw e;\n}","preventionTips":["Keep GPU drivers updated and avoid launching Chrome with --disable-gpu.","For headless/CI, use a software adapter (SwiftShader) and WebGPU flags.","Provide a non-WebGPU fallback path for environments without a usable adapter."],"tags":["effects","webgpu","environment","gpu","rendering","lambda"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}