getsentry / sentry-electron

The official Sentry SDK for Electron
https://sentry.io/
MIT License
224 stars 58 forks source link

The ANR worker only functions correctly on the first ANR #876

Open PayneFuRC opened 6 months ago

PayneFuRC commented 6 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Electron SDK Version

4.22.0

Electron Version

29.2.0

What platform are you using?

MacOS

Link to Sentry event

No response

Steps to Reproduce

  1. run the example app: https://gist.github.com/PayneFuRC/52c3ccb46d0a306d84600213c1e09cdb
  2. input some text, then the main process will be freeze.
  3. The anr info will be uploaded to sentry
  4. After resume, then input some text again, the main process will be freeze again
  5. The anr info will be not uploaded

Expected Result

The second ANR info will be uploaded

Actual Result

The second ANR info will not be uploaded

timfish commented 6 months ago

This is currently the expected behaviour.

Related: https://github.com/getsentry/sentry-javascript/issues/11160

Since the ANR worker does not run a full SDK, there is no event deduplication and we wanted to avoid sending unlimited events and using up quotas when the feature was first released.

I'll look into adding a setting to allow events to be sent.