我在iOS应用程序启动时随机收到此警告(即并非总是如此)。
是
是
作业系统:macOS Sierra 10.12.6
节点:6.10.2
纱:1.0.2
npm:5.4.2
守望者:4.7.0
Xcode:Xcode 9.0构建版本9A235
Android Studio:2.1 AI-143.2915827
软件包:(需要=>已安装)
反应:^ 16.0.0 => 16.0.0
react-native:^ 0.49.3 => 0.49.3
没有警告
不适用
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
同样在这里!
得到了这个黄色的iOS问题
我也看到了。 可能与#11196有关。
我认为这也是导致应用程序在尝试重新加载时崩溃的原因。 它失败了Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This method must not be called before the JS thread is created'
我还时常在iOS 11上收到此错误,而且我不知道如何调试此错误以提供更多信息。 在这种情况下,Stacktrace完全没有帮助。
+1
+1
请停止添加+1
s,这将生成不添加任何信息的电子邮件通知。 请改用“添加反应”功能。
同样的问题。 这是我使用的软件包:
给定与@antoinerousseau的列表的交集,此错误的可能位置是:
我刚刚添加了react-native-device-info,并将其从rn 0.49移至0.50。 现在我发现了这个错误。 不知道这是否是问题,但是这是我得到这个问题的时间。
同样的问题...
那不是我的错吗?
同样的问题...您有什么解决方案吗?
同样的问题。 上面列表中使用的唯一包是react-native-sentry
。
今天在这里同样的问题,我已经启动了一个全新的应用程序,只有我添加的软件包
“ 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”,
首次随机加载时,应用崩溃。
有人解决了吗?
@dantman我在安装react-native-device-info之后立即开始看到该问题,因此我高度怀疑该问题至少在我们的情况下与该特定软件包有关。
我使用的唯一另一个软件包是react-native-keychain,我在很早以前就安装了它,没有任何问题,因此看起来不错。
rebeccahughes / react-native-device-info#260似乎有一条消息指向RNDeviceInfo
而此错误指向RCTDevLoadingView
。 因此,可能有一个以上的点触发此警告。
如果要在以下行上放置断点:
RCTLogWarn(@"RCTBridge required dispatch_sync to load %@. This may lead to deadlocks", _moduleClass);
您可以看到哪个模块/堆栈负责加载RCTDevLoadingView
在我的情况下是RCTCxxBridge.mm
,它正在加载远程包并报告RCTDevLoadingView
的下载进度):
... onProgress:^(RCTLoadingProgress *progressData) {
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
RCTDevLoadingView *loadingView = [weakSelf moduleForClass:[RCTDevLoadingView class]];
[loadingView updateProgress:progressData];
#endif
}];
此处,RCTCxxBridge使用的是moduleForClass
,如果模块实例尚不可用,它将加载该模块的实例。 由于用于onProgress
块的队列, RCTDevLoadingView
将被加载到非主队列中,而RCTDevLoadingView
需要主队列设置。
我能要解决由乐观警告加载RCTDevLoadingView
由我返回一个实例RCTBridgeDelegate
使用:
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge;
我可以通过更新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];
...
}
反应本机:0.50.4
同样的问题
反应本机:0.51.0
同样的问题
“ react”:“ 16.2.0”,
“ react-native”:“ 0.52.0”,
同样的问题
“ react”:“ 16.2.0”,
“ react-native”:“ 0.51.0”,
“ react-native-device-info”:“ 0.13.0”
我这里的解决方案是将react-native-device-info移出pod文件,并在项目中手动将其链接。 那似乎解决了问题。 我认为另一种方法可能是在Pod文件中包括CxxBridge作为React的子规范,但这需要Folly(因此需要boost),并且整个设置麻烦/需要很长时间。 如果您想快速修复,只需将导致问题的软件包移出Pod。
未安装“ react-native-device-info”:
问题存在于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-active-dimensionions”:“ ^ 1.0.2”,
“ react-native-snap-carousel”:“ ^ 3.6.0”,
“ react-native-vector-icons”:“ ^ 4.5.0”,
“反应导航”:“ ^ 1.5.7”
它带有“ react-native-action-button”:“ ^ 2.8.4”,添加shadowStyle={{shadowOpacity: 0.9}}
解决了警告。
同样的问题在这里。
同样的问题。
RN 0.54.4
有人知道了吗?
该错误甚至出现在新创建的项目中。
“ react”:“ 16.3.1”,
“ react-native”:“ 0.54.4”
相同
+1
@antoinerousseau关于此问题有任何更新吗?
我不推荐@devburmistro提供的解决方案。 对于我的项目,它的包含创建了某种竞争条件,其中从模拟器运行它时,该断言错误会在启动时随机出现。
我的设置:
react-native-cli: 2.0.1
react-native: 0.53.0
从头开始设置我的仓库并在其中插入纯js代码后,我才开始遇到这个问题。 以前的仓库和这个新仓库之间的潜在差异是,现在我正在使用Cocoapods。
有人不使用Cocoapods吗?
我添加后就发生了
反应本机模糊
到嵌套在其中的共享扩展视图
反应本机模态盒
@Babazon发生这种情况时,您
抱歉。 我无法从共享扩展视图(仅主应用程序)调试/控制台日志。
+1
感谢您发布! 看来您的问题可能是指较旧版本的React Native。 您可以在最新版本v0.55中重现该问题吗?
感谢您的贡献。
@ react-native-bot问题仍然在React Native 0.55上发生
@ react-native-bot使用cocoapods管理本机反应时,将出现此问题。
我尝试的版本是0.50.4和0.55.4
刚刚在React Native 0.55.3上安装了react-native-svg,这个问题弹出了。
问题仍在发生:
react-native-cli:2.0.1
反应本机:0.55.4
对于新创建的项目,我有完全相同的警告,没有添加任何代码,但仅注入了Firebase依赖项。
我正在使用:反应:16.3.1
反应本机:0.55.4
谢谢
我遇到了同样的问题,但是对我来说,这是因为当我从Xcode重新运行构建时,先前的终端窗口正在运行。 我只是退出终端和模拟器,然后再次运行构建,此问题已解决。
我还安装了react-native-device-info,但是黄色消息对我来说略有不同:“ RCTBridge需要load_discatch_sync才能加载RCCManagerModule ...”
我要说的是,当我在数组上map
返回新元素或将style
prop传递给自定义组件时收到此警告,但是现在警告似乎不可预测。
在OS11上也遇到了此问题。
我在这里看到一些人提到使用矢量图标。
我也遇到了同样的问题,我已经取消链接并删除了react-native-device-info,现在没有出现警告。
添加react-native-vector-icons后,我遇到了同样的问题,将其删除,警告消失了。
仅供参考,今天的警告在重新打开远程调试器后出现。 关闭了遥控器,没有重新加载,没有警告。 重新打开遥控器,重新加载,没有警告。
仅供参考,今天的警告在重新打开远程调试器后出现。 关闭了遥控器,没有重新加载,没有警告。 重新打开遥控器,重新加载,没有警告。
〜阅读@mokriya注释后,我重新加载了调试器,它停止显示警告。 在浏览器中打开调试器选项卡的情况下,有可能在Android和IOS模拟器之间进行移动。
不,不是
iOS 12,RN 0.57.0相同的问题。
怎么解决?
还是无视是?
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['RCTBridge']);
是的,添加react-native-video后我也遇到这个问题,但这是什么意思? 似乎并不能阻止视频播放。 另外,为什么所有这些第三方组件都会导致错误? 我们在开发本机模块时是否缺少某些东西?
在没有react-native-device-info
iOS 12.1,RN 0.57.4上遇到相同的问题
我有问题
"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"
在IOS中,获取“ RCTBridge所需的dispatch_snyc来加载RCTDevLoadingView,这可能导致死锁。”
也许您应该在Xcode中Project -> Clean
,然后重新运行您的应用程序。
我已经确认此评论是解决方案。 谢谢@mattijsf!
找到您的RCTBridgeDelegate
并覆盖extraModulesForBridge
方法。
<strong i="11">@interface</strong> MyBridgeDelegate : NSObject <RCTBridgeDelegate>
<strong i="12">@end</strong>
<strong i="13">@implementation</strong> MyBridgeDelegate
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
{
return @[
#if RCT_DEV
[bridge moduleForClass:[RCTDevLoadingView class]],
#endif
];
}
<strong i="14">@end</strong>
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]
}
}
iOS12上的Repro,RN 0.57.8
我的依赖,同样的问题
@aleclarson该代码的作用是什么?
@ccorcos较早加载RCTDevLoadingView
,因此在RN加载时不必阻塞主线程。 此评论可能是您更轻松的解决方案。
不知道这是否还会在其他人身上发生,但对于我来说,至少在RN 0.57.8 + iOS 11.3上仍然发生
我正在成功使用@devburmistro的上述注释中的更改
面对这个问题
RN 0.58.3
iOS 11.4、12.1
并导致死锁。 关闭自定义模式时发生在我身上
我以前的0.57.8都没有这个
同样,升级到RN 0.58.3后得到
我的确切错误是: Unable find module for DevLoadingView
,以上解决方案无法为我解决
似乎与此提交相关,实际上已在RN 0.58.3中添加
https://github.com/facebook/react-native/commit/d7a0c44590bcf3fb9d055aeae3391d5bcd7e21be#diff -a2a67635fffd7b690d14dc17ae563a71
我今天0.58.3升级后遇到了同样的“无法找到模块DevLoadingView”问题作为@oferRounds到RN。
似乎是在模拟器中首次打开应用程序时触发的。 后续重新加载(cmd-R)不会出现此错误。
编辑:针对此特定错误提交了单独的问题:#23235
我还可以确认这在0.58.3的iOS上仍然是一个问题。
一些有趣的观察:
_编辑:我可以确认此替代方法仍然是可行的解决方案。
我可以通过更新
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-navigation时,有人能够注册自定义RCTBridgeDelegate吗? 您应该可以通过bridgeManagerDelegate
参数传递一个委托,但它似乎已损坏(提供给extraModulesForBridge
的RCTBridge始终nil
)。
在RN 0.58.6和iOS 12上添加react-native-device-info
之后,我立即开始获得此权限。
好的,此评论似乎已为我解决。
反应本机0.59.1
我也安装了react-native-device-info之后立即开始看到此警告,任何真正的解决方案?
我也随机地看到了这一点,除了从RN 0.57.8升级到0.59.5以便使所有内容重新工作所需的配置(配置)外,我没有对我的应用程序代码进行任何更改。 就我而言,有问题的lib是CodePush,带有2个黄框警告:
RCTBridge required dispatch_sync to load CodePush. This may lead to deadlocks
和Required dispatch_sync to load constants for CodePush. This may lead to deadlocks
这个问题很长。 我认为确定根本原因仍然是个谜吗? 让我知道我还能提供什么其他调试信息。
我的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"
}
}
我通过@grossingdev评论修复了此错误。 但在将react-native更新为0.59.8版本之后。 这个错误又来了
在react-native 0.59.3上,这是解决该问题的代码:
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];
在将react-native-maps
google maps集成到ios App中的同时更新AppDelegate.m文件后,遇到相同的警告。
"react-native": "0.59.5"
对我来说-这很有效-
“ react”:“ 16.8.3”,
“ native-native”:“ 0.59.9”,
AppDelegate.m文件
#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将注释格式设置为代码
我刚遇到类似的错误:
我的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"
}
}
重新加载修复了它,但是如果随机发生,似乎有些不对。
仅当我停用调试器时,才会发生此问题。 当打开Perf Monitor时,我注意到在停用后RAM从±100MB变为±300MB。
使用调试器:
没有调试器:
对于我而言,建议的解决方法不起作用,因为它仅停止显示警告,但不能解决内存问题。
我想知道这个问题是否会影响发布模式下应用程序的性能。
上述的解决方法也为我在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
+
<strong i="7">@implementation</strong> 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];
唯一的区别是我完全匹配加载逻辑( RCT_DEV && __has_include(<React/RCTDevLoadingView.h>)
部分)...
刚得到2个react-native-firebase
。 很少发生,但:
通过使用react-native 0.61.2将应用程序图标添加到新创建的测试项目的Images.xcassets/AppIcon.appiconset
目录中,我能够重新创建此问题。 添加此问题中提到的代码行为我解决了这个问题。
反应本色0.59.10
同样的问题。
同样的问题在这里! 任何机构都解决了这个问题?
我可以通过更新
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]; ... }
此解决方法解决了警告。 非常感谢你。
同样的问题,但是如果我删除代码块componentDidUpdate,此警告就会消失。 但是但是但是我需要componentDidUpdate。
首先:打开Xcode,如果要安装组件,通常打开Xcode答案:单击安装
更新macOS软件时,必须打开Xcode进行更新
我可以通过更新
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请问
刚得到2个
react-native-firebase
。 很少发生,但:
Firebase为我造成了此错误。 介意分享您如何解决呢? @真菌
@ abdi4我也遇到了这个问题,您能解决吗?
@zloka不,这是随机发生的,即时通讯无法重新创建
忽略此警告或任何其他警告的最简单方法是
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings([
'RCTBridge'
]);
这个问题对我来说是不确定的。 无论何时,我唯一的解决方法是从设备中删除该应用并重新运行。
快速解决方案:
let bridge = RCTBridge(bundleURL:jsCodeLocation,moduleProvider:nil,launchOptions:nil)
#if RCT_DEV
bridge..module(for:RCTDevLoadingView.self)
#万一
让rootView = RCTRootView(bridge:bridge !, moduleName:“ AppMain”,initialProperties:nil)
嗨,看来这个问题最近没有任何活动。 问题是否已解决,还是仍然需要社区的关注? 如果没有其他活动,则可能已关闭此问题。 您也可以将此问题标记为“讨论”,或将其添加到“积压”中,然后我将其保持打开状态。 感谢您的贡献。
嗨,看来这个问题最近没有任何活动。 问题是否已解决,还是仍然需要社区的关注? 如果没有其他活动,则可能已关闭此问题。 您也可以将此问题标记为“讨论”,或将其添加到“积压”中,然后我将其保持打开状态。 感谢您的贡献。
这是你的活动。 该警告会继续在新的应用程序中弹出。
@sospedra你能提供一个React Native模板在没有任何外部依赖的情况下发生的情况的回购吗?
对于第三方库发生的情况,应该向这些库提出问题
0.63.2
上的同一问题我不确定是什么原因引起的,它随机发生,有时应用程序的所有交互都不再起作用。
仅在Metro(手动)重新加载时,react-native-macos会发出相同的警告,而在代码更改更新时,以及在ios,android或Windows上不会出现相同的警告。
注意:对我而言,RN 0.62.2
使用Catalyst应用程序也收到了同样的警告。
我关闭了模拟器,在XCode中杀死了Metro, build and run
警告消失了!
关闭Metro bundler并从模拟器中卸载应用程序后,警告消失了。 但是不确定到底发生了什么。 添加thunk包后出现警告。
最有用的评论
请停止添加
+1
s,这将生成不添加任何信息的电子邮件通知。 请改用“添加反应”功能。