未捕获的错误:网络错误 [英] Uncaught Error: A network error

查看:31
本文介绍了未捕获的错误:网络错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我尝试使用 firebase 身份验证服务后,我收到一个未捕获的错误:发生网络错误(例如超时、连接中断或主机无法访问)

after I've tried to use the firebase authentication service, I got an uncaught error: a network error (such as timeout, interrupted connection or unreachable host) has occurred

我已尝试将所有相关域名列入白名单:

I have tried to whitelist all related domain-names:

  <allow-intent href="*.firebaseio.com" />
  <allow-intent href="*.firebaseapp.com" />
  <allow-intent href="*.google.com" />
  <allow-intent href="*.googleapis.com" />
  <allow-intent href="*.cloudflare.com" />
  <allow-intent href="auth.firebase.com" />
  <access origin="*" />

并请求互联网用户许可:

and ask for internet user permission:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

但仍然 - 尽管代码在网络浏览器上运行良好,但它仍然在 android 模拟器上显示此错误.

but still - despite the code run perfectly on web browser, it keep showing this error on the android emulator.

推荐答案

试试这个.它对我有用.

try, this. it worked for me.

<allow-navigation href="*.firebaseapp.com" />

这篇关于未捕获的错误:网络错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆