Ionic-framework: Application Error connection to the server was unsuccessful.

Created on 7 Jan 2017  路  6Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

This is the Ionic 2 starter app - cutepuppypics, worked fine till recently. After upgrading to ionic framework Rc3 , during builds it throws an Error - when I do "ionic run android"

-Application Error
connection to the server was unsuccessful. File://android_asset/www/index.html
Tried reinstalling android platform and all.

I have tried the all the starter templates of ionic 2 and its the same result across 2 different linux machines and windows machine too.
Interestingly it works fine in the android emulator, however fails on the mobile devices.

Any help will be appreciated.

Expected behavior:

Steps to reproduce:

Related code:
chrome browser output

Hello Walkthrough Page
main.js:1949 Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
cordova.js:1185 deviceready has not fired after 5 seconds.
main.js:25553 Native: deviceready did not fire within 2000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
(anonymous) @ main.js:25553
t.invokeTask @ polyfills.js:3
e.runTask @ polyfills.js:3
invoke @ polyfills.js:3
main.js:25548 DEVICE READY FIRED AFTER 21651 ms

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

On Opensuse 42.2 Linux machine with nvm installed

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.1
Node Version: v6.9.0
Xcode version: Not installed

**On windows 8 machine**
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.2
Xcode version: Not installed



investigation reply

Most helpful comment

Do you have the Device plugin installed?
Does it work with an increased timeout?
< preference name="loadUrlTimeoutValue" value="700000" />

All 6 comments

Do you have the Device plugin installed?
Does it work with an increased timeout?
< preference name="loadUrlTimeoutValue" value="700000" />

Make sure you have the latest android platform. Remove all plugins. See if it's the same. I had this issue caused by the certificate plugin, there are no other errors logged which makes it really hard to track down. Have seen other reports with other plugins. The load time out just makes the error throw after a delay generated. The load timeout may be useful for slow devices or emulators that take a long time to start

yes it worked, thank a bunch.

Hello @magnusmel , thanks for opening an issue with us! Quick question, so after removing all the plugins it worked for you? Or did you just need to update the android platform?

I started out on Node 4.7.0 and migrated to v6.9.0. I must have uninstalled over 50times the entire platform and plugins. But the real culprit was the device plugin had got removed when I first removed all plugins and for some reason was missing in the config.xml and package.json file.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandyscarney picture brandyscarney  路  3Comments

vswarte picture vswarte  路  3Comments

RobFerguson picture RobFerguson  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

alan-agius4 picture alan-agius4  路  3Comments