【问题标题】:React-Native app hangs on splash on iOS, but on on Android works just fineReact-Native 应用程序在 iOS 上挂起,但在 Android 上运行正常
【发布时间】:2021-01-29 23:40:38
【问题描述】:

我有一个使用 React-Native 0.62.3 的应用程序,它不能在 iOS 上运行。它启动,从 Metro 接收捆绑包,除了不断显示启动画面外什么也不做。这是运行日志:

flipper: FlipperClient::addPlugin Inspector
flipper: FlipperClient::addPlugin Preferences
flipper: FlipperClient::addPlugin React
flipper: FlipperClient::addPlugin Network
2020-10-15 15:30:32.116261+0300 fastboss_mobile_rn[60669:792251] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000aebe00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-10-15 15:30:32.326978+0300 fastboss_mobile_rn[60669:793032] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2020-10-15 15:30:32.410529+0300 fastboss_mobile_rn[60669:792251] [native] Running application fastboss_mobile_rn ({
    initialProps =     {
    };
    rootTag = 1;
})
2020-10-15 15:30:39.443156+0300 fastboss_mobile_rn[60669:793034] [connection] nw_socket_handle_socket_event [C6.1:1] Socket SO_ERROR [61: Connection refused]
2020-10-15 15:30:39.450465+0300 fastboss_mobile_rn[60669:793034] [connection] nw_socket_handle_socket_event [C6.2:1] Socket SO_ERROR [61: Connection refused]
2020-10-15 15:30:39.452317+0300 fastboss_mobile_rn[60669:793033] [connection] nw_connection_get_connected_socket [C6] Client called nw_connection_get_connected_socket on unconnected nw_connection
2020-10-15 15:30:39.452482+0300 fastboss_mobile_rn[60669:793033] TCP Conn 0x600003cf4a50 Failed : error 0:61 [61]
2020-10-15 15:30:39.975074+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/Dashboard/content/index.js -> components/Dashboard/content/Customers.js -> components/Dashboard/content/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:39.980483+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/Dashboard/index.js -> components/Dashboard/Menu.js -> components/Dashboard/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:39.986365+0300 fastboss_mobile_rn[60669:793119] [javascript] Require cycle: components/index.js -> components/Dashboard/index.js -> components/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-10-15 15:30:40.029406+0300 fastboss_mobile_rn[60669:793119] [javascript] Running "fastboss_mobile_rn" with {"rootTag":1,"initialProps":{}}
2020-10-15 15:30:40.166056+0300 fastboss_mobile_rn[60669:793284] [native] Manifest does not exist - creating a new one.

(null)
2020-10-15 15:30:40.236534+0300 fastboss_mobile_rn[60669:793119] [javascript] 'token on start up:', null

我曾尝试在 Google 上搜索 nw_socket_handle_socket_event [C6.1:1] Socket SO_ERROR [61: Connection refused],但对我而言,似乎所有结果都与这条线循环有关,但就我而言,它只出现了 2 次。

最后一个日志字符串是来自应用程序的 console.log(),所以我猜它有点尝试工作,我不知道..

如果你能告诉我可能出了什么问题,我会非常高兴,因为我已经没有办法解决它了

xcode v12.0.1 ios 14 模拟器

如果我能提供任何对你有用的信息,请告诉我

【问题讨论】:

  • 也有这个问题,我喜欢你在模拟器上运行,所以下面的答案没有意义。如果我解决了这个问题,我会在这里发帖。

标签: javascript ios xcode react-native


【解决方案1】:

我遇到了这个问题,发现这是因为我的 iPhone 和运行 XCode 的 Mac 位于不同的 WiFi 网络上。验证两台设备是否在同一网络上。

【讨论】:

  • 不是这样,我已经将xcode和iphone设置在同一个wifi上,但仍然没有连接
猜你喜欢
  • 1970-01-01
  • 2018-04-29
  • 2018-02-20
  • 1970-01-01
  • 2020-07-15
  • 2022-01-08
  • 2023-01-17
  • 2016-12-04
  • 1970-01-01
相关资源
最近更新 更多