Skip to content

Sync OSS Fabric renderer to restore startup initialization - #60493

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D135716737
Dec 2, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D135716737

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:

Context

The previous OSS renderer refresh removed the import of react-native/setup-env with the legacy event pipeline. Metro only runs that initialization module before application code when it is already in the dependency graph. Its absence leaves RN globals undefined and causes app startup to fail with ReferenceError: Property 'window' doesn't exist.

Changes

Sync the development, production, and profiling OSS Fabric bundles from React commit d27a4db0e22abd379013cf89a465d7d89678b8cb (react/react#38519), which restores react-native/setup-env as the first runtime import. Each generated bundle changes only by adding that require before React and updating its SignedSource signature. Preserve flushSync and leave dependencies, shims, the renderer revision marker, and internal renderer bundles unchanged.

Verified compatibility with unmodified released React 19.3.0 and 19.3.1 and the complete released Scheduler 0.28.0 package. All six React/renderer combinations pass actual native startup and renderer behavior checks, including initialization before application entry, native view mounting, and flushSync return and throw-path behavior.

Changelog: [General][Fixed] - Restore React Native global initialization before application startup in the OSS Fabric renderer.

Differential Revision: D135716737

Summary:
## Context
The previous OSS renderer refresh removed the import of `react-native/setup-env` with the legacy event pipeline. Metro only runs that initialization module before application code when it is already in the dependency graph. Its absence leaves RN globals undefined and causes app startup to fail with `ReferenceError: Property 'window' doesn't exist`.

## Changes
Sync the development, production, and profiling OSS Fabric bundles from React commit `d27a4db0e22abd379013cf89a465d7d89678b8cb` (react/react#38519), which restores `react-native/setup-env` as the first runtime import. Each generated bundle changes only by adding that require before React and updating its SignedSource signature. Preserve `flushSync` and leave dependencies, shims, the renderer revision marker, and internal renderer bundles unchanged.

Verified compatibility with unmodified released React 19.3.0 and 19.3.1 and the complete released Scheduler 0.28.0 package. All six React/renderer combinations pass actual native startup and renderer behavior checks, including initialization before application entry, native view mounting, and `flushSync` return and throw-path behavior.

Changelog: [General][Fixed] - Restore React Native global initialization before application startup in the OSS Fabric renderer.

Differential Revision: D135716737
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown

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

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit e565afe into react:main Dec 2, 2026
67 of 70 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in e565afe

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

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged This PR has been merged. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants