Skip to content

Fabric: Race condition when using RCTFabricSurfaceHostingProxyRootView #23910

@ericlewis

Description

@ericlewis

🐛 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions