Some of my users crash and i got this error on crashlytics.
It's random and not all the time.
It look like an internal error so if it can help i post the screen here.
Thank you.
Unable to start activity ComponentInfo{com.bereal.ft/com.bereal.ft.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.ScreenStackFragment: could not find Fragment constructor

Same issue here
And some times my users got a black screen and get stuck, they only can kill app and restart.
Hope it can help to solve it.
I removed react native screens from my app, because when this error happens, even the AsyncStorage database is cleaned
I think this related to https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067
Not really a fix.
I tried this 2 weeks long, my users got a lot of crash when i put null in super.onCreate();.
I also face the same issue, I just tried to publish the onCreate(null) solution. Anyway, do you know how to repro the crash?
It's would be sad if must comment enableScreen() again, it improves a lot in android performances
Anyway, do you know how to repro the crash?
No idea.
When the app is killed, then receive a notification and open application from notification. But not sure at 100%.
Plus, it look like the app got a lot of crash with the Google TestLab (without notification, first install).
@kperreau is the crash the same as the one with not putting null in super.onCreate();?
@kperreau is the crash the same as the one with not putting
nullinsuper.onCreate();?
Yes i'm not putting null in super.onCreate();, it's worst if i put null, maybe cause i use react-native-splash-screen, i don't know.
I need it to be clear, if you put null in super.onCreate();, then the exception with Unable to instantiate fragment com.swmansion.rnscreens.ScreenStackFragment: could not find Fragment constructor still exist? Or does a different exception happen then? I am asking since I cannot recreate this exception when putting null in super.onCreate();.
Having the same issue. Please share if there is a proper fix. Sharing details if it helps.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appname/com.appname.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.ScreenFragment: calling Fragment constructor caused an exception
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2895)
at android.app.ActivityThread.-wrap11()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1616)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
aused by java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Constructor.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
at androidx.fragment.app.Fragment.instantiate(Fragment.java:548)
at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:390)
at androidx.fragment.app.FragmentStateManager.
at androidx.fragment.app.FragmentManager.restoreSaveState(FragmentManager.java:2454)
at androidx.fragment.app.FragmentController.restoreSaveState(FragmentController.java:196)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:287)
at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:106)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:51)
at com.appname.MainActivity.onCreate(MainActivity.java:16)
at android.app.Activity.performCreate(Activity.java:7088)
at android.app.Activity.performCreate(Activity.java:7079)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2895)
at android.app.ActivityThread.-wrap11()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1616)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6651)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
@docnbs does this fix the issue: https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067?
@WoLewicki Thanks for sharing. Will check and revert.
From the stack trace, I see that all reported crashes are due to not applying null to the onCreate method. It is obligatory for the react-native-screens to work correctly. You can get more info here: https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-425027574. I am closing this issue then. Feel free to comment if something is wrong.