question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fabric: Race condition when using RCTFabricSurfaceHostingProxyRootView

See original GitHub issue

🐛 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

https://github.com/facebook/react-native/pull/23803. Hopefully my swizzle / hack code can be of help in proper solution!

Environment

N/A? This is RNTester.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fkgozalicommented, Mar 19, 2019

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

0reactions
fkgozalicommented, Apr 10, 2019

Please re-open if the issue still exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing Race Conditions in React with useEffect - Max Rozen
You would typically notice a race condition (in React) when two slightly different requests for data have been made, and the application displays...
Read more >
Race conditions in React and beyond. A race condition guard ...
Our code does not need to utilize multiple threads to have a race condition. A similar issue might occur with asynchronous code. Imagine...
Read more >
Enabling TurboModule and Fabric in React Native 0.68 leads ...
I am using React Native 0.68 and trying to use TurboModules and Fabric. This is my AppDelegate.mm file #import "AppDelegate.h" #import ...
Read more >
Avoiding Race Conditions when Fetching Data with ... - Medium
About a month ago, I posted an example of fetching data using React Hooks to Twitter. While it was well-intended, Dan Abromov (of...
Read more >
Enabling Fabric on iOS - React Native
How to render your app with Fabric depends on your setup. ... #import <React/RCTFabricSurfaceHostingProxyRootView.h>
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found