Skip to content

Fix stuck loading banner after a reload#56452

Closed
alanjhughes wants to merge 1 commit into
mainfrom
alanhughes/fix-loading-banner
Closed

Fix stuck loading banner after a reload#56452
alanjhughes wants to merge 1 commit into
mainfrom
alanhughes/fix-loading-banner

Conversation

@alanjhughes
Copy link
Copy Markdown
Collaborator

Summary:

Fixes an issue on iOS where the "Loading from Metro..." banner can remain stuck on screen after a reload.

RCTInstance._loadScriptFromSource posts RCTInstanceDidLoadBundle, not RCTJavaScriptDidLoadNotification. The legacy notification is never posted, so the existing native hide path is dead.

Also, RCTDevLoadingView has no cleanup. Without hiding the window and clearing it's reference, it remains alive and stuck on screen.

Changelog:

[IOS] [FIXED] - Fix "Loading from Metro..." banner getting stuck after reloads in quick succession.

Test Plan:

  1. Launch an app on iOS
  2. Trigger a reload while the "Loading from Metro..." banner is still visible. Bundle cache should be empty so it takes some time.
  3. Immediately trigger a second reload while the banner is visible
  4. Confirm: banner is gone once the new bundle finishes loading (previously it would remain stuck indefinitely)

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 15, 2026
@alanjhughes alanjhughes requested a review from cipolleschi April 15, 2026 14:50
@alanjhughes alanjhughes changed the title Fix loading banner stuck after a reload Fix stuck loading banner after a reload Apr 15, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 15, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 15, 2026

@huntie has imported this pull request. If you are a Meta employee, you can view this in D101004084.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 15, 2026

@huntie merged this pull request in e122c24.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @alanjhughes in e122c24

When will my fix make it into a release? | How to file a pick request?

react-native-bot pushed a commit that referenced this pull request Apr 15, 2026
Summary:
Fixes an issue on iOS where the "Loading from Metro..." banner can remain stuck on screen after a reload.

`RCTInstance._loadScriptFromSource` posts `RCTInstanceDidLoadBundle`, not `RCTJavaScriptDidLoadNotification`. The legacy notification is never posted, so the existing native hide path is dead.

Also, `RCTDevLoadingView` has no cleanup. Without hiding the window and clearing it's reference, it remains alive and stuck on screen.

## Changelog:

[IOS] [FIXED] - Fix "Loading from Metro..." banner getting stuck after reloads in quick succession.

Pull Request resolved: #56452

Test Plan:
1. Launch an app on iOS
2. Trigger a reload while the "Loading from Metro..." banner is still visible. Bundle cache should be empty so it takes some time.
3. Immediately trigger a second reload  while the banner is visible
4. Confirm: banner is gone once the new bundle finishes loading (previously it would remain stuck indefinitely)

Reviewed By: emily8rown

Differential Revision: D101004084

Pulled By: huntie

fbshipit-source-id: de6446a522f80c5a8a0953303fb03fa65c6b698b
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @alanjhughes in 7445af3

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants