Filnik
Filnik

Reputation: 1013

Cordova webview TIMEOUT ERROR

I've tried to use the following code:

cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
cordovaWebView.loadUrl("file:///android_asset/www/index.html");

And I get various URLs injecting javascript like this:

cordovaWebView.loadUrl("javascript:CreateFormPlugin.showPage('1')");

But sometimes I get this issue:

12-12 11:56:32.561: E/dalvikvm(27065): JNI ERROR (app bug): attempt to use stale local reference 0x1
12-12 11:56:32.561: E/dalvikvm(27065): VM aborting
12-12 11:56:32.561: A/libc(27065): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
12-12 11:56:41.951: E/CordovaWebView(27065): CordovaWebView: TIMEOUT ERROR!

Any idea on how to solve this problem? :)

Thanks!

Upvotes: 1

Views: 9281

Answers (3)

HimanshuBhatt
HimanshuBhatt

Reputation: 1

I search so much for this thing and i am now in the all most conclusion that it is because the speed of the net..will developing apps then use speed internet so between your work you not get any error and until for this problem there is no solution from cordova..so when you publish that time it will remove...

Upvotes: -1

Filnik
Filnik

Reputation: 1013

Ok I did it this way: set loadURLTImeOutValue on webview

i.e. adding intent.putExtra("loadUrlTimeoutValue", 60000); to every call to the activity that extends CordovaInterface.

Upvotes: 0

Rohit Tiwari
Rohit Tiwari

Reputation: 822

You need to increase the timeout value

super.setIntegerProperty("loadUrlTimeoutValue", 70000);

See this link DroidGap: TIMEOUT ERROR! - calling webViewClient in android phonegap

Upvotes: 3

Related Questions