Android app works fine when using debug JS bundle, but has horrible bug in release JS bundle. #26078
Labels
Bug
Platform: Android
Android applications.
Resolution: Locked
This issue was locked by the bot.
Tech: Bundler 📦
This issue is related to the bundler (Metro, Haul, etc) used.
I'm getting ready to release my companies' app for internal beta testing. I noticed this issue when i tried to run a release build for my app by using android studio or running the commend: react-native run-android --variant=release.
What happens next is that my app then gets stuck on my initial loading screen (using react navigation for my app). It seems as though a certain portion of my app is not executing, which is the part where i am checking to see if the user is authenticated (using react-native-firebse) and then deciding whether to send them into the main page or the login screen.
This logic runs in a redux saga, where i use an event channel (a wrapper around the firebase onAuthStateChange realtime listener) to monitor the users auth status and route them as i mentioned above. Using Alerts i was able to isolate the exact part of the saga where for some reason it never resolves the async value of the onAuthStateChange listener. I have put a label above the line of code in question.
I have tested both the debug and release JS bundle using the command to generate an offline bundle, and I am certain that the issue is in the release bundle alone.
NOTE: At first i was having this issue with react-native 0.59.9 on Both Android and IOS platform. I decided to update to the latest version 0.60.5 hoping that it would fix it. Now I am only experiencing this on the Android platform.
React Native version:
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 2.07 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.2 - ~/.nvm/versions/node/v10.16.2/bin/node
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.2/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 27, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-27 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
Describe what you expected to happen:
The app should run fine like it does in debug mode.
Snack, code example, screenshot, or link to a repository:
The text was updated successfully, but these errors were encountered: