Skip to content

Unable to get renderer error events to send with @sentry/svelte (or sveltekit) in an Electron app using @sentry/electron under Vite #10665

@motiapp

Description

@motiapp

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/svelte

SDK Version

7.101.0

Framework Version

7.101.0

Link to Sentry event

No response

SDK Setup

I use a basic SDK setup just to get errors tracking in the Electron main process and preload process:

Sentry.init({
  dsn: import.meta.env.VITE_SENTRY_DSN,
  tracesSampleRate: 1.0,
});

And the same thing with browserTracingIntegration in the renderer:

Sentry.init({
  dsn: import.meta.env.VITE_SENTRY_DSN,
  integrations: [browserTracingIntegration()],
  tracesSampleRate: 1.0,
});

Steps to Reproduce

  1. Clone the example repo here
    https://github.com/motiapp/sentry-electron-vite-svelte-demo
  2. Create an .env file using the .env-example as a template and fill in values
  3. npm i && npm run dev
  4. click the Crash in Renderer button
  5. click the Crash in Main button

Expected Result

  1. The error 'Renderer crashes are fun' should be reported when clicking the Crash in Renderer button.
  2. The app will crash and 2 errors will occur when clicking the Crash in Main button: 'manual exception thrown in main' and a native process crash.

Actual Result

The renderer crashes will not be reported, only the main process crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions