Ionic 2 Angular 2 Cordova Fix: Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

Issue:
Ionic 2 Angular 2 Cordova Fix: Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html)


Fix:
This error occurs because the loadUrlTimeout which is the time that android will wait until your app send to it your files, is too short and your controller is too heavy to respond with a 200 status in this interval.

Put on your config.xml this:
<preference name="loadUrlTimeoutValue" value="700000"/>

For example:

<splash src="resources\android\splash\drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
<splash src="resources\android\splash\drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
<preference name="loadUrlTimeoutValue" value="700000" />

Comments

  1. The date for downloading the hall ticket is not yet been announced by the board organizers.
    JAC 12th Result 2018

    ReplyDelete

Post a Comment

Popular posts from this blog

Ionic 2: capture screenshot and social sharing