I am trying to run ionic 2 project with firebase on android emulator and android device. in both cases I am getting this error:
A network error (such as timeout, interrupted connection or unreachable host) has occurred."}
Do I have to do the following in firebase: “Add Firebase to your Android App”?
If yes than it is generating google.service.json file, what do I do with it?
It also requires to ass some lines in gradel file which I don’t have in ionic project.
Do I need it?
Anyone has idea how to get over this network problem?
Everything works fine with chrom web app.
Thanks
Sami.
I was able to fix it finally, The answer is the whitelist. I had to run the following commands:
cordova plugin add cordova-plugin-whitelist
cordova prepare
I have this error too but haven’t been able to fix it! Is there something you did to fix this that I’m missing? Thanks!
The error occurs on google.play.com on all android devices. However, the app works fine on android when running locally: ionic run android
Firebase database calls work okay. It’s Firebase auth that’s producing the error.
cordova-plugin-whitelist is installed and was installed by default when creating new Ionic project.
Running cordova prepare didn’t seem to do anything any there was no information returned on the command prompt.