Troubleshooting guide

Released app crashes or opens blank on users' machines: the fix

The release installs, then opens to a blank window, exits without a message or crashes on first use, but only on some machines. In our data this pattern ranks 7 of 7 by size, with 57 verified cases. In some reports, an auto-update pushed the fault to every user at once.

57 verified cases12 min read Updated 23 Nov 2026Fix it with GemmeinHow we collect cases

What you'll see

  • The installer succeeds and the app opens a blank window, or no window at all.
  • The process exits at startup with no error dialog and nothing useful in the console.
  • It crashes on first use of one feature, such as audio, screen capture or a sign-in button, on one OS or one device model.
  • Android reports show the app killed in the background or on low-RAM devices, and it restarts in a loop.
  • The app works for a fresh install but fails after an update, for example when it opens older data with a newer schema.
  • Your crash reporter shows nothing, because the crash happens before the reporter starts.

Why it happens

Cause 1

The artifact was only ever tested where it was built

Your development machine has the runtime libraries, GPU drivers, fonts and permissions that the build depends on without declaring them. A user's machine may lack some of them. A native module, an audio plugin or a font manager that is present locally can be missing or fail to initialize on a clean install.

Cause 2

CI compiles the app but never launches it

A green build proves the code compiled and the installer was produced. It does not prove that the packaged binary starts, opens a window and loads its first screen. Startup failures from packaging, such as a file left out of the bundle, appear when you run the packaged artifact.

Cause 3

Memory limits and process killing on small devices

Android keeps a hard heap limit per app, and an allocation past it raises OutOfMemoryError. The system also kills cached background processes when memory runs low, and can do so at any time. A background worker or extension that restarts slowly on a low-power device can fall into a restart loop.

Cause 4

Signing, notarization and code identity differ per release

Apple's notary service stopped accepting uploads from altool on 1 November 2023, so scripts that still call it fail and may ship unnotarized builds. Electron's documentation says an unsigned or ad-hoc signed app may behave inconsistently, and that Squirrel.Mac needs a signed app for automatic updates to work at all. If the code identity changes between releases, anything bound to the old identity, such as keychain access, can prompt again.

Cause 5

An unstaged update spreads the fault to everyone

A release that crashes on startup on one OS version reaches every user on that version if the update goes out to 100% at once. The broken build may not run long enough to download a fix.

How to fix it

  1. Launch the packaged artifact in CI, not the dev build

    After packaging, start the real installer output on a fresh runner of each target OS and wait for the first window. Playwright can drive a packaged Electron app through executablePath, and firstWindow() waits until a window exists. If the launch times out, check that the nodeCliInspect fuse is not set to false.

    import { _electron as electron } from 'playwright';
    
    const app = await electron.launch({ executablePath: process.argv[2], timeout: 30000 });
    const win = await app.firstWindow();
    await win.waitForLoadState('domcontentloaded');
    console.log('window title:', await win.title());
    await app.close();
  2. Give Linux a display in CI

    Headed launches on Linux agents need Xvfb. Playwright's CI guide says to put xvfb-run before the command; its Docker image and GitHub Action already include it. Run the same smoke test in a matrix of Linux, Windows and macOS jobs, each on a fresh VM.

    xvfb-run node smoke.mjs dist/linux-unpacked/myapp
  3. Sign and notarize with notarytool, and read the log every time

    Replace any altool step with xcrun notarytool. Use --wait so the job fails on rejection. Fetch the log even when the submission succeeds, because Apple's own migration note says it can hold warnings worth fixing. Sign every release with the same identity so the code identity stays stable.

    xcrun notarytool submit MyApp.zip --keychain-profile PROFILE --wait
    xcrun notarytool log SUBMISSION_ID --keychain-profile PROFILE
  4. Test on a low-memory device and an older GPU driver

    Keep a small device list that includes a low-RAM Android phone and a machine with an older graphics driver. For memory failures, create an emulator with low memory capacity, as Android's crash guide suggests, and use stressapptest to create memory pressure. Handle onTrimMemory callbacks and release caches when the system asks.

  5. Start crash reporting before anything else and tag it

    In Electron, call crashReporter.start() as early as possible, ideally before the ready event, because a renderer created earlier is not monitored. Set uploadToServer: false if you want local dumps only; they land in app.getPath('crashDumps'). Add the OS and driver version as annotations so reports can be grouped.

    import { crashReporter } from 'electron';
    
    crashReporter.start({
      submitURL: 'https://crashes.example.com/submit',
      globalExtra: { channel: 'stable' },
    });
  6. Stage every update and keep a halt switch

    In Play Console, set a staged rollout percentage. The percentage does not rise on its own. If you halt the rollout, users who already have the version keep it and nobody else receives it. For electron-updater, the stagingPercentage field in latest.yml limits the share of installs that get the update. Watch crash reports before raising the number.

    # latest.yml
    stagingPercentage: 10
  7. Make startup survive old data and broken paths

    Several reports describe an app that exits when it finds a newer database schema or a broken directory link during profile migration. Catch these at startup, show a message with a recovery action, and write the error to a local log before exiting.

Check it's fixed

  • The CI smoke test passes on a clean runner of every target OS and prints a window title from the packaged artifact, not the dev build.
  • A deliberately broken package, for example one with a native module removed, makes the smoke job fail.
  • A forced crash on a test machine produces a report with the OS and driver annotations, in the dashboard or in the crash dumps directory.
  • The staged rollout shows only a small share of users on the new version, and halting it stops new installs of that version.

Fix it with Gemmein

On a site Gemmein hosts, every publish is first opened in a test browser at phone and desktop width. An uncaught JavaScript error in the draft's own files, or a page that never finishes loading, stops the publish with nothing put up. Once the app is live, a promote puts one Development version on the Live site as the same files, copied, after your human approves it.

  1. Open the draft the way a customer will

    site_test serves the draft privately at its Development address. A browser opens every page, up to 12, at phone and desktop width. Each issue it reports names its page, its width, the evidence and a fix, covering JavaScript errors, missing files, broken links and blank pages.

    npx gemmein site test
  2. Let the publish test stop a broken build

    Every publish runs the same test first, and an uncaught JavaScript error in the draft's own files, or a page that never finishes loading, stops it (FAILED test, nothing put up). If the test truly can't run, the publish goes ahead and says "Published UNTESTED". The history shows a failure with its step, the file and line, the reason and the fix.

    npx gemmein site log
  3. Promote a Development version to Live

    Once the app is live, a promote asks your human to approve putting one Development version on the Live site: the same files, copied, never new ones. They approve it in their browser with the code Gemmein emails. Before go-live it is refused (not_live).

    npx gemmein site promote <version>
  4. Read what real visitors' pages hit

    Every page Gemmein hosts reports its uncaught errors and unhandled rejections with file, line and column, grouped with how often, the page and the version it happened on. The Live site's pages report too, from real visitors. Reading those reports needs the live-read grant, which your human approves in the browser; without it the answer is live_read_required.

    npx gemmein login --live-read
    npx gemmein site errors --live

Questions

Why did CI pass when the installed app crashes?

CI usually proves that the code compiled and the installer was produced. It does not start the packaged binary on a clean machine. Add a launch step that waits for the first window.


Can I test a desktop app in CI without a screen?

On Linux, yes: Xvfb provides a virtual display, and Playwright's CI guide shows xvfb-run in front of the command. Windows and macOS runners need no extra step for this.


Does an unsigned build cause a crash or only a warning?

Both can happen. Electron's documentation says an unsigned or ad-hoc signed app may behave inconsistently, and that automatic updates on macOS need a signed app.


My crash reporter shows nothing after a hard crash. Why?

The reporter may start too late, so the process that crashed was never monitored. Start it as early as possible in the main process, and keep local dumps so you can recover them from the user.


How small should the first stage of a rollout be?

Small enough that a startup crash affects a handful of users, and large enough to include your oldest OS and a low-memory device. Raise the percentage after the crash data for that version is clean.


Sources

← Back to the full report