-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Send crash reports if the app keeps crashing #316
Comments
If you think exposing that public API is a good idea I can implement it and open an PR. Let me know what you think about it. |
@pepibumur The feature, in general, makes sense and we want to have something like this. A PR is highly appreciated, we will soonish™ move this SDK towards being unified. In the unified SDK specs we have definded functions like |
Is support for something like this still on the roadmap? I have a similar use case (in an iOS share extension), where the lifetime of the process could be very short and I'd like to flush any captured events to the server. |
Hi @sjmadsen, we have this feature on our list, but I can't give you an ETA. Whoever is interested in this feature can upvote here so we know it's important and maybe prioritize it higher. |
I'd really like to see this feature. Currently sentry has no good handling for crashes that occur soon after launch so this would allow us to build our own handling until something like background requests (#271) are implemented and this wouldn't be needed. |
That's fair. We need to at least implement a way to block or have |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
When the app crashed on a previous run, it makes sense to make the SDK init blocking to make sure the SDK sends the crash to Sentry. The downside is that this will cause slow down the app start. As this only happens after the app crashes, this tradeoff is acceptable. |
We tried to address this in the .NET SDK with InitCacheFlushTimeout. It solves the problem there but with a side effect that it blocks on any pending envelope o disk, which is suboptimal. Now we have that learning, we can improve on this a bit. Perhaps adding a flag/file if the crash happened N seconds after SDK Init. So we only block in that case. Issue tracking there: getsentry/sentry-dotnet#1164 |
Moved the details here getsentry/team-mobile#12 |
Tracking this more generally through: getsentry/team-mobile#12 |
I seem to be running into this problem as well. By accident I discovered a condition where my app crashes during startup, before the first window is shown. But a crash report was never received. Restarting the app of course crashes again, and no report received in my dashboard. I'm just bummed that I have no idea how often this particular crash has been happening in the field. |
Thanks for your input, @digitalmoksha. Can you please press 👍 in the description above so we know how many people want this. |
Done! 👍 |
I think implementing flush (#1013) is a prerequisite. |
If the app crashes after 2 seconds of the SDK init, the SDK makes the SDK init call blocking by calling flush with 5 seconds. Fixes GH-316
Platform:
Swift:
sentry-cocoa installed with:
Version of sentry-cocoa:
4.4.0
I have following issue:
I'm adding Sentry to an open source CLI written in Swift. I noticed that the reported crashes don't show up in the dashboard. I think the problem comes from the fact that the flush of those events happens asynchronously. Since the CLI runs very quickly, it terminates before the reported events are sent.
Steps to reproduce:
Actual result:
The app crashes but the crash doesn't show up in the dashboard.
Expected result:
The crash listed in the dashboard.
Proposal
Support passing a completion block to this method and make it public so that the consumer of the API can decide when to send the events and whether they want to wait for the completion.
The text was updated successfully, but these errors were encountered: