Hi,
I’ve recently published my app, currently available on Google Play (waiting for App Store approval).
Today I noticed that one user experiences crashes.
App link: Background Eraser & Changer
Logs from developer console:
com.swmansion.rnscreens.ScreenFragment.<init>
java.lang.IllegalStateException
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3792)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3968)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2307)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8512)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Caused by androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.ScreenFragment: calling Fragment constructor caused an exception
at androidx.fragment.app.Fragment.instantiate (Fragment.java:633)
at androidx.fragment.app.FragmentContainer.instantiate (FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$2.instantiate (FragmentManager.java:448)
at androidx.fragment.app.FragmentState.instantiate (FragmentState.java:81)
at androidx.fragment.app.FragmentStateManager.<init> (FragmentStateManager.java:85)
at androidx.fragment.app.FragmentManager.restoreSaveStateInternal (FragmentManager.java:2410)
at androidx.fragment.app.FragmentManager.attachController (FragmentManager.java:2584)
at androidx.fragment.app.FragmentController.attachHost (FragmentController.java:116)
at androidx.fragment.app.FragmentActivity.lambda$init$1$androidx-fragment-app-FragmentActivity (FragmentActivity.java:128)
at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda0.onContextAvailable
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable (ContextAwareHelper.java:99)
at androidx.activity.ComponentActivity.onCreate (ComponentActivity.java:362)
at androidx.fragment.app.FragmentActivity.onCreate (FragmentActivity.java:249)
at com.facebook.react.ReactActivity.onCreate (ReactActivity.java:45)
at com.thunkable.live.MainActivity.onCreate (MainActivity.java:21)
at android.app.Activity.performCreate (Activity.java:8198)
at android.app.Activity.performCreate (Activity.java:8182)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3765)
Caused by java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Constructor.newInstance0
at java.lang.reflect.Constructor.newInstance (Constructor.java:343)
at androidx.fragment.app.Fragment.instantiate (Fragment.java:615)
Caused by java.lang.IllegalStateException: Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-<US_SOCIAL_SECURITY_NUMBER> to properly configure your main activity.
at com.swmansion.rnscreens.ScreenFragment.<init> (ScreenFragment.kt:54)
Affected user details:
samsung a11q (Galaxy A11), Android 11 (SDK 30)
My Thunkable project link (private project): LINK
Personally I haven’t experienced any problems but if someone has, it’ll impact overall app health so I hope someone from Thunkable staff will take a look and find a solution.
Thanks.
EDIT: found this as a possible solution: LINK. Of course I can’t do anything about this, Thunkable engineers have to make required change in code.