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

Avoid attempting to flush unhandled error reports in same session #902

Merged
merged 2 commits into from
Jul 17, 2020

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Jul 13, 2020

Goal

When an unhandled error is captured the process is usually about to terminate. Currently bugsnag attempts to send the request which can lead to a condition where a request is successfully sent but the process is terminated before the SDK can act on the response. This can lead to duplicate error reports on the relaunch of the app (and is theorised to cause flakes in the E2E tests).

Disabling this behaviour for unhandled errors will reduce the likelihood of these duplicate requests being sent. This excludes the following ANRs, because the process will not directly terminate and there's a good chance the request will be delivered in the same session.

Tests

Added unit tests to cover ANR calculations.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Jul 14, 2020

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1434.34 1363.72
arm64_v8a 365.78 293.16
armeabi 344.28 271.65
armeabi_v7a 327.08 254.44
x86 403.76 331.13
x86_64 386.44 313.81

Generated by 🚫 Danger

@fractalwrench fractalwrench marked this pull request as ready for review July 14, 2020 15:37
@fractalwrench fractalwrench force-pushed the unhandled-flush branch 3 times, most recently from a65addf to 3740c9c Compare July 16, 2020 09:01
@fractalwrench fractalwrench marked this pull request as draft July 16, 2020 09:02
@fractalwrench fractalwrench marked this pull request as ready for review July 16, 2020 10:48
@fractalwrench fractalwrench merged commit 8a9f497 into master Jul 17, 2020
@fractalwrench fractalwrench deleted the unhandled-flush branch July 17, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants