Android uncaught exception

I am getting the impression that the Android Sentry SDK does not automatically catch and report uncaught exceptions. Is it so?

Hey Olivier,

We do setup an uncaught exception handler on Android. In addition, we write the events to disk so that they are replayed on the next launch. If this isn’t working it is definitely a bug and I’ll address it if we can re-create the issue.

Can you show me how you are initializing the client? If you are initializing it with the AndroidSentryClientFactory it should do what you expect:

Context ctx = this.getApplicationContext();
Sentry.init("dsn", new AndroidSentryClientFactory(ctx));

By using this you will register the uncaught exception handler and enable disk buffering of events.

Brett

Great. Maybe you can say so more explicitly in the documentation?

Did you see the Android guide here? https://docs.sentry.io/clients/java/modules/android/

Yes but I had overlooked the sentence “An UncaughtExceptionHandler is configured etc”.