Skip to content
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

java.lang.IllegalStateException: Stacktrace-decoroutinator runtime can not be loaded because BaseContinuationImpl was already loaded. #23

Closed
kenny-statsig opened this issue Jun 22, 2023 · 5 comments

Comments

@kenny-statsig
Copy link

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.

Screenshot 2023-06-22 at 1 50 43 PM

@Anamorphosee
Copy link
Owner

Anamorphosee commented Jun 22, 2023

@MarcLFJ
Copy link

MarcLFJ commented Jul 7, 2023

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

@jhollowayj
Copy link

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!

Anamorphosee added a commit that referenced this issue Jan 14, 2024
@saket
Copy link

saket commented Jan 29, 2024

That did the trick, thank you!

@Anamorphosee
Copy link
Owner

Anamorphosee commented Aug 2, 2024

Just released SD version 2.4.1 with a big rework for Android. From now on SD for Android requires only the Gradle plugin and no other dependencies or method calls are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants