-
-
Notifications
You must be signed in to change notification settings - Fork 32
Provide a way to avoid installation of Sentry's default UncaughtExceptionHandlerIntegration #382
Comments
hey @techyourchance thanks for raising this issue, we definitely could improve things here, but there's a way of doing it. 1st, you'd need to disable the auto-init mode that uses a ContentProvider.
2nd, you'd need to remove the For that, you'd need to init Sentry manually:
The so this would work if you are removing an item from an ArrayList but using the correct approach, eg using an I'm just guessing here that you've tried something like this:
Basically you'd be removing the item that you are iterating and this would cause the issue. We feel your pain as this would be the first try of everyone, we'll document it properly, thanks. |
PR #384 is open with a proposal |
Thanks for acknowledging this issue. |
the SDK only iterates thru that list again after the callback is ran on I don't see how this could be possible. if it does, it's a bug but I can't reproduce it nor find it, my own assumption here is what I've posted in my previous comment. It'd be very helpful if you share with us a sample repro that we can reproduce this issue, I've tried and could not, it was only possible when I was not using an iterator. The decoration pattern for plugging a specific exception handler but still using Sentry is a good idea, we'll think about it, it might be useful, thanks for that. If you decide to init the SDK manually, you have full control of the default exception handler though, so it's up to you on which order you want to init the SDKs, you can achieve that without a single line of code on our end. Our auto-init function relies on |
It looks like Sentry always installs its own ExceptionHandler as default, even if I disable it in manifest and init in Application's onCreate(). As far as I can tell, there is no option to disable this functionality.
Use case:
I want to implement my own ExceptionHandler which will delegate to Android's default ExceptionHandler in some cases (without going through Sentry's one). However, since Sentry installs itself before I get a chance to grab Android's default, this use case can't be implemented.
What I tried:
I tried to iterate over Integrations list in Options when initializing and remove this integration manually, but got ConcurrentModificationException. Looks like Sentry iterates this list before the initialization is complete.
The text was updated successfully, but these errors were encountered: