简体   繁体   中英

Why is Firebase returning 404 errors in PhoneGap app when running on Android emulator?

I am using Firebase + Firebase Simple Login in a PhoneGap app and am having issues when I run the app in an Android emulator (browser-based testing works fine).

在此处输入图片说明

Note: I ran into this issue earlier, but I added cordova.js and no loner see the security restrictions warning.

All that is happening now is 404 error responses and I'm not sure what to do about it.

You need to add firebase.com to your app's whitelist.

Assuming you're using PhoneGap 3.x+, follow these steps:

  1. Edit config.xml (see Cordova's docs for more about where that file lives)
  2. Add a rule allowing firebase and subdomains:

     <access uri="https://*.firebaseio.com" subdomains="true" /> 

You might also find this question helpful. It has a bunch of stuff in it about whitelisting in Cordova / PhoneGap.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM