简体   繁体   English

React Native:仅当使用从iPhone 4G / LTE个人热点共享的网络时,“网络请求失败”

[英]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.

相关问题 网络请求失败 - Expo Fetch - React Native - Network Request Failed - Expo Fetch - React Native 响应本机上传图像的网络请求失败 - Network request failed on react native upload image React Native:获取请求失败并显示错误 - TypeError:网络请求失败(...) - React Native: fetch request failed with error - TypeError: Network request failed(…) 网络请求在 react-native expo 问题中失败 - Network request failed in react-native expo problem React Native:使用get请求的Axios网络错误 - React Native: Axios network error using get request 反应-仅在HTTPS上发送POST请求时出现网络错误 - React - Network Error when sending POST request only when on HTTPS Firebase onCall function 使用 4G 网络返回错误,但适用于 Wifi - Firebase onCall function return Error with 4G network but works with Wifi React Native Fetch Remote Http 请求引发网络请求失败(在 Android 设备上) - React Native Fetch Remote Http request throws Network Request Failed (On Android Device) 反应:错误TypeError:网络请求失败 - React : error TypeError: Network request failed React-Native无法连接到Node.js服务器(网络请求因错误而失败) - React-Native not able to connect to a Node.js server (Network request failed onerror)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM