Open kenny-statsig opened 1 year ago
@kenny-statsig It seems you add a call of DecoroutinatorRuntime.load()
to the MainActivity's onCreate()
method instead of the Application's one.
Please see the correct example from the Android tests.
https://github.com/Anamorphosee/stacktrace-decoroutinator/blob/master/stacktrace-decoroutinator-android/src/androidTest/AndroidManifest.xml
https://github.com/Anamorphosee/stacktrace-decoroutinator/blob/master/stacktrace-decoroutinator-android/src/androidTest/kotlin/utils-test.kt#L31
I encountered the same issue. I had the .load() setup correctly in our Application class and still ran into this issue.
Tried moving it to the init {...}
, but same result.
We are using dependency injection (Hilt), and some of the injected classes has coroutines in their init()
, which might be the issue? 🤔
I did not find a workaround
I first tried using the suggested onCreate
, but got that same "BaseContinuationImpl was already loaded" error.
I switched to use the init{}
block in my Application file and things started working!
I'd bet that having coroutines in your hilt stuff is what's causing the BaseContinuationImpl to be loaded before you'd like. I don't know a solution for you, but wanted to say that your init
trick is greatly appreciated!
That did the trick, thank you!
I am calling
DecoroutinatorRuntime.load()
at the top of my app's onCreate but it seems to be causing the app to crash I've attached a screenshot of the full stack trace.