[英]React Native: “Network request failed” only when using network shared from iPhone 4G/LTE personal hotspot
I've been testing a simple React Native app heavily borrowed from the sample app, and ran into this problem only when I use network shared from my iPhone 4G/LTE hotspot. 我一直在测试从示例应用程序大量借用的简单React Native应用程序,并且仅当我使用从iPhone 4G / LTE热点共享的网络时才遇到此问题。 This won't be seen when connecting to a WiFi AP.
连接到WiFi AP时看不到此消息。
Here's the detailed error message: 这是详细的错误消息:
Request.fetch.xhr.onload index.ios.bundle:11123
XMLHttpRequestBase.$XMLHttpRequestBase_sendLoad index.ios.bundle:11569
XMLHttpRequestBase.callback index.ios.bundle:11549
XMLHttpRequest.<anonymous> index.ios.bundle:11330
MessageQueueMixin._invokeCallback index.ios.bundle:7446
Object.ErrorUtils.applyWithGuard index.ios.bundle:873
guardReturn index.ios.bundle:7277
MessageQueueMixin.invokeCallbackAndReturnFlushedQueue index.ios.bundle:7459
messageHandlers.executeJSCall:method:arguments:callback: debugger-ui:54
WebSocket.ws.onmessage debugger-ui:80
I tried to look for the similar issue but without success. 我试图寻找类似的问题,但没有成功。 Tracing back to the corresponding fetch.js for the XmlHttpRequest function doesn't help me to know the issue much either.
追溯到XmlHttpRequest函数的相应fetch.js并不能帮助我了解很多问题。 Could anyone have the similar experience and help?
有谁能提供类似的经验和帮助?
This problem was solved by resetting the Xcode simulator. 通过重置Xcode模拟器解决了此问题。
See here for How to reset a simulator 有关如何重置模拟器的信息,请参见此处
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.