Skip to content

[0.77] Android Old Architecture debug app freezes when Metro triggers reload #50274

Closed

Description

@floydkim

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

  1. Run a debug build.
  2. Trigger a reload by pressing the ‘r’ key on the Metro screen.
  3. Modify App.tsx to 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

Screenshots and Videos

react-native-0772-android-freeze-2.mov

Activity

  1. cipolleschi commented on Mar 26, 2025

    @cipolleschi
    Contributor

    Hi @floydkim, is this happening on Android only or also on iOS?

  2. floydkim commented on Mar 26, 2025

    @floydkim
    Author

    @cipolleschi
    Hello. I just checked and it doesn't reproduce on iOS.

    react-native-0772-ios-not-freezing.mov
  3. TomAtterton commented on Mar 26, 2025

    @TomAtterton
    Contributor

    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.

  4. floydkim commented on Mar 30, 2025

    @floydkim
    Author

    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?

  5. cipolleschi commented on Mar 31, 2025

    @cipolleschi
    Contributor

    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 reverse as suggested here

  6. floydkim commented on Mar 31, 2025

    @floydkim
    Author

    @cipolleschi Thank you for your help.
    The connection using adb reverse works 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.

  7. cipolleschi commented on Apr 4, 2025

    @cipolleschi
    Contributor

    @cortinico do you have an Android 15 we can use for testing?

  8. cortinico commented on Apr 4, 2025

    @cortinico
    Contributor

    @cortinico do you have an Android 15 we can use for testing?

    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
  9. floydkim commented on Apr 5, 2025

    @floydkim
    Author

    @cortinico Thank you for looking into this issue.
    Could you confirm that you have disabled the new architecture?

  10. cortinico commented on Apr 7, 2025

    @cortinico
    Contributor

    @cortinico Thank you for looking into this issue. Could you confirm that you have disabled the new architecture?

    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?

  11. floydkim commented on Apr 8, 2025

    @floydkim
    Author

    @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.

  12. cortinico commented on Apr 8, 2025

    @cortinico
    Contributor

    Thanks for the context

  13. alissonph commented on Apr 17, 2025

    @alissonph

    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 requestAnimationFrame

    Commented to follow this issue, thank you so much for your work :)

  14. 11 remaining items

  15. added 2 commits that reference this issue on Jul 9, 2025
    cb2b011
    c43952a
  16. cw-nikhilnaik commented on Jul 10, 2025

    @cw-nikhilnaik

    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?

  17. alissonph commented on Jul 10, 2025

    @alissonph

    @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

  18. FengFuLiu commented on Jul 15, 2025

    @FengFuLiu

    Would it be possible to release a new nightly version with the latest fixes? @alissonph @robhogan

  19. justinkx commented on Jul 17, 2025

    @justinkx

    @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

    Unhandled SoftException
    com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance.
    	at com.facebook.react.uimanager.n0.h(UIManagerHelper.java:59)
    	at com.facebook.react.uimanager.n0.b(UIManagerHelper.java:25)
    	at com.facebook.react.uimanager.n0.c(UIManagerHelper.java:5)
    	at com.swmansion.rnscreens.Z.onDetachedFromWindow(ScreenStackHeaderConfig.kt:26)
    
  20. robhogan commented on Jul 21, 2025

    @robhogan
    Collaborator

    Hi folks - could anyone on RN 0.77.x please try 0.77.3 (just released) to confirm the fix?

  21. floydkim commented on Jul 22, 2025

    @floydkim
    Author

    @robhogan
    Just tested it on 0.77.3 and can confirm the issue is resolved.

    react-native-issue-50274-2.mov

    Edit: updated video

  22. cortinico commented on Jul 22, 2025

    @cortinico
    Contributor

    Great, closing then 👍

  23. added a commit that references this issue on Aug 13, 2025
    db600b2
  24. added a commit that references this issue on Jan 26, 2026
    e7ed0b1
  25. added a commit that references this issue on Feb 3, 2026
    a23dd04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions