-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactInstanceManager.recreateReactContextInBackground does not remove the stale root view group #41677
Labels
Comments
wschurman
added
Needs: Triage 🔍
Type: Upgrade Issue
Issues reported from upgrade issue form
labels
Nov 28, 2023
github-actions
bot
added
the
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
label
Nov 28, 2023
github-actions
bot
removed
the
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
label
Nov 29, 2023
Should this have been closed? I'll re-open until someone corrects. Oh sorry I'm confused, this was fixed with #41678. Closing |
douglowder
pushed a commit
to react-native-tvos/react-native-tvos
that referenced
this issue
Nov 30, 2023
Summary: This is my proposed solution to facebook/react-native#41677. Fixes facebook/react-native#41677. ## Changelog: [ANDROID] [FIXED] - Fix android root view group removal during instance re-creation Pull Request resolved: facebook/react-native#41678 Test Plan: Both with fabric enabled and disabled (new architecture): 1. Clone repro repo: https://github.com/wschurman/rn-reload-repro 2. Build and run on android (I use android studio) 3. Click reload button, see timestamp doesn't change (indicating that the view is not removed) 4. Apply this PR as a patch. 5. Re-build and run. 6. Click reload button, see view is correctly disposed of and the new view is set. Reviewed By: cortinico Differential Revision: D51658524 Pulled By: javache fbshipit-source-id: d9a026cde677ad1ec113230bc31bd9297bca8bfc
huntie
pushed a commit
that referenced
this issue
Dec 1, 2023
Summary: This is my proposed solution to #41677. Fixes #41677. ## Changelog: [ANDROID] [FIXED] - Fix android root view group removal during instance re-creation Pull Request resolved: #41678 Test Plan: Both with fabric enabled and disabled (new architecture): 1. Clone repro repo: https://github.com/wschurman/rn-reload-repro 2. Build and run on android (I use android studio) 3. Click reload button, see timestamp doesn't change (indicating that the view is not removed) 4. Apply this PR as a patch. 5. Re-build and run. 6. Click reload button, see view is correctly disposed of and the new view is set. Reviewed By: cortinico Differential Revision: D51658524 Pulled By: javache fbshipit-source-id: d9a026cde677ad1ec113230bc31bd9297bca8bfc
Othinn
pushed a commit
to Othinn/react-native
that referenced
this issue
Jan 9, 2024
…book#41678) Summary: This is my proposed solution to facebook#41677. Fixes facebook#41677. ## Changelog: [ANDROID] [FIXED] - Fix android root view group removal during instance re-creation Pull Request resolved: facebook#41678 Test Plan: Both with fabric enabled and disabled (new architecture): 1. Clone repro repo: https://github.com/wschurman/rn-reload-repro 2. Build and run on android (I use android studio) 3. Click reload button, see timestamp doesn't change (indicating that the view is not removed) 4. Apply this PR as a patch. 5. Re-build and run. 6. Click reload button, see view is correctly disposed of and the new view is set. Reviewed By: cortinico Differential Revision: D51658524 Pulled By: javache fbshipit-source-id: d9a026cde677ad1ec113230bc31bd9297bca8bfc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Version
0.73.0-rc.5
Old Version
0.72.5
Build Target(s)
Android in Release Build Variant
Output of
react-native info
Issue and Reproduction Steps
Issue: calling
recreateReactContextInBackground
on theReactInstanceManager
instance no longer removes the old root view.Suspected blame rev: #37004
Previously,
tearDownReactContext
would callclearReactRoot
, but now it callsdetachRootViewFromInstance
.In
detachRootViewFromInstance
, only the view ID is reset:https://github.com/javache/react-native/blob/a63613ca7bffd54211985224a61300d5de0f5640/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L1295
as opposed to
clearReactRoot
which also removes the views from the root view group: https://github.com/javache/react-native/blob/a63613ca7bffd54211985224a61300d5de0f5640/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L847This occurs in both fabric and non-fabric.
Repro: https://github.com/wschurman/rn-reload-repro
The repro repo does the following:
recreateReactContextInBackground
.The text was updated successfully, but these errors were encountered: