0
votes

I am creating an Ionic + Angular + Cordova + Firebase app.

My firebaseAuth system is working in a Desktop browser (chrome -- chrome dev tools reports the auth data fine and logs the user in), but it fails to work on my Android device(Samsung Galaxy Note2) - Chrome inspect shows errors and fails.

I have installed the cordova.inappbrowser plugin, added Firebase to the whitelist, created the Facebook, Google and Twitter app/accounts and connected them to Firebase (If this was not setup correctly I doubt the Desktop system would work).

I am out of ideas. Here is my console.log outputs and the errors created. If you need anything more detailed let me know.

Event: online Status: online servicesConnect.js:45
Connection type: Cell 3G connection servicesConnect.js:81
using firebase :) servicesConnect.js:57
checkForData servicesData.js:58     
Event: online Status: online servicesConnect.js:45

Failed to load resource file:///android_asset/www/%7B%7Blogin.img%7D%7D
GET https://auth.firebase.com/v2/mylo/auth/anonymous?&v=js-    0.0.0&transport=json&suppress_status_codes=true 404 (Not Found) firebase-  debug.js:8500
GET file:///android_asset/www/%7B%7Blogin.img%7D%7D  ionic.bundle.js:11457
GET https://auth.firebase.com/v2/mylo/auth/session?&requestId=4h7i3bhcydpej9anh…OjVJpdZUQQgoK4ny287Hz&v=js-0.0.0&transport=json&suppress_status_codes=true 404 (Not Found) firebase-debug.js:8500

I don't know why it cannot connect to the Firebase from the Android, and I do not know what creates the android_asset error - very odd.

2
Have you whitelisted auth.firebase.com and *.firebaseio.com in your Cordova app? - Rob DiMarco
Great! that is one of my problems solved. It was the whitelisting of auth.firebase.com that fixed it. Cannot believe I missed that. Thanks - cuznerdexter

2 Answers

0
votes

Suseika had the right idea,

The answer was to add the 'auth.firebase.com' to the whitelisting in config.xml.

(I had all the other firebase domains already).

0
votes

You need to

  1. install cordova inappbrowser plugin

    cordova plugins add org.apache.cordova.inappbrowser

  2. whitelist firebase domains by adding the following two lines to your config.xml

    <allow-intent href="*.firebaseio.com" />

    <allow-intent href="auth.firebase.com" />

Please check out the docs here