Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bridge mode by constructing ReactDelegate correctly. #43999

Closed
wants to merge 1 commit into from

Conversation

cortinico
Copy link
Contributor

Summary:
Currently NewArch-BridgeMode is partially broken when creating views via ReactDelegate.
That's because we're using the ctor that doesn't account for Boolean: fabricEnabled.

That means that the RootView that it will be created are all having setIsFabric(FALSE).
This is causing problems like whitescreens on several reload + multiple warnings such as:

                         E  com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance.

Fixes #43692

See for more context on this issues: #43692

Changelog:
[Android] [Fixed] - Fix bridge mode by constructing ReactDelegate correctly

Reviewed By: cipolleschi

Differential Revision: D55921078

Summary:
Currently NewArch-BridgeMode is partially broken when creating views via `ReactDelegate`.
That's because we're using the ctor that doesn't account for `Boolean: fabricEnabled`.

That means that the `RootView` that it will be created are all having setIsFabric(FALSE).
This is causing problems like whitescreens on several reload + multiple warnings such as:
```
                         E  com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance.
```

Fixes facebook#43692

See for more context on this issues: facebook#43692

Changelog:
[Android] [Fixed] - Fix bridge mode by constructing ReactDelegate correctly

Reviewed By: cipolleschi

Differential Revision: D55921078
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Apr 9, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D55921078

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,399,408 +181,527
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,775,527 +180,900
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: b23960a
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a25004c.

Copy link

github-actions bot commented Apr 9, 2024

This pull request was successfully merged by @cortinico in a25004c.

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

cortinico added a commit that referenced this pull request Apr 9, 2024
Summary:
Pull Request resolved: #43999

Currently NewArch-BridgeMode is partially broken when creating views via `ReactDelegate`.
That's because we're using the ctor that doesn't account for `Boolean: fabricEnabled`.

That means that the `RootView` that it will be created are all having setIsFabric(FALSE).
This is causing problems like whitescreens on several reload + multiple warnings such as:
```
                         E  com.facebook.react.bridge.ReactNoCrashSoftException: Cannot get UIManager because the context doesn't contain an active CatalystInstance.
```

Fixes #43692

See for more context on this issues: #43692

Changelog:
[Android] [Fixed] - Fix bridge mode by constructing ReactDelegate correctly

Reviewed By: cipolleschi

Differential Revision: D55921078

fbshipit-source-id: 2c21d089a49538402d546177bcdb26c8d7d5fbc1
This was referenced Jun 28, 2024
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.74] Performing a refresh is unstable under Bridge Mode on Android (RNTester / New Arch)
3 participants