Desktop crash reporting + diagnostics export#961
Merged
Conversation
- Sentry in the Electron main process, gated on a DSN baked in at build time (SENTRY_DSN env -> define). No DSN (local/dev/fork builds) means nothing is ever sent; native crash dumps are still written locally via crashReporter for the diagnostics export. - Sidecar stdout/stderr now persist to main.log under a 'sidecar' scope (previously terminal-only, so server crashes left no trace on disk). Unexpected sidecar exits after a successful boot are logged and reported with a bounded stderr tail. - render-process-gone / child-process-gone are logged locally and captured upstream; main-process uncaught errors land in main.log. - Export Diagnostics: app menu item + Settings-page button pack a redacted manifest (version, OS, paths, port - never passwords or ~/.executor data), recent logs, and crash dumps into a zip in Downloads and reveal it in the file manager. - publish-desktop.yml passes vars.SENTRY_DSN into the electron-vite build step.
…45193 # Conflicts: # bun.lock
…Problem - Renderer: the shared web bundle initializes browser error reporting only when the desktop preload bridge hands it a DSN at runtime — nothing is baked into the bundle, so executor web / self-host / cloud stay inert. Handled UI errors already route through reportError and are picked up by the global handlers. - Sidecar: env-gated init in the sidecar entry (DSN passed by the main process, desktop-with-DSN builds only). Captures uncaught exceptions and unhandled rejections in the server process. The CLI never sets the env vars, keeping executor web telemetry-free. - One runId per launch tags events from all three processes and is stamped into the diagnostics-zip manifest, so a user-sent zip and its Sentry events can be cross-referenced. - electron-log lines become Sentry breadcrumbs (file transport hook), so events arrive with recent log context. - 'Report a Problem…' menu item exports the diagnostics zip and opens a prefilled GitHub issue (version, OS, runId). Verified against a local fake ingest server: session/event envelopes received from all three SDKs (browser on boot, electron on forced sidecar SIGKILL with breadcrumbs attached, bun on forced bind failure). Compiled-sidecar smoke test passes with @sentry/bun bundled.
- DO_NOT_TRACK=1 (or true) disables crash reporting in all three processes — checked once in the main process, which is the single source of the renderer's and sidecar's reporting config. - When the sidecar dies under a live window the app now swaps the dead web UI for an in-window crash screen (data: URL, preload bridge intact) with Restart server / Export diagnostics actions. Restart drives the existing sidecar restart IPC and reloads the console. - New e2e desktop target + scenario: launches the real Electron app in a throwaway HOME via Playwright's electron driver, SIGKILLs the sidecar, asserts the crash screen, recovers via its Restart button, and asserts the healed sidecar is a new pid. Produces session.mp4 + per-step screenshots under e2e/runs/desktop/. Run with `npm run test:desktop` in e2e/ (needs a display).
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 303c8dc | Commit Preview URL Branch Preview URL |
Jun 12 2026, 12:21 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 303c8dc | Jun 12 2026, 12:22 AM |
Repo-level SENTRY_DSN was ambiguous next to cloud's own Sentry config; the variable now names its surface.
A recurring sidecar crash may already be fixed upstream — the crash screen gets a Check for updates button (reuses the menu update flow), and showing the screen quietly stages any available update so the install prompt appears on its own, mirroring the fatal-startup self-heal.
This was referenced Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crash reporting for the desktop app (Sentry, gated on a build-time DSN — local/dev builds send nothing), with
DO_NOT_TRACKhonored as the opt-out.desktope2e target driving the real Electron app (Playwright)The crash → restart flow, recorded by the e2e scenario: