Closed antoinerousseau closed 1 year ago
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 +1
s, 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:
Given the intersection with @antoinerousseau's list, the possible locations for this bug are:
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.
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.
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
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
Expected Behavior
No warning
Actual Behavior
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