urbanairship / android-library

Urban Airship Android SDK
Other
109 stars 123 forks source link

Background app crash on JobCancellationException #194

Closed carlyonj closed 2 years ago

carlyonj commented 2 years ago

What Airship dependencies are you using?

implementation 'com.urbanairship.android:urbanairship-fcm:14.4.4'

What are the versions of any relevant development tools you are using?

compileSdkVersion 30 implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0" "com.android.tools.build:gradle:7.0.0" ext.kotlin_version = '1.5.10' and also classpath "com.android.tools.build:gradle:7.0.2" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"

Report

What unexpected behavior are you seeing?

Reports of background crashes on push received

What is the expected behavior?

A push notification that doesn't crash the app.

What are the steps to reproduce the unexpected behavior?

Unable to reproduce as it's in the background.

Do you have logging for the issue?

Log 1

**remote data store**
android.os.MessageQueue.nativePollOnce (MessageQueue.java)
android.os.MessageQueue.next (MessageQueue.java:335)
android.os.Looper.loop (Looper.java:193)
android.os.HandlerThread.run (HandlerThread.java:67)
com.urbanairship.util.AirshipHandlerThread.run (AirshipHandlerThread.java:29)
Fatal Exception: kotlinx.coroutines.JobCancellationException
Job was cancelled

Log 2

java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
com.urbanairship.util.AirshipThreadFactory$1.run (AirshipThreadFactory.java:50)
java.lang.Thread.run (Thread.java:923)
Job was cancelled

There area about six different crashes like this with that same exception and the only place we have coroutines in the app is through usage of UrbanAirship