[Solved] Application Error - Ionic

Hello people,

I’m having an error when i run my app on device.
In pc browsers works ok, but on android device after launch the app, i have this error:

With $ionic run android --consolelogs --livereload:

Application Error

If i run:
$cordova build android
$cordova run android

The app runs, but when i want to login with firebase, i have this error:

Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred.

Before, the app worked fine, this started to happen when i installed this plugin: https://ionicframework.com/docs/v2/native/firebase/

But it did not work, it was saying something like this: “ionic-native have no exported member called Firebase” when running the app in the pc browser.
Then I ran again:
$ Ionic run android
$ Cordova build android
$ Cordova run android

And it did not work.
Opt to delete the plugin and continue with other things to not waste time …

And now I find the problem I mentioned at the beginning of the post. I think the firebase plugin changed something that generates the broken builds.

Any idea? Anything that can help me will be grateful.

Thank’s in advance!

If anyone have the same issue, i just solved it thanks to @shashikiran797 in this thread:

when i try to logout from the application it shows this error…I pasted your code in AndroidManifest.xml but still there is an error? any other solution ?

It does not work for me…I am still getting the same error…network error,connection timed out…

Hey @vithika @Colo9311 @shashikiran797 , actually I am having the same issue with my app, it is giving me 502 Connection timed out error on making an api call and this is only happening on using Jio Network. I really don’t know what causing this problem because app works fine on other networks, but Jio network causing the problem.
Can you help me with it?

Try adding this to your config.xml

<access origin = "*" />

Hey, I added it, but still getting the same error only on Jio Network.

1 Like

did you try accessing the same api through any other rest clients like Postman on jio network?

and try accessing some public apis on your application on jio network and see if it works


Thank you so much for your help, I got the bug which was causing the problem.

Thanks again :slight_smile:

What was causing the bug?

Sorry for late reply, but my problem was that my app didn’t know that the domain it is trying to hit is whitelist or not? So, I came to know about a plugin called :

(Actually, by default it is included in every ionic project but I think the version which was in my app was old, so by installing it again, I got the latest version.)

Then I added this in my app and also made the subdomain available, and it worked for me.
Thanks :slight_smile: