crash: com.swmansion.rnscreens.ScreenFragment.<init> #2394
Labels
Missing repro
This issue need minimum repro scenario
Platform: Android
This issue is specific to Android
Description
I have an app on CHPlay, it's built by react native.
It's crashed on production.
Below is the crash's details:
Type: java.lang.RuntimeException
Exception java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4184)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4340)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101)
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:2584)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8810)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
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:631)
at androidx.fragment.app.FragmentContainer.instantiate (FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate (FragmentManager.java:483)
at androidx.fragment.app.FragmentStateManager. (FragmentStateManager.java:85)
at androidx.fragment.app.FragmentManager.restoreSaveState (FragmentManager.java:2728)
at androidx.fragment.app.FragmentController.restoreSaveState (FragmentController.java:198)
at androidx.fragment.app.FragmentActivity$2.onContextAvailable (FragmentActivity.java:149)
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable (ContextAwareHelper.java:99)
at androidx.activity.ComponentActivity.onCreate (ComponentActivity.java:322)
at androidx.fragment.app.FragmentActivity.onCreate (FragmentActivity.java:273)
at com.facebook.react.ReactActivity.onCreate (ReactActivity.java:45)
at com.yardapp.MainActivity.onCreate (MainActivity.java:43)
at android.app.Activity.performCreate (Activity.java:8657)
at android.app.Activity.performCreate (Activity.java:8636)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4165)
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:613)
Caused by java.lang.IllegalStateException: Screen fragments should never be restored. Follow instructions from #17 (comment)<US_SOCIAL_SECURITY_NUMBER> to properly configure your main activity.
at com.swmansion.rnscreens.ScreenFragment. (ScreenFragment.kt:54)
Steps to reproduce
It's crashed on production.
Snack or a link to a repository
https://github.com/tkphan2804?tab=repositories
Screens version
3.20.0
React Native version
0.71.6
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
Galaxy Tab Active3 (Android 13)
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: