Uncaught Error: A network error

狂风中的少年 提交于 2019-12-07 04:45:13

问题


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" />

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


回答1:


try, this. it worked for me.

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


来源:https://stackoverflow.com/questions/39109545/uncaught-error-a-network-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!