Closed randomittin closed 9 months ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey @randomittin, have you tried following suggestions in stacktrace?
Hi @randomittin Did you find any Solution ??
Hi @dev-abhinavsinghHP, have you tried the solutions @kkafar has mentioned above?
I'm still getting the issue on specific Samsung and OPPO devices(samsung dm3q (Galaxy S23 Ultra), OPPO OP4F0BL1 (CPH2207)). Even after adding this block of code in MainActivity.java.
OS Version:- Samsung - 14 OPPO - 13
Versions react-native-screens: ^3.18.2 react-native": 0.70.4 @react-navigation/bottom-tabs: ^6.5.3 @react-navigation/elements: ^1.3.6 @react-navigation/native": ^6.0.13 @react-navigation/stack: ^6.3.3
import android.os.Bundle;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(null); }
Thank you in advance for any help.
@vishaljnimblechapps great, thanks for clarifying this. Luckily I have physical Samsung phone, so I'll try to check this issue today 👍
@tboba ohh thanks. Let me know if you need anything from my side.
@tboba any update ? We are still facing this issue in production.
Hi All,
I've figured out a couple of issues in my code from earlier. We accidentally moved on new react native architecture called Fabric & didn't include the calling Override part in the constructor. I tried fixing it this way, but it wasn't working.
I ended up removing react-native-screens completely by disabling it in MainActivity.java file in 'android/app/src/main/java/com/appname/MainActivity.java'.
to
See I commented the following code to disable Fabric usage as the Override for react-native-screen's onCreate is getting missed here & thus the exception error resulting in crash.
@Override protected ReactActivityDelegate createReactActivityDelegate() { return new DefaultReactActivityDelegate( this, getMainComponentName(), // If you opted-in for the New Architecture, we enable the Fabric Renderer. DefaultNewArchitectureEntryPoint.getFabricEnabled() ); }
I've also added detachInactiveScreens={false}
in the stack navigator declaration:
I'd also like to point out that we had to create a new build entirely as in process of fixing this bug, we went on to break almost all parts of app, (fixed many other bugs on the way), & ended up moving the entire src folder to an older build. This seem to fix the bug.
Thus, I believe detachInactiveScreens={false}
in the stack navigator declaration should suffice.
@tboba did you find anything ?
Hi @vishaljnimblechapps, sorry for no response. I was quite busy lately and had other bugs to fix. Unfortunately I can't reproduce that, as the repro is no longer available on Github. Have you tried the solution that @vishaljnimblechapps has mentioned above?
Description
Steps to reproduce
You can download the app on playstore & see the error yourself (https://play.google.com/store/apps/details?id=com.mewt.app&pli=1).
I'm stuck here & have tried all the other suggestions including the one for
import {enableScreens} from 'react-native-screens'; enableScreens(false);
The app is unexpectedly crashing on these devices & is already in production.
Snack or a link to a repository
https://github.com/mewt-app/superapp
Screens version
3.29.0
React Native version
0.72.8
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes