[0.74.0] stress reloading leads to broken state on android bridgeless #44241
Labels
Contributor
A React Native contributor.
p: Expo
Partner: Expo
Partner
Platform: Android
Android applications.
Resolution: PR Submitted
A pull request with a fix has been provided.
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
On bridgeless mode, we have some sort of race condition from reloading.
react-native/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessDevSupportManager.java
Line 111 in 766ece7
react-native/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java
Line 1203 in 766ece7
so we will see two
BUNDLE ./index.js
from the cli terminal for each reload.However, in some stress reload, the app will be in broken state. reloading is then broken and the app has an empty screen.
not sure if that is coming from the second reload introduced in #42917. i think there is some race condition inside.
Steps to reproduce
git clone https://github.com/Kudo/repro-RN074-android-reload
cd repro-RN074-android-reload
yarn android
React Native Version
0.74.0
Affected Platforms
Runtime - Android, Build - MacOS
Areas
Bridgeless - The New Initialization Flow
Output of
npx react-native info
Reproducer
https://github.com/Kudo/repro-RN074-android-reload
Screenshots and Videos
repro-android-reload.mp4
The text was updated successfully, but these errors were encountered: