Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron process running multiple times after init sentry in main process #974

Closed
arjunByldd01 opened this issue Jun 5, 2024 · 4 comments

Comments

@arjunByldd01
Copy link

arjunByldd01 commented Jun 5, 2024

Steps to Reproduce

I implemented sentry using your doc

I created sentry.init.main and sentry.init.renderer file, and I added code that mentioned in doc for main and renderer. After this I imported these files in main and renderer process.

when I start my application it creates two tray icon. In other words it run my window creation process twice.
And on sentry it shows this error - Attempted to register a second handler for 'window-minimize'

Can you help me to understand what's this behaviour is

//sentry.init.main 
import * as Sentry from '@sentry/electron/main';
import { session } from 'electron';

Sentry.init({
  dsn: envConfig.SENTRY_DSN,
  debug: true,
  ipcMode: Sentry.IPCMode.Protocol,
  getSessions: () => [session.defaultSession, session.fromPartition('persist:my-session')],
});


import * as Sentry from '@sentry/electron/renderer';
//sentry.init.renderer

Sentry.init({
  integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],

  tracesSampleRate: 1.0,

  replaysSessionSampleRate: 0.1,
  replaysOnErrorSampleRate: 1.0,
});

I also run the wizard command mentioned in doc
command - npm install -g @sentry/wizard sentry-wizard --integration electron

Expected Result

It should not run electron process twice

Actual Result

When I run my app it runs all my electron process twice and also created two tray icon for my app.

Additional Info

No response

@getsantry
Copy link

getsantry bot commented Jun 5, 2024

Assigning to @getsentry/support for routing ⏲️

@arjunByldd01 arjunByldd01 changed the title Multiple Tray Icon after implementing sentry Electron process running multiple times Jun 6, 2024
@arjunByldd01 arjunByldd01 changed the title Electron process running multiple times Electron process running multiple times after init sentry in main process Jun 6, 2024
@mydea mydea transferred this issue from getsentry/sentry-docs Sep 6, 2024
@mydea
Copy link
Member

mydea commented Sep 6, 2024

Hey, I've transferred this issue to the sentry-electron repo.

@timfish could you take a look?

@timfish
Copy link
Collaborator

timfish commented Sep 6, 2024

@arjunByldd01 do you have a more complete example app that replicates this issue?

We've got extensive e2e tests where this doesn't occur and this issue has not been reported before so I suspect the issue is caused by code that has not been supplied!

@AbhiPrasad
Copy link
Member

Closing this for clean-up. Please re-open if it still applies. Thank you!

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants