Skip to content

Pause RedBox auto-retry reload while app is backgrounded (#57593)#57593

Closed
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D112543586
Closed

Pause RedBox auto-retry reload while app is backgrounded (#57593)#57593
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D112543586

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

@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 Jul 17, 2026
@meta-codesync

meta-codesync Bot commented Jul 17, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112543586.

@meta-codesync meta-codesync Bot changed the title Pause RedBox auto-retry reload while app is backgrounded Pause RedBox auto-retry reload while app is backgrounded (#57593) Jul 17, 2026
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
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
@meta-codesync meta-codesync Bot closed this in b587763 Jul 17, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 17, 2026
@meta-codesync

meta-codesync Bot commented Jul 17, 2026

Copy link
Copy Markdown

This pull request has been merged in b587763.

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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant