From 7c3b76c1ee3c0d2dd79db8e9a26d5fcbd9898360 Mon Sep 17 00:00:00 2001 From: admin9webs Date: Fri, 10 Jul 2026 16:10:28 +0800 Subject: [PATCH] Add archived/electron-bundled-chromium-dll-fix --- .../SKILL.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 skills/archived/electron-bundled-chromium-dll-fix/SKILL.md diff --git a/skills/archived/electron-bundled-chromium-dll-fix/SKILL.md b/skills/archived/electron-bundled-chromium-dll-fix/SKILL.md new file mode 100644 index 0000000..d3f13c1 --- /dev/null +++ b/skills/archived/electron-bundled-chromium-dll-fix/SKILL.md @@ -0,0 +1,44 @@ +--- +name: electron-bundled-chromium-dll-fix +description: Fix Electron app bundled Chromium failing to launch on Windows due to missing DLLs +version: 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//chrome-win.zip`): +1. Find build number from `chrome-win/` directory's `chrome_debug.log` or commit hash +2. Download full zip, extract the 3 DLLs +3. 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 +1. Download matching Chromium version full archive +2. Copy 3 DLLs to bundled chromium directory +3. Remove `--disable-gpu` flag from spawn args (optional — now GPU works properly) +4. Add `diagnoseBrowserSearch()` function that checks: registry paths, known paths, DLL presence +5. Rebuild installer: `npm run build:win` + +## Verification +After build, check NSIS installer contains the DLLs: +```bash +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