React本机IOS-Firebase身份验证网络请求失败

React本机IOS-Firebase身份验证网络请求失败,ios,firebase,react-native,networking,request,Ios,Firebase,React Native,Networking,Request,我已经实现了一个带有firebase集成的react本机应用程序。 此处以匿名方式登录用户 我将react native升级为0.60,现在函数signinanoymously()返回一个错误“Network Request failed”。 描述:“发生网络错误(例如超时、连接中断或无法访问主机)。” 我已经在Xcode中将“允许任意加载”设置为“是” 我已经在iPhone模拟器设置->开发者->允许HTTP服务中进行了设置 和我的index.js文件: import firebase f

我已经实现了一个带有firebase集成的react本机应用程序。 此处以匿名方式登录用户

我将react native升级为0.60,现在函数signinanoymously()返回一个错误“Network Request failed”。 描述:“发生网络错误(例如超时、连接中断或无法访问主机)。”

  • 我已经在Xcode中将“允许任意加载”设置为“是”

  • 我已经在iPhone模拟器设置->开发者->允许HTTP服务中进行了设置

和我的index.js文件:

import firebase from "./src/service/Firebase"

firebase.auth().signInAnonymously().catch(function (error) {
    console.log(error.code);
    console.log(error.message);
});

这是我的package.json

"dependencies": {
    "@popmotion/popcorn": "^0.4.2",
    "@react-native-community/async-storage": "^1.6.1",
    "@react-native-community/geolocation": "^2.0.2",
    "d3-shape": "^1.3.5",
    "firebase": "^6.5.0",
    "geofirestore": "^3.3.1",
    "native-base": "^2.13.5",
    "randomcolor": "^0.5.4",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-card-stack-swiper": "^1.1.0",
    "react-native-cardview": "^2.0.3",
    "react-native-easy-grid": "^0.2.2",
    "react-native-elements": "^1.1.0",
    "react-native-firebase": "^5.5.6",
    "react-native-gesture-handler": "^1.4.1",
...
}
在我的firebase控制台中,用户以匿名方式登录,但仍然会发生错误

我已经读过多篇关于类似问题的文章,但是我做了上面描述的所有事情,没有任何帮助


有人能帮我吗?

你解决过这个问题吗?由于此问题,我自己无法升级到0.60。我没有找到任何解决方案,但我认识到只有在远程调试ios模拟器时才会出现此问题。如果我不调试,网络请求失败实际上不会出现同样的问题,但是如果你不能使用调试模式,开发几乎是不可能的:(这是正确的,我不知道为什么会存在这个问题。)不幸的是,我在“调试”的编码中使用了大量的Alert.Alert(xxx),因为>0.6
import firebase from "./src/service/Firebase"

firebase.auth().signInAnonymously().catch(function (error) {
    console.log(error.code);
    console.log(error.message);
});

"dependencies": {
    "@popmotion/popcorn": "^0.4.2",
    "@react-native-community/async-storage": "^1.6.1",
    "@react-native-community/geolocation": "^2.0.2",
    "d3-shape": "^1.3.5",
    "firebase": "^6.5.0",
    "geofirestore": "^3.3.1",
    "native-base": "^2.13.5",
    "randomcolor": "^0.5.4",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-card-stack-swiper": "^1.1.0",
    "react-native-cardview": "^2.0.3",
    "react-native-easy-grid": "^0.2.2",
    "react-native-elements": "^1.1.0",
    "react-native-firebase": "^5.5.6",
    "react-native-gesture-handler": "^1.4.1",
...
}