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

[Bug]: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation #2019

Open
1 task done
Sardorbekcyber opened this issue Mar 7, 2024 · 3 comments

Comments

@Sardorbekcyber
Copy link

Sardorbekcyber commented Mar 7, 2024

What happened?

For my app I am getting error on OneSignal from Crashlytics

Steps to reproduce?

Not sure how to reproduce this as I am getting it from alerts

What did you expect to happen?

No crashes from OneSignal

OneSignal Android SDK version

Release 5.1.1

Android version

9

Specific Android models

Samsung Galaxy Note 8

Relevant log output

Fatal Exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(DispatchedContinuation[BlockingEventLoop@1cb3cac, Continuation at com.onesignal.core.internal.operations.impl.OperationRepo$processQueueForever$3.invokeSuspend(OperationRepo.kt:141)@546bf1]){Cancelled}@a3b93d6. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
       at kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:146)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:117)
       at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
       at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
       at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
       at kotlinx.coroutines.BuildersKt.runBlocking(:1)
       at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
       at kotlinx.coroutines.BuildersKt.runBlocking$default(:1)
       at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$2.invoke(ThreadUtils.kt:91)
       at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$2.invoke(ThreadUtils.kt:89)
       at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jkasten2 jkasten2 changed the title [Bug]: [Bug]: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation Mar 7, 2024
@jkasten2
Copy link
Member

jkasten2 commented Mar 7, 2024

@Sardorbekcyber Thanks for reporting. I see this is thrown from the kotlinx.coroutines library here. It's not clear to me if this is a OneSignal issue or an issue with the library or Kotlin.

Do you get any other details in Crashlytics such as a "Caused by:" section?

What percentage users / devices effected and number of crashes?

  • Is the crash only happening on that single device Samsung Galaxy Note 8 running Android 9?

Can you try updating to the latest OneSignal-Android-SDK (currently 5.1.6)?

Also OneSignal uses kotlinx-coroutines 1.6.4, it's possible they fixed this in a newer version. Can you try adding this to your build.gradle / build.kts to upgrade that library?

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")

@Sardorbekcyber
Copy link
Author

Do you get any other details in Crashlytics such as a "Caused by:" section? - Yes below is what is caused by

Caused by java.lang.OutOfMemoryError

What percentage users / devices effected and number of crashes? - Only single user rught now

Can you try updating to the latest OneSignal-Android-SDK (currently 5.1.6)? - Yeap I will be updating both OneSignal and KotlinX Coroutines. But It turns out issue was not in libraries anyway but OutOfMemory Exception

@jkasten2
Copy link
Member

@Sardorbekcyber Thanks for the details. The Caused by java.lang.OutOfMemoryError section should also have it's own stack trace. Can you include that, as well any other parts of that stacktrace so we can get the full stack?

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

2 participants