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

Crash events are being sent with the wrong release version if being sent after the user upgrades the app #679

Closed
3 tasks done
yuval-sentry opened this issue Jun 2, 2023 · 3 comments · Fixed by #683
Closed
3 tasks done

Comments

@yuval-sentry
Copy link
Member

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Electron SDK Version

4.1.2

Electron Version

19.1.9

What platform are you using?

MacOS

Link to Sentry event

No response

Steps to Reproduce

  1. Trigger a crash for app version X
  2. Upgrade your app to version X + 1
  3. Reopen the app and let the event be sent to Sentry

Expected Result

  1. Check if the event is being reported in the right version
  2. Check if the sourcemaps for the crash event are being pulled for version X

Actual Result

A crash event that happened on version X shows to happen on version X+1 and the sourcemaps for that couldn't be found.

@timfish
Copy link
Collaborator

timfish commented Jun 5, 2023

I'm not sure what we can do to improve this.

Main process native crashes are reported on the next app start because they cause the app to exit. The only way we know that they've even occurred is that we find a minidump file on app start.

Maybe we could store the release somewhere and compare it to the current release before sending...

@nikitakot
Copy link

nikitakot commented Jun 9, 2023

@yuval-sentry
As a workaround you can set a correct client version in the dump metadata using crashReporter electron API:

crashReporter.addExtraParameter('dump-client-version', app.getVersion());

This way the version will be saved in the dmp file itself and it's visible in the Sentry UI, however it's not quarriable as tags.

Also maybe @timfish you can use the same dmp metadata before sending the event on the restart. Just an idea.

@timfish
Copy link
Collaborator

timfish commented Jun 9, 2023

We already persist scope from the previous session so it wasn't complicated to also persist the release/environment too and override these before sending the event.

I've got a PR for this, I just need to work out what's causing some tests to start failing.

#683

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants