urbanairship / android-library

Urban Airship Android SDK
Other
111 stars 122 forks source link

NotificationProxyActivity - did not call finish() prior to onResume() completing #156

Closed StefMa closed 4 years ago

StefMa commented 4 years ago

Preliminary Info

What Airship dependencies are you using?

com.urbanairship.android:urbanairship-fcm:13.2.0

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

Android Studio something.. I guess this is unrelated to the bug.

Report

What unexpected behavior are you seeing?

Our crash reporting tool received this crash:

Unable to resume activity {[our.package.name]/com.urbanairship.push.NotificationProxyActivity}: java.lang.IllegalStateException: Activity {[our.package.name]/com.urbanairship.push.NotificationProxyActivity} did not call finish() prior to onResume() completing

Please note that this crash happen currently only once for one device. But Airship is also not implemented that long and not used that much. So it may get more important in the future. But for now I just wanted to report it 🙃

What is the expected behavior?

I guess no crashes 🙃

What are the steps to reproduce the unexpected behavior?

Because I got this via our crash reporting tool I don't know how to reproduce.

Do you have logging for the issue?

Android: 10 Device: SM-G973F

android.app.Activity in performResume at line 8119
android.app.ActivityThread in performResumeActivity at line 4529
android.app.ActivityThread in handleResumeActivity at line 4572
android.app.servertransaction.ResumeActivityItem in execute at line 52
android.app.servertransaction.TransactionExecutor in executeLifecycleState at line 176
android.app.servertransaction.TransactionExecutor in execute at line 97
android.app.ActivityThread$H in handleMessage at line 2220
android.os.Handler in dispatchMessage at line 107
android.os.Looper in loop at line 237
android.app.ActivityThread in main at line 8016
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 493
com.android.internal.os.ZygoteInit in main at line 1076
rlepinski commented 4 years ago

I see two paths where finish() wont be called, but they are both exceptional paths. Either way we will fix but it might point to integration issue. How are you calling takeOff? If using autopilot, are you overriding isReady ?

StefMa commented 4 years ago

Thanks for the quick response 👍 .

We are calling takeOff and wait until the OnReadyCallback calls onAirshipReady:

UAirship.takeOff(application, airshipConfigOptions) {
  // Doing something with Airship
}
rlepinski commented 4 years ago

Fixed in 13.3.0