Repository navigation
Description
Description
The issue originates within the app as generated by the @react-native-community/cli template in versions 0.77.2 and 0.77.1
(Old Architecture, debug build. Occurs on both emulators and real devices.)
It did not occur in version 0.78.1.
After triggering a reload by pressing the ‘r’ key in Metro, the top status bar indicates that fast refresh is active when modifying the UI code, but the UI does not update.
Steps to reproduce
- Run a debug build.
- Trigger a reload by pressing the ‘r’ key on the Metro screen.
- Modify
App.tsxto change the UI.
The issue may not be reproducible immediately.
But, repeatedly performing steps 2 and 3 often results in the UI not updating.
--
The reproducer repository consists of a template app generated using the command npx @react-native-community/cli@latest init RN772 --version 0.77.2.
No other modifications have been made except for setting it to use the Old Architecture.
React Native Version
0.77.2
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
System:
OS: macOS 15.3.1
CPU: (10) arm64 Apple M1 Pro
Memory: 1.35 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.11.1
path: ~/.nvm/versions/node/v20.11.1/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v20.11.1/bin/yarn
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v20.11.1/bin/npm
Watchman:
version: 2025.02.17.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/floydkim/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.24978.46.2431.13208083
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /Users/floydkim/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.2
wanted: 0.77.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: false
Stacktrace or Logs
When this log appears after a reload, the issue occurs.
Trying to add a root view with an explicit id (11) already set. React Native uses the id field to track react tags and will overwrite this field. If that is fine, explicitly overwrite the id field to View.NO_ID before calling addRootView.
When scrolling the screen after the issue occurs, this log appears repeatedly.
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance.
at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:82)
at com.facebook.react.uimanager.UIManagerHelper.getEventDispatcher(UIManagerHelper.java:134)
at com.facebook.react.uimanager.UIManagerHelper.getEventDispatcherForReactTag(UIManagerHelper.java:112)
at com.facebook.react.views.scroll.ReactScrollViewHelper.emitScrollEvent(ReactScrollViewHelper.kt:126)
at com.facebook.react.views.scroll.ReactScrollViewHelper.emitScrollEvent(ReactScrollViewHelper.kt:98)
at com.facebook.react.views.scroll.ReactScrollViewHelper.emitScrollBeginDragEvent(ReactScrollViewHelper.kt:70)
at com.facebook.react.views.scroll.ReactScrollView.handleInterceptedTouchEvent(ReactScrollView.java:453)
at com.facebook.react.views.scroll.ReactScrollView.onInterceptTouchEvent(ReactScrollView.java:438)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2870)
at android.widget.ScrollView.dispatchTouchEvent(ScrollView.java:858)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3022)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:794)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1967)
at android.app.Activity.dispatchTouchEvent(Activity.java:4571)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:752)
at android.view.View.dispatchPointerEvent(View.java:16498)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8676)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8423)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7752)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7978)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8035)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11343)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11212)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11168)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11477)
Reproducer
https://github.com/floydkim/repro-react-native-0.77.2
Activity
cipolleschi commentedon Mar 26, 2025
Hi @floydkim, is this happening on Android only or also on iOS?
floydkim commentedon Mar 26, 2025
@cipolleschi
Hello. I just checked and it doesn't reproduce on iOS.
react-native-0772-ios-not-freezing.mov
TomAtterton commentedon Mar 26, 2025
This was working fine for me in 0.77.1 but recently upgraded to 0.77.2 and now metro won't even connect to my emulator not sure if this is related.
floydkim commentedon Mar 30, 2025
I thought it wasn't an issue with my local environment since I observed the same behavior on two different MacBook, but was I mistaken?
cipolleschi commentedon Mar 31, 2025
I just tried with a new app created using 0.77.2 and with an android emulator, and everything works on my side.
Have you tried with
adb reverseas suggested herefloydkim commentedon Mar 31, 2025
@cipolleschi Thank you for your help.
The connection using
adb reverseworks correctly.While testing again, I discovered something new.. It works fine on the Android 14 (SDK 35) emulator.
(A freeze issue does occur, but with a low probability.)
On the Android 15 emulator, the issue occurs within the first couple of attempts.
cipolleschi commentedon Apr 4, 2025
@cortinico do you have an Android 15 we can use for testing?
cortinico commentedon Apr 4, 2025
I just tested on a Android 15 emulator and I cannot reproduce at all @floydkim
Screen.Recording.2025-04-04.at.16.41.54.mov
floydkim commentedon Apr 5, 2025
@cortinico Thank you for looking into this issue.
Could you confirm that you have disabled the new architecture?
cortinico commentedon Apr 7, 2025
You're right I was on New Arch.
Yes it seems like fast refresh is broken on Old Arch.
We can look into it. In the meantime, what's the reason why you can't use NewArch?
floydkim commentedon Apr 8, 2025
@cortinico
If I start a new app, I’ll gladly adopt New Architecture from the beginning.
I’m maintaining an OTA update library, a fork of react-native-code-push.
I discovered this issue while testing compatibility with both the New and Old Architectures.
As you probably know, teams with long-standing React Native apps often manage to upgrade to RN 0.77+ but still run into issues enabling the New Architecture for various reasons.
I hope support for the Old Architecture continues a bit longer.
I know you and your team are putting a lot of effort into supporting everyone.
I really appreciate it.
cortinico commentedon Apr 8, 2025
Thanks for the context
alissonph commentedon Apr 17, 2025
I am facing the same issue, tested with 0.77.1 and 0.77.2, both have the same problem. On 0.76.6 is working fine.
I can't use the new arch now, because I had some performance issues when using animations with
requestAnimationFrameCommented to follow this issue, thank you so much for your work :)
11 remaining items
Backout #46896 - Attempt to fix #50274
[LOCAL] Backout #46896 - Attempt to fix #50274 (#52515)
cw-nikhilnaik commentedon Jul 10, 2025
Hi @alissonph how are we supposed to test it locally? When i changed the respective file, rebuilding the project still does not work as expected indicating that RN is not using the modified file?
alissonph commentedon Jul 10, 2025
@cw-nikhilnaik as by default Android uses precompiled RN, you need to setup to build from source. Change the files locally and follow this guide as well https://reactnative.dev/contributing/how-to-build-from-source
FengFuLiu commentedon Jul 15, 2025
Would it be possible to release a new nightly version with the latest fixes? @alissonph @robhogan
justinkx commentedon Jul 17, 2025
@robhogan Is this fix already available on v0.79 ? Using old architecture with expo-sdk 53 , RN v0.79.5 and reload metro Freeze app
robhogan commentedon Jul 21, 2025
Hi folks - could anyone on RN 0.77.x please try 0.77.3 (just released) to confirm the fix?
floydkim commentedon Jul 22, 2025
@robhogan
Just tested it on 0.77.3 and can confirm the issue is resolved.
react-native-issue-50274-2.mov
Edit: updated video
cortinico commentedon Jul 22, 2025
Great, closing then 👍
[LOCAL] Backout #46896 - Attempt to fix #50274 (#52515)
[LOCAL] Backout #46896 - Attempt to fix #50274 (#52515)
[LOCAL] Backout #46896 - Attempt to fix #50274 (#52515)