React Native Release Signed APK crash on app start time - react-native

I have an issue with react native release APK.
The app run on debug mode but it crash immediately on release mode

Is that app running without any warnings/errors before building the APK?
The error message clearly says that it can't find a variable, maybe it got deleted or modified.
You can cross-check the app once by going to the development mode and see if you get the same error.

Try out clean your gradle and make the apk again.

Related

Blank screen when building React Native app in release mode of android

I am building a React Native app and it works fine in debug mode, but when I try to build it in release mode, it shows a blank screen. I have tried several things to troubleshoot the issue, such as updating my dependencies and checking for any syntax errors, but I haven't been able to find the cause of the problem. I am not seeing any error messages, and the app seems to be working as expected in debug mode.
I am not sure what is causing the issue in release mode, and I would appreciate any help or suggestions.
Here is what I have tried so far:
I have checked that my React Native dependencies are up-to-date and correctly configured.
I have ensured that the bundle is being correctly packaged in the binary APK.
I have verified that there are no syntax errors in my code.
Use this error handler https://github.com/a7ul/react-native-exception-handler to catch problems in production. It supports both JS and Native side errors

Firebase Crash Reporting automatically generates reports for fatal errors in android phone but not for iPhones?

I have setup firebase in my react native app.
But currently exceptions are not handled means not added any crashlytics logs or recorded errors
But for android app I am getting crashes in firebase but not for IOS.
Can someone explain this in detail?
Crashlytics may only be able to upload the data once the app starts again. Did you restart the app?
This can happen if you are testing while the Xcode debugger is attached.
Check this document, it explains how to test this in iOS.
If that doesn't work, enable debug logging and check if something is causing issues. For this:
After enabling debug mode, run the app.
Then hit "stop" in Xcode.
Run the app in the device and crash it
Run the app again from Xcode
Collect the output from Xcode

Releasing build issues React native Expo

"react-native-expo does not update the code in releasing build android studio. successfully run in debug mode but releasing built not use updated code
Please Help
Use expo publish command, to make the changes to server side or try using the bundle command and run from android studio.

App in production crashes immediately after showing splash screen (Android only)

Yesterday I release my app but I have problem on Android. When the app starts it shows the splash screen and crashes immediately (before actually showing any part of the app) with the message “Unfortunately App has stopped”. I build the release with the following
./gradlew assembleRelease
and everything was successful. I tested the app with
react-native run-android —variant=release
on my device and there wasn’t any problem. But in production it’s not working… What can be the problem?
Actually It turns out that the problem was with managing my production releases in the Google Play Store. My first release was build from the Android Studio and not from the console with ./gradlew assembleRelease (I thought that this is just another way and did it in the standard way of building release for android app). Because of that all the JavaScript needed to run my app wasn't bundled in the APK and it was showing only the splash screen. After fixing that and releasing the new APK with the bundled JavaScript and fixing the right release on the Google Play Console everything is fine now.
The documentation is very good and clear: Releasing on Android documentation

React Native App crashes if signed and released. Works fine in debug mode

React Native App crashes if signed and released. Works fine in debug mode. It doesn't throw any error in the screen. It simply crashes. When I looked at cat log. no error.
I also tried build apk with --info, but no additional info while crashing. I also tried building APK by setting minifyEnabled false.
When run the app in debug mode by connecting my phone via USB, it works.
I'm tried creating apk with --debug but I'm unable to install it my phone, it says parsing error when I try to install using app installer.
I got the following logcat errors. What does it mean?
09-03 11:03:07.968 W/ActivityManager(1344): Force finishing activity com.myapp/.MainActivity
09-03 11:03:08.012 W/BroadcastQueue(1344): Skipping deliver [background] BroadcastRecord{cb72147 u-1 android.net.conn.CONNECTIVITY_CHANGE} to ReceiverList{7bf2161 22421 com.myapp/10100/u0 remote:b9cdcc8}: process crashing
09-03 11:03:08.035 W/ActivityManager(1344): Dismiss app error dialog : com.myapp
09-03 11:03:13.095 I/WindowState(1344): WIN DEATH: Window{3f22c22 u0 /com.myapp.MainActivity}
I finally found the cause. There is module called react-native-material-design-searchbar which was causing the issue. The weird part is, if directly copy the SearchBar.js from that module and use it all works fine even in release, but if use module as direct import it's not working only in release mode. So weird. The SearchBar is good, so now I'm using directly by copying the file to my project.
I fixed this error by uninstalling uglifyjs and reinstalled the latest (using NPM).