poetic / ember-cli-cordova

A tool for creating hybrid apps using a combination of ember-cli and cordova
MIT License
442 stars 81 forks source link

Connection To Server Unsuccessful #182

Closed jaredcnance closed 8 years ago

jaredcnance commented 8 years ago

We originally had this working well, but after several code changes and doing a fresh ember-cli-cordova install, we are getting the following error on the android device:

The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

The install commands looked like:

$ ember install ember-cli-cordova
$ ember generate cordova-init io.me.app
$ ember cordova:build --environment=myEnv --platform=android
$ ember cordova run android

The app displays a white page for a few seconds then throws the error. After confirming the error, the app crashes. When re-opening the app, the white page remains with no subsequent error but no content rendered.

If I replace the content of index.html with some text, the application loads perfectly fine. I have seen a few places where changing "loadUrlTimeoutValue" might fix it, but I'm not sure what the proper way of doing this from an ember-cli implementation of cordova.

jaredcnance commented 8 years ago

Upon further investigation, I discovered a JavaScript error related to the ES6 includes function being undefined. After resolving this, the application still throws the error described above and crashes. However, I am able to restart the application and it works fine.

BryanH commented 8 years ago

Sounds a lot like a known cordova issue: Android startup times out