Repository navigation
Sync OSS Fabric renderer to restore startup initialization - #60493
Merged
Merged
Conversation
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
|
@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135716737. |
cortinico
approved these changes
Dec 2, 2026
cortinico
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
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? |
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:
Context
The previous OSS renderer refresh removed the import of
react-native/setup-envwith 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 withReferenceError: Property 'window' doesn't exist.Changes
Sync the development, production, and profiling OSS Fabric bundles from React commit
d27a4db0e22abd379013cf89a465d7d89678b8cb(react/react#38519), which restoresreact-native/setup-envas the first runtime import. Each generated bundle changes only by adding that require before React and updating its SignedSource signature. PreserveflushSyncand 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
flushSyncreturn and throw-path behavior.Changelog: [General][Fixed] - Restore React Native global initialization before application startup in the OSS Fabric renderer.
Differential Revision: D135716737