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
When Android capture unhandled exception, let the app do not crash immediately, but instead give sentry several seconds to upload exceptions to server #1643
Comments
we could work on it together with #1569 so we check that flag and if there was a crash in the last run, we could block the init till sending all the pending events, the downside is, we can slow down App's init and even cause an ANR, so this option should be opt-in by default. the other option and a bit more aggressive would be sending events in a different process, the downside is, it requires a bit more memory. |
@marandaneto My suggestion is on the shutdown procedure, not the startup of next run. See the reasons above for why I suggest this ;) |
@fzyzcjy yep I know, but the NDK integration doesn't have a transport that sends an event to Sentry, it only writes a file to the disk which is picked up on restart and sent it over to Sentry via the Java transport, otherwise we have to change quite a lot of things, but we'll take into consideration, whats the best approach and improve from there, thanks. |
@marandaneto We may treat the two differently. For android errors, it can be uploaded before shutdown; for ndk, need to upload the next time. You are welcome! |
@marandaneto The reason is that, it is much rare for android people to see ndk bugs compared with java bugs, so by adding this proposed feature, a major part (instead of minor part) can be benefited ;) |
We tackled this as part of #2277 - it does not cover all the cases, but just the first point in the original issue. Instead of blocking the main thread after a crash occurs, we are blocking it on the next app start if we encountered a startup crash in the previous run, allowing the app to upload events to Sentry. This will mitigate the recurrent startup crashes issue. As for the problem when the user never launches the app again, we'll tackle this as part of #598 if ever implemented. Hence, closing the issue |
Platform:
IDE:
Build system:
Android Gradle Plugin:
Sentry Android Gradle Plugin:
Proguard/R8:
Platform installed with:
The version of the SDK:
sentry-flutter 5.0.0
I have the following issue:
We know that (getsentry/sentry-dart#548), if a crash happens, the user have to start the app again in order to let sentry upload the event to server. However, consider the following two cases:
Proposal: show a dialog to user saying "bug occurred, please wait for several seconds", while sentry upload event to server in the backend. Instead of simply crashing and quit immediately.
Steps to reproduce:
Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: