Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Connection to the server was unsuccessful' error when launching phonegap app on android emulator

I am using PhoneGap to build an Android application, the application is a combination of phonegap + jquery mobile.

The application successfully launches in the emulator and I was able to debug the application, until yesterday.

Today the application just refuses to launch on the emulator, and I keep getting this error

06-25 09:03:24.453: INFO/System.out(305): onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///android_asset/www/index.html
like image 542
user160108 Avatar asked Jun 25 '11 12:06

user160108


2 Answers

This seems to be a phonegap 0.9.3 issue, as other people have reported the same problem (see here or here)

The problem might be solved by changing the loadUrlTimeoutValue

this.setIntegerProperty("loadUrlTimeoutValue", 70000);
like image 92
THelper Avatar answered Oct 28 '22 20:10

THelper


Use bigger value then 60sec, emulator can be extremely slow.

super.setIntegerProperty("loadUrlTimeoutValue", 360000);

and you can refer this also.. Check this!

like image 37
ULLAS MOHAN.V Avatar answered Oct 28 '22 22:10

ULLAS MOHAN.V