You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently a user on Discord asked why a crash (throw null) right after SentryXamarin.Init wasn't captured on a Xamarin app.
The explanation is:
When you load the app for the first time, it inits Sentry and immediately crashes. Sentry, writes that crash data to a file (can't send it to Sentry before the app crashes). So when the app restarts, you Init Sentry again, and Sentry sees the file and tries to send. But since that's now blocking the app from launching, it only waits up to 1 second. If ti can't send it to Sentry before that, it lets the app continue to launch. But right after initing Sentry, it crashes again.
So it worked for me, but it might not work for you depending on the latency you have between the device and Sentry for example.
One way around this, is to configure how long you're OK with the SDK blocking the app lunch if it finds a crash file:
it will wait "up to 10 seconds" for a crash to be sent when the app restarts. The default is 1 second only I believe
You can also turn it off and if the app is just crashing right while opening up, it will just never capture that
Recently a user on Discord asked why a crash (
throw null
) right afterSentryXamarin.Init
wasn't captured on a Xamarin app.The explanation is:
Turns out this is actually documented here: https://docs.sentry.io/platforms/dotnet/configuration/options/#init-cache-flush-timeout
It could be beneficial for Xamarin particularly to get more information about this, since offline caching is
on
by default.The text was updated successfully, but these errors were encountered: