react本地模拟器无法连接MAC上的服务器

oyxsuwqo  于 2023-01-27  发布在  React
关注(0)|答案(2)|浏览(117)

未能连接到开发服务器。
确保以下内容:

  • 节点服务器正在同一网络上运行且可用-从react-native根目录运行“npm start”
  • 在AppDelegate中正确设置了节点服务器URL
  • WiFi已启用并连接到与节点服务器相同的网络

网址:http://localhost:8081/index.bundle.org
RCTFatal __28-[RCTCxx桥接句柄错误:]阻塞调用调度调用阻塞和释放调度客户端调用调度主队列回调4CFCFRUNLOOP IS服务主调度队列CFRunLoop运行CFRunLoop运行特定GSEventRunModal -[UI应用程序运行] UI应用程序主启动模拟0x 0
这个错误显示在设备模拟器正常工作,但今天出现的问题,没有改变我的React Native代码
I npm在react本地根文件夹启动。当从设备模拟器调用时,Metro Bundler停留在99.4%
我的React原生版本是0.61.2
我尝试解决它的许多解决方案从谷歌,但它还没有工作。请。建议我

ymzxtsji

ymzxtsji1#

与http://localhost:8081/debugger-proxy?role = client的连接超时。是否正在运行节点代理?如果正在设备上运行,请检查RCTWebSocketExecutor.m中的IP地址是否正确。

RCTFatal -[RCTWebSocketExecutor setUp] facebook::react::(anonymous namespace)::RCTObjcExecutor::RCTObjcExecutor(id, void (NSError*) block_pointer, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1facebook::react::ExecutorDelegate) facebook::react::(anonymous namespace)::RCTObjcExecutor::RCTObjcExecutor(id, void (NSError*) block_pointer, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1facebook::react::ExecutorDelegate) facebook::react::RCTObjcExecutorFactory::createJSExecutor(std::__1::shared_ptrfacebook::react::ExecutorDelegate, std::__1::shared_ptrfacebook::react::MessageQueueThread) (anonymous namespace)::GetDescAdapter::createJSExecutor(std::__1::shared_ptrfacebook::react::ExecutorDelegate, std::__1::shared_ptrfacebook::react::MessageQueueThread) facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__1::shared_ptrfacebook::react::ModuleRegistry, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::InstanceCallback) facebook::react::NativeToJsBridge::NativeToJsBridge(facebook::react::JSExecutorFactory*, std::__1::shared_ptrfacebook::react::ModuleRegistry, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::InstanceCallback) std::__1::__unique_iffacebook::react::NativeToJsBridge::__unique_single std::__1::make_unique<facebook::react::NativeToJsBridge, facebook::react::JSExecutorFactory*, std::__1::shared_ptrfacebook::react::ModuleRegistry&, std::__1::shared_ptrfacebook::react::MessageQueueThread&, std::__1::shared_ptrfacebook::react::InstanceCallback&>(facebook::react::JSExecutorFactory*&&, std::__1::shared_ptrfacebook::react::ModuleRegistry&, std::__1::shared_ptrfacebook::react::MessageQueueThread&, std::__1::shared_ptrfacebook::react::InstanceCallback&) facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0::operator()() decltype(std::__1::forward<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0&>(fp)()) std::__1::__invoke<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0&>(facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0&) void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0&>(facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0&) std::__1::__function::__alloc_func<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0, std::__1::allocator<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0>, void ()>::operator()() std::__1::__function::__func<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0, std::__1::allocator<facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry)::$_0>, void ()>::operator()() std::__1::__function::__value_func<void ()>::operator()() const std::__1::function<void ()>::operator()() const facebook::react::tryAndReturnError(std::__1::function<void ()> const&) facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2::operator()() const decltype(std::__1::forward<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&>(fp)()) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&>(facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&) void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&>(facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2&) std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2>, void ()>::operator()() std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&)::$_2>, void ()>::operator()() std::__1::__function::__value_func<void ()>::operator()() const std::__1::function<void ()>::operator()() const facebook::react::RCTMessageThread::runSync(std::__1::function<void ()>) facebook::react::RCTMessageThread::runOnQueueSync(std::__1::function<void ()>&&) facebook::react::Instance::initializeBridge(std::__1::unique_ptr<facebook::react::InstanceCallback, std::__1::default_deletefacebook::react::InstanceCallback >, std::__1::shared_ptrfacebook::react::JSExecutorFactory, std::__1::shared_ptrfacebook::react::MessageQueueThread, std::__1::shared_ptrfacebook::react::ModuleRegistry) -[RCTCxxBridge _initializeBridgeLocked:] -[RCTCxxBridge _initializeBridge:] __21-[RCTCxxBridge start]_block_invoke.166 decltype(std::__1::forward<void () block_pointer __strong&>(fp)()) std::__1::__invoke<void () block_pointer __strong&>(&&, decltype(std::__1::forward<void () block_pointer __strong&>(fp)())&&...) void std::__1::__invoke_void_return_wrapper<void, true>::__call<void () block_pointer __strong&>(void () block_pointer __strong&) std::__1::__function::__alloc_func<void () block_pointer __strong, std::__1::allocatorstd::__1::allocator, void ()>::operator()() std::__1::__function::__func<void () block_pointer __strong, std::__1::allocatorstd::__1::allocator, void ()>::operator()() std::__1::__function::__value_func<void ()>::operator()() const std::__1::function<void ()>::operator()() const facebook::react::tryAndReturnError(std::__1::function<void ()> const&) -[RCTCxxBridge _tryAndHandleError:] __NSThreadPerformPerform CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION __CFRunLoopDoSource0 __CFRunLoopDoSources0 __CFRunLoopRun CFRunLoopRunSpecific +[RCTCxxBridge runRunLoop] NSThread__start _pthread_start thread_start

有时以上错误显示在模拟器上

8iwquhpp

8iwquhpp2#

我可以解决这个。原因从有下面的代码在一些文件在我的项目

import { isGetAccessor } from 'typescript';

当我摆脱它,我的项目又回来工作了

相关问题