iZettle / sdk-android

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/android-sdk
24 stars 20 forks source link

java.lang.IllegalStateException when CardPaymentActivity invokes setRequestedOrientation() in release-1.14.15 #39

Closed planetcoops closed 2 years ago

planetcoops commented 2 years ago

Expected Behavior

No crash

Current Behavior

Crash with stack:

java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3303) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3411) at android.app.ActivityThread.-wrap12 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1994) at android.os.Handler.dispatchMessage (Handler.java:108) at android.os.Looper.loop (Looper.java:166) at android.app.ActivityThread.main (ActivityThread.java:7529) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921) Caused by: java.lang.IllegalStateException: at android.os.Parcel.readException (Parcel.java:1962) at android.os.Parcel.readException (Parcel.java:1900) at android.app.IActivityManager$Stub$Proxy.setRequestedOrientation (IActivityManager.java:5704) at android.app.Activity.setRequestedOrientation (Activity.java:6132) at com.izettle.payments.android.ui.payment.CardPaymentActivity.onCreate (CardPaymentActivity.java:83) at android.app.Activity.performCreate (Activity.java:7383) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1218) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3256) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3411) at android.app.ActivityThread.-wrap12 (Unknown Source) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1994) at android.os.Handler.dispatchMessage (Handler.java:108) at android.os.Looper.loop (Looper.java:166) at android.app.ActivityThread.main (ActivityThread.java:7529) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)

Steps to Reproduce

We can't reproduce, the crashes come from Google Play Console reports, but suspect it is this issue:

https://stackoverflow.com/questions/50976174/illegalstateexception-on-setrequestedorientation/50984372

Context

User is running

Huawei HUAWEI MediaPad T3 10 Android 8.0 (SDK 26)

Failure Logs

bobzettle commented 2 years ago

Thank you for the report.

This has been added to our backlog and the issue will be updated once resolved.

bobzettle commented 2 years ago

An attempt to handle the error is released in version 1.14.17 .

planetcoops commented 2 years ago

Many thanks.