React-native: RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks

Created on 15 Oct 2017  路  106Comments  路  Source: facebook/react-native

I randomly get this warning at iOS app start (i.e. not always).

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS Sierra 10.12.6
Node: 6.10.2
Yarn: 1.0.2
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.1 AI-143.2915827

Packages: (wanted => installed)
react: ^16.0.0 => 16.0.0
react-native: ^0.49.3 => 0.49.3

Steps to Reproduce

  1. Start the app

    Expected Behavior

No warning

Actual Behavior

capture d ecran 2017-10-15 12 49 45

Reproducible Demo

N/A

Some packages I use

https://github.com/antoinerousseau/react-native-custom-components
https://github.com/rebeccahughes/react-native-device-info
https://github.com/evollu/react-native-fcm
https://github.com/gwmccull/react-native-polyfill
https://github.com/getsentry/react-native-sentry

Bug iOS

Most helpful comment

Please stop adding +1s, this is generating email notifications that don't add any information. Use the "add reaction" feature instead.

All 106 comments

Same here!

got this yellow issue for iOS

I see this as well. Possibly related to #11196.
I believe this is what is also causing the app to crash when trying to reload; it fails with
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This method must not be called before the JS thread is created'

I'm also getting this error from time to time on iOS 11 and I've got no idea how to debug this to give more information. Stacktrace doesn't help at all in this case.

+1

+1

Please stop adding +1s, this is generating email notifications that don't add any information. Use the "add reaction" feature instead.

Same issue. Here are the packages I use:

  • react-native-device-info
  • react-native-interactable
  • react-native-sensitive-info
  • react-native-snackbar
  • react-native-splash-screen
  • react-native-svg
  • react-native-vector-icons

Given the intersection with @antoinerousseau's list, the possible locations for this bug are:

  • A bug in react-native itself
  • A bug in react-native-device-info
  • Multiple bugs in libraries other than react-native-device-info

I just added react-native-device-info, and moved from rn 0.49 to 0.50. and now i found this bug. Don't know if it's the problem, but it's when i got this.

Same issue...
So it was not my fault ?

Same issue... Do u have any solutions ?

Same issue. The only package from the list above we use is react-native-sentry.

Same issue here today i have started a brand new app and only package i have added
"native-base": "^2.3.3",
"react": "16.0.0",
"react-native": "0.50.3",
"react-native-fcm": "^10.0.3"

@rizzomichaelg
+1
"react-native": "0.49.3",
app crashed when first load randomly.

anybody resolved it ??

@dantman I started seeing the issue immediately after installing react-native-device-info, so I highly suspect the issue is related, at least in our case, to that specific package.

The only other package I am using react-native-keychain, which I installed quite a while ago without any issues, so it seems like a good bet.

rebeccahughes/react-native-device-info#260 seems to have a message referring to RNDeviceInfo while this bug refers to RCTDevLoadingView. So there may be more than one spot triggering this warning.

If you would put a breakpoint on the following line:

RCTLogWarn(@"RCTBridge required dispatch_sync to load %@. This may lead to deadlocks", _moduleClass);

You can see which module/stack is responsible for loading RCTDevLoadingView in my case it was RCTCxxBridge.mm which was loading the remote bundle and reporting the download progress on RCTDevLoadingView:

... onProgress:^(RCTLoadingProgress *progressData) {
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
      RCTDevLoadingView *loadingView = [weakSelf moduleForClass:[RCTDevLoadingView class]];
      [loadingView updateProgress:progressData];
#endif
    }];

Here the RCTCxxBridge is using moduleForClass which will load an instance of the module if it is not yet available. Due to the queue used for the onProgress block RCTDevLoadingView would be loaded on a non-main queue, while RCTDevLoadingView requires a main-queue setup.

I was able to workaround the warning by optimistically load RCTDevLoadingView by returning an instance from my RCTBridgeDelegate using:
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge;

I was able to workaround the warning by updating AppDelegate.m

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                            moduleProvider:nil
                                             launchOptions:launchOptions];
#if RCT_DEV
  [bridge moduleForClass:[RCTDevLoadingView class]];
#endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"Test"
                                            initialProperties:nil];
  ...
}

react-native: 0.50.4
same issue...

react-native: 0.51.0
same issue...

"react": "16.2.0",
"react-native": "0.52.0",
same issue...

"react": "16.2.0",
"react-native": "0.51.0",
"react-native-device-info": "0.13.0"

My solution here was to move react-native-device-info out of the pod file and link it manually in the project. That seemed to solve the issue. I think another approach could be to include CxxBridge as a subspec for React in the pod file, but that requires Folly (and so boost), and that whole setup is cumbersome / takes long time. If you want a quick fix, simply remove the packages that are causing the issue out of pod.

No "react-native-device-info" installed:
Issue exists in 0.54.2 :

"react": "16.3.0-alpha.2",
"react-native": "0.54.2",
"react-native-action-button": "^2.8.4",
"react-native-admob": "^2.0.0-beta.4",
"react-native-animatable": "^1.2.4",
"react-native-awesome-alerts": "^1.0.7",
"react-native-elements": "^0.19.0",
"react-native-fbsdk": "^0.7.0",
"react-native-linear-gradient": "^2.4.0",
"react-native-parallax-scroll-view": "^0.21.0",
"react-native-photo-grid": "0.0.2",
"react-native-responsive-dimensions": "^1.0.2",
"react-native-snap-carousel": "^3.6.0",
"react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.5.7"

It was with the "react-native-action-button": "^2.8.4", Adding shadowStyle={{shadowOpacity: 0.9}} solved the warning..

Same issue here.

Same issue.
RN 0.54.4

Anybody got the solution?

The error comes even for freshly/newly created project.

"react": "16.3.1",
"react-native": "0.54.4"

same

+1

@antoinerousseau any update on this issue?

I would not recommend the solution provided by @devburmistro. For my project, it's inclusion created some sort of race condition where this assertion error would manifest randomly on startup when running it from the simulator.

My set-up:

react-native-cli: 2.0.1
react-native: 0.53.0

I started having this issue just now after setting up my repo from scratch and inserting the pure js code back in there. A potential difference between the previous and this new repo is that now I'm using Cocoapods.

Anyone not using Cocoapods?

This happened right after I added

react-native-blur

to a Share Extension view, nested within

react-native-modalbox

@Babazon are you using a debugger when this happens ?

Sorry. I could not debug/console log from the Share Extension view, only the main app.

+1

Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55?

Thank you for your contributions.

@react-native-bot issue still occurring on React Native 0.55

@react-native-bot When using cocoapods to manage react native, the issue will show up.

versions I try 0.50.4 and 0.55.4

Just installed react-native-svg on React Native 0.55.3 and this issue popped up.

screen shot 2018-05-30 at 16 04 07

issue still occurring on:

react-native-cli: 2.0.1
react-native: 0.55.4

I am having exact same warning with a fresh new created project without any code added but only Firebase dependencies injected.
I am using : react: 16.3.1
react-native: 0.55.4
Thank you

I am having the same issue but, for me it was because of the previous terminal window running when i rerun the build from Xcode. I just quit the terminal and the simulator and run the build again, this issue got resolved.

I also have react-native-device-info installed, but the yellow message is slightly different for me: 'RCTBridge required dispatch_sync to load RCCManagerModule...'

I was going to say I get this warning when I map over an array to return new elements or pass a style prop to custom components, but now the warning seems unpredictable.

Encountered this issue on OS11 as well.

  • react-navigation
  • react-native-vector-icons

I see a few people here that have mentioned using vector-icons.

I also had the same issue for me i have unlink and remove react-native-device-info and now that warning is not appearing.

I had the same issue after adding react-native-vector-icons, removed it and warning went away.

FYI, this warning showed up today after reload with remote debugger on. Turned remote off, did reload, no warning. Turned remote back on, did reload, no warning.

FYI, this warning showed up today after reload with remote debugger on. Turned remote off, did reload, no warning. Turned remote back on, did reload, no warning.

~After reading @mokriya comment I reloaded the debugger and it stopped showing the warning. It is possible that moving between Android and IOS emulator / simulator with the debugger tab open in the browser is causing this.~

Nope not that

iOS 12, RN 0.57.0 same issue.

how to resolve?
or ignore is?

import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['RCTBridge']);

Yes, I am having this issue as well after adding react-native-video, but what does it mean? It doesn't seem to prevent videos from playing. Also why are all of these third-party components causing the error? Are we missing something in developing our native modules?

Getting same issue on iOS 12.1, RN 0.57.4 without react-native-device-info

I have some issue

"lodash": "^4.17.10",
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-check-box": "^2.1.0",
"react-native-collapsible": "^1.2.1",
"react-native-elements": "^0.19.1",
"react-native-google-analytics-bridge": "^5.8.0",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-map-clustering": "^1.3.0",
"react-native-maps": "^0.21.0",
"react-native-masked-text": "^1.7.2",
"react-native-modal-picker": "0.0.16",
"react-native-onesignal": "^3.2.8",
"react-native-simple-radio-button": "^2.7.2",
"react-native-svg": "^8.0.0",
"react-native-ui-kitten": "^3.0.1",
"react-native-vector-icons": "^5.0.0",
"react-navigation": "^2.11.2",
"rn-sliding-up-panel": "^1.2.1",
"victory-native": "^30.5.0"

In IOS getting "RCTBridge required dispatch_snyc to load RCTDevLoadingView This may lead to deadlocks."

Maybe you should Project -> Clean in your Xcode, then re-run your application.

I've confirmed that this comment is the solution. Thank you @mattijsf!

Find your RCTBridgeDelegate and override the extraModulesForBridge method.

Objective-C

@interface MyBridgeDelegate : NSObject <RCTBridgeDelegate>
@end

@implementation MyBridgeDelegate

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
  return @[
#if RCT_DEV
    [bridge moduleForClass:[RCTDevLoadingView class]],
#endif
  ];
}

@end

Swift 4

class MyBridgeDelegate: NSObject, RCTBridgeDelegate {
  func extraModules(for bridge: RCTBridge!) -> [RCTBridgeModule]! {
    var modules: [Any]! = []
    if RCT_DEV == 1 {
      modules.append(bridge.module(for: RCTDevLoadingView.self))
    }
    return modules as? [RCTBridgeModule]
  }
}

Repro on iOS12, RN 0.57.8

image
my dependency,the same issue

@aleclarson what exactly does that code do?

@ccorcos It loads the RCTDevLoadingView earlier, so it doesn't have to block the main thread when it's loaded by RN. This comment might be an easier solution for you.

Not sure if this is still happening for others but it still happening for me with RN 0.57.8 + iOS 11.3 (at least)

I'm using the change from the comment above by @devburmistro successfully

Facing this issue

RN 0.58.3
iOS 11.4, 12.1

and it does lead to deadlock. It happens to me when I closing custom modal

I haven't had this on previous 0.57.8 which was just fine

Same here, getting this after upgrading to RN 0.58.3

my exact error is: Unable find module for DevLoadingView, the solutions above do not fix it for me

screen shot 2019-01-30 at 0 54 04

Seems related to this commit, which has in fact added on RN 0.58.3

https://github.com/facebook/react-native/commit/d7a0c44590bcf3fb9d055aeae3391d5bcd7e21be#diff-a2a67635fffd7b690d14dc17ae563a71

I am experiencing the same "Unable to find module for DevLoadingView" issue as @oferRounds after upgrading to RN 0.58.3 today.

It seems to trigger when an app is first opened in the simulator. Subsequent reloads (cmd-R) do not present the error.

EDIT: filed a separate issue for this specific error: #23235

I can also confirm that this is still an issue on iOS with 0.58.3.

Some interesting observations:

  • As @superguineapig said, it does not show up after you reload the app.
  • If you quit all terminal instances, and build the app/start the packager fresh, it will _not_ show the error. However, if you then keep the packager open and re-build the app from Xcode, the error shows up after the app attaches to the packager again.

_Edit: I can confirm that this workaround is still a viable solution._

I was able to workaround the warning by updating AppDelegate.m

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                            moduleProvider:nil
                                             launchOptions:launchOptions];
#if RCT_DEV
  [bridge moduleForClass:[RCTDevLoadingView class]];
#endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"Test"
                                            initialProperties:nil];
  ...
}

This worked for me.

Has anyone been able to register a custom RCTBridgeDelegate while using react-native-navigation? You should be able to pass a delegate via the bridgeManagerDelegate param, but it seems broken (the RCTBridge provided to extraModulesForBridge is always nil).

I just started getting this immediately after adding react-native-device-info on RN 0.58.6 and iOS 12.

OK, this comment seems to have fixed it for me.

React Native 0.59.1

I start seeing this warning right after installing react-native-device-info as well, any real solution?

I'm seeing this randomly as well, and I have made no changes in my app code other than what's necessary (config) to make everything work again, in upgrading from RN 0.57.8 to 0.59.5. In my case, lib in question is CodePush, with 2 yellowbox warnings:

RCTBridge required dispatch_sync to load CodePush. This may lead to deadlocks
and
Required dispatch_sync to load constants for CodePush. This may lead to deadlocks

This issue is long. I assume nailing down the root cause is still a mystery? Let me know what other debug info I can provide to help.


My package.json:

{
  "name": "wonderswipe",
  "version": "0.0.1",
  "private": true,
  "eslintConfig": {
    "parserOptions": {
      "ecmaVersion": 7,
      "sourceType": "module",
      "ecmaFeatures": {
        "jsx": true
      }
    },
    "env": {
      "browser": false,
      "node": true
    },
    "plugins": [
      "react",
      "react-native",
      "react-hooks"
    ],
    "rules": {
      "comma-dangle": [
        2,
        "always-multiline"
      ],
      "semi": [
        2,
        "never"
      ],
      "react-native/no-unused-styles": 2,
      "react-native/split-platform-components": 2,
      "react-hooks/rules-of-hooks": "error"
    }
  },
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@postlight/mercury-parser": "^2.0.0",
    "@react-native-community/async-storage": "^1.3.3",
    "@react-native-community/viewpager": "^1.1.6",
    "babel-plugin-idx": "^2.4.0",
    "buffer": "^5.2.1",
    "he": "^1.1.0",
    "idx": "^2.5.5",
    "lodash": "^4.17.2",
    "moment": "^2.19.0",
    "moment-timezone": "^0.5.10",
    "node-summary": "../node-summary",
    "react": "16.8.3",
    "react-native": "^0.59.4",
    "react-native-actionsheet": "^2.4.2",
    "react-native-blur": "^3.2.0",
    "react-native-cached-image": "../react-native-cached-image",
    "react-native-cheerio": "^1.0.0-rc.4",
    "react-native-code-push": "^5.3",
    "react-native-custom-tabs": "^0.1.7",
    "react-native-easy-toast": "^1.0.9",
    "react-native-firebase": "^5.3.1",
    "react-native-fit-image": "^1.4.8",
    "react-native-flanimatedimage": "^0.4.0",
    "react-native-highlight-words": "^1.0.1",
    "react-native-keep-awake": "^4.0.0",
    "react-native-linear-gradient": "^2.0.0",
    "react-native-modal-dropdown": "^0.6.2",
    "react-native-modalbox": "^1.6.0",
    "react-native-orientation": "^3.1.3",
    "react-native-parallax-scroll-view": "../react-native-parallax-scroll-view",
    "react-native-rate": "^1.0.8",
    "react-native-safari-view": "^2.0.0",
    "react-native-sentry": "^0.42.0",
    "react-native-sha256": "^1.1.1",
    "react-native-status-bar-size": "^0.3.2",
    "react-native-swiper": "^1.5.14",
    "react-native-tooltip": "^5.2.0",
    "react-native-tts": "^3.0.0",
    "react-native-vector-icons": "^6.4.2",
    "react-native-webview": "^5.7.0",
    "react-native-webview-bridge": "^0.40.1",
    "react-redux": "^7.0.1",
    "redux": "^4.0.0",
    "redux-thunk": "^2.1.0"
  },
  "devDependencies": {
    "babel-eslint": "^10.0.1",
    "eslint": "^5.15.1",
    "eslint-plugin-react": "^7.12.4",
    "eslint-plugin-react-hooks": "^1.0.1",
    "eslint-plugin-react-native": "^3.6.0",
    "patch-package": "^6.1.2",
    "postinstall-postinstall": "^2.0.0",
    "redux-logger": "^3.0.6"
  },
  "resolutions": {
    "babel-core": "7.0.0-bridge.0"
  }
}

image

i fixed this error by @grossingdev comment. but after updating react-native to 0.59.8 version. this error has come again

At react-native 0.59.3, here is what the code should look like to workaround the problem:

  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
  #if RCT_DEV
    [bridge moduleForClass:[RCTDevLoadingView class]];
  #endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"YourAppName"
                                            initialProperties:nil];

Facing the same warning after updating the AppDelegate.m file while Integrating the react-native-maps google map in ios App.
"react-native": "0.59.5"

For me -- this worked ---
"react": "16.8.3",
"react-native": "0.59.9",
AppDelegate.m file

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
//  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
//                                                   moduleName:@"mobileapp"
//                                            initialProperties:nil];


  NSURL *theurl ;
#if DEBUG
  theurl = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  theurl = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif

  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:theurl
                                            moduleProvider:nil
                                             launchOptions:launchOptions];
#if RCT_DEV
  [bridge moduleForClass:[RCTDevLoadingView class]];
#endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"mobileapp"
                                            initialProperties:nil];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

@amitkumar3968 format your comment as code

I just got similar error:
Screenshot 2019-07-23 at 10 27 04


my package.json:

{
  "name": "auth",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "firebase": "^6.3.1",
    "react": "16.8.6",
    "react-native": "0.60.0"
  },
  "devDependencies": {
    "@babel/core": "7.5.0",
    "@babel/runtime": "7.5.0",
    "@react-native-community/eslint-config": "0.0.3",
    "babel-jest": "24.8.0",
    "eslint": "6.0.1",
    "jest": "24.8.0",
    "metro-react-native-babel-preset": "0.54.1",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

Reload fixed it, but seems something isn't right if this happens randomly.

This issue only happens to me when I deactivate the debugger. When opening the Perf Monitor, I noticed that the RAM goes from 卤100MB to 卤300MB after deactivating.

With debugger:
Screen Shot 2019-07-25 at 9 07 45 AM

Without debugger:
Screen Shot 2019-07-25 at 9 08 09 AM

The proposed workaround does not work in my case, since it only stops displaying the warning, but it does not solve the problem with memory.

I wonder if this problem would affect the performance of the app in release mode.

The aforementioned workaround solved this problem for me as well, on React Native 0.59.10:

diff --git a/ios/Foo/AppDelegate.m b/ios/Foo/AppDelegate.m
index e446e79..2c28719 100644
--- a/ios/Foo/AppDelegate.m
+++ b/ios/Foo/AppDelegate.m
@@ -18,6 +18,11 @@

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

+// https://github.com/facebook/react-native/issues/16376#issuecomment-350523177
+#if RCT_DEV && __has_include(<React/RCTDevLoadingView.h>)
+#import <React/RCTDevLoadingView.h>
+#endif
+
 @implementation AppDelegate

@@ -39,6 +44,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

   RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
+
+  // https://github.com/facebook/react-native/issues/16376#issuecomment-350523177
+  #if RCT_DEV && __has_include(<React/RCTDevLoadingView.h>)
+  [bridge moduleForClass:[RCTDevLoadingView class]];
+  #endif
+
   RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"Foo" initialProperties:nil];
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

The only difference here is that I matched the exact same logic for loading it (the RCT_DEV && __has_include(<React/RCTDevLoadingView.h>) part)...

Just got 2 with react-native-firebase. Happens rarely but:
image
image

I was able to re-create this issue by adding app icons to the Images.xcassets/AppIcon.appiconset directory of my newly created test project using react-native 0.61.2. Adding the lines of code mention in this issue solved the issue for me.

react-native 0.59.10
same issue.

same issue here!! any body solved this problem?

I was able to workaround the warning by updating AppDelegate.m

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                            moduleProvider:nil
                                             launchOptions:launchOptions];
#if RCT_DEV
  [bridge moduleForClass:[RCTDevLoadingView class]];
#endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"Test"
                                            initialProperties:nil];
  ...
}

this workaround solved the warning. Thank you very much.

Same issue, but if I delete block of code componentDidUpdate, this warning dissappear. But but but but I need componentDidUpdate.

first : open Xcode, normaly Xcode answer if you want install a component : click install

When you update macOS software, you must open Xcode for update

I was able to workaround the warning by updating AppDelegate.m

#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                            moduleProvider:nil
                                             launchOptions:launchOptions];
#if RCT_DEV
  [bridge moduleForClass:[RCTDevLoadingView class]];
#endif
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"Test"
                                            initialProperties:nil];
  ...
}

@grossingdev what is the jsCodeLocation please? I know it's supposed to be a URL but what should it point to?

Just got 2 with react-native-firebase. Happens rarely but:
image
image

Firebase is causing this error for me. Mind sharing how you solved it? @fungilation

@abdi4 I just ran into this too, did you manage to solve it?

@zloka no this happens randomly and im not able to recreate it

Simplest way to ignore this or any other warning is

import { YellowBox } from 'react-native';

YellowBox.ignoreWarnings([
    'RCTBridge'
]);

This issue arises for me non-deterministically. The only fix I have whenever it does, is to delete the app from my device and re-run.

Swift Solution:

let bridge = RCTBridge(bundleURL: jsCodeLocation, moduleProvider: nil, launchOptions: nil)
#if RCT_DEV
bridge?.module(for: RCTDevLoadingView.self)
#endif
let rootView = RCTRootView(bridge: bridge!, moduleName: "AppMain", initialProperties: nil)

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Here's your activity. The warning continue to pops up in fresh new apps.

@sospedra could you provide a repo of this happening with React Native template without any external dependencies?

For the cases where it happens with third party libraries, issues should be filed with those libraries

same issue on 0.63.2 I'm not sure what is causing it, it happens randomly sometimes all interactions of the app is no longer working.

Same warning comes only with react-native-macos on Metro (manual) reloads, not on code changes updating, and not with ios, android, or windows.
NB : for me with RN 0.62.2

Got the same warning with a Catalyst App.

I closed the simulator, killed metro, in XCode build and run Warning disappeared !

Closing the metro bundler and uninstalling the app from the simulator disappeared the warning. But not sure what's happening under the hood. warning appeared after adding thunk package.

Was this page helpful?
0 / 5 - 0 ratings