1.9 KiB
1.9 KiB
name, description, version
| name | description | version |
|---|---|---|
| electron-bundled-chromium-dll-fix | Fix Electron app bundled Chromium failing to launch on Windows due to missing DLLs | 1.0 |
Fix: Bundled Chromium Missing DLLs on Windows
Problem
Electron apps bundling Chromium (for CDP/browser automation) fail to launch on Windows. The process crashes silently with no error output. Root cause: GPU-related DLLs were removed to reduce installer size, but Chromium requires them even with --disable-gpu.
Missing DLLs
These 3 DLLs must be present alongside chrome.dll in the bundled Chromium directory:
D3DCompiler_47.dll(~4.9MB)libEGL.dll(~494KB)libGLESv2.dll(~8.2MB)
Source
Download from Chromium for Windows release (e.g. https://storage.googleapis.com/chromium-browser-snapshots/Win/<build>/chrome-win.zip):
- Find build number from
chrome-win/directory'schrome_debug.logor commit hash - Download full zip, extract the 3 DLLs
- Copy to
resources/chromium/in the Electron project
Key Insight
--disable-gpu is NOT sufficient. Chromium still loads these DLLs at startup for basic rendering pipeline initialization. Without them, the process exits immediately with no stdout/stderr.
Fix Steps
- Download matching Chromium version full archive
- Copy 3 DLLs to bundled chromium directory
- Remove
--disable-gpuflag from spawn args (optional — now GPU works properly) - Add
diagnoseBrowserSearch()function that checks: registry paths, known paths, DLL presence - Rebuild installer:
npm run build:win
Verification
After build, check NSIS installer contains the DLLs:
7z l dist/atomk-desktop-X.X.X-setup.exe | grep -E "D3DCompiler|libEGL|libGLESv2"
Context
- Project: AtomK-Desktop (hermes-desktop fork)
- Built with electron-builder, NSIS target
- Bundled Chromium path in app:
resources/chromium/ - Browser search priority: System Edge/Chrome → Known paths → Bundled Chromium