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

Fabric: Race condition when using RCTFabricSurfaceHostingProxyRootView #23910

Closed
ericlewis opened this issue Mar 13, 2019 · 5 comments
Closed
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot. Tech: Fabric

Comments

@ericlewis
Copy link
Contributor

ericlewis commented Mar 13, 2019

🐛 Bug Report

When attempting to use RCTFabricSurfaceHostingProxyRootView the application crashes when the surface is asked to start before the bridge has finished loading. Note, that I sometimes get a red screen instead, saying _fbBatchedBridge couldn't be found, it's "random". It is also pretty clear to me that the runtime pointer is null when this happens. Stack trace below:

stack trace

To Reproduce

Expected Behavior

RCTFabricSurfaceHostingProxyRootView to wait for the bridge to fully load before starting the surface.

Code Example

#23803. Hopefully my swizzle / hack code can be of help in proper solution!

Environment

N/A? This is RNTester.

@ericlewis
Copy link
Contributor Author

cc @fkgozali

@react-native-bot

This comment has been minimized.

@fkgozali
Copy link
Contributor

we’re tracking this internally and will investigate in a few weeks

@fkgozali
Copy link
Contributor

These 2 commits should fix the issues:

  • null Runtime: b312543 (this is actually a workaround, not an ideal fix)
  • Missing __fbBatchedBridge:
    6aa8968

@fkgozali
Copy link
Contributor

Please re-open if the issue still exists.

facebook-github-bot pushed a commit that referenced this issue Sep 12, 2019
Summary:
1. Start surface when first run, before, when we first load js bundle, `_startAllSurfaces` would not be called because `bridge == _batchedBridge`.
2. I think this fixes #23910, so I add the `return` in swizzle method to check.

cc shergin.

## Changelog

[iOS] [Fixed] - Make surface presenter manage start of surface
Pull Request resolved: #24372

Test Plan: N/A.

Differential Revision: D17337865

Pulled By: shergin

fbshipit-source-id: 2a1e413c006cae74ef6ca4c2b6b5ee8a46434b7f
@facebook facebook locked as resolved and limited conversation to collaborators Apr 10, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot. Tech: Fabric
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants