Pause RedBox auto-retry reload while app is backgrounded (#57593)#57593
Closed
Abbondanzo wants to merge 1 commit into
Closed
Pause RedBox auto-retry reload while app is backgrounded (#57593)#57593Abbondanzo wants to merge 1 commit into
Abbondanzo wants to merge 1 commit into
Conversation
|
@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112543586. |
Abbondanzo
added a commit
to Abbondanzo/react-native
that referenced
this pull request
Jul 17, 2026
Summary: The RedBox auto-retry timer could fire a reload while the app was in the background. That reload restarts the instance and re-initializes native modules; a module requiring main-queue setup is dispatched synchronously onto the main queue, which is itself blocked inside the reload, deadlocking the app until the watchdog terminates it. Gate the countdown in `autoRetryTick` on foreground state, so the timer only advances (and eventually reloads) while the app is active. In app extensions `RCTSharedApplication()` is nil, which reads as active and preserves the prior behavior. Changelog: [iOS][Fixed] - Prevent RedBox auto-retry from reloading while backgrounded Differential Revision: D112543586
Abbondanzo
force-pushed
the
export-D112543586
branch
from
July 17, 2026 14:25
94c6435 to
e5ee39c
Compare
Summary: The RedBox auto-retry timer could fire a reload while the app was in the background. That reload restarts the instance and re-initializes native modules; a module requiring main-queue setup is dispatched synchronously onto the main queue, which is itself blocked inside the reload, deadlocking the app until the watchdog terminates it. Gate the countdown in `autoRetryTick` on foreground state, so the timer only advances (and eventually reloads) while the app is active. In app extensions `RCTSharedApplication()` is nil, which reads as active and preserves the prior behavior. Changelog: [iOS][Fixed] - Prevent RedBox auto-retry from reloading while backgrounded Differential Revision: D112543586
Abbondanzo
force-pushed
the
export-D112543586
branch
from
July 17, 2026 14:35
e5ee39c to
8a14e89
Compare
|
This pull request has been merged in b587763. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The RedBox auto-retry timer could fire a reload while the app was in the
background. That reload restarts the instance and re-initializes native
modules; a module requiring main-queue setup is dispatched synchronously onto
the main queue, which is itself blocked inside the reload, deadlocking the app
until the watchdog terminates it.
Gate the countdown in
autoRetryTickon foreground state, so the timer onlyadvances (and eventually reloads) while the app is active. In app extensions
RCTSharedApplication()is nil, which reads as active and preserves the priorbehavior.
Changelog:
[iOS][Fixed] - Prevent RedBox auto-retry from reloading while backgrounded
Differential Revision: D112543586