Phonegap Build: viewebclient timeout error on android device

  • 10
  • Problem
  • Updated 5 years ago
  • In Progress
I created this stackoverflow thread http://stackoverflow.com/questions/91.... I'm building an app with phonegap build, where I use a lot of jquerymobile, and I keep getting a timeout error, which I don't understand since all my references are local.
Photo of Jakob

Jakob

  • 3 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 10
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Do you have the ID of your app (the five digit number in the URL bar)? It sounds like a strange error.
Photo of Jakob

Jakob

  • 3 Posts
  • 0 Reply Likes
Sure it's 40427
Photo of Jakob

Jakob

  • 3 Posts
  • 0 Reply Likes
Sure 40427
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Hi Jakob - sorry not to get back to you sooner.

I loaded your app on my Android Nexus One device and it displayed the correct page - "example by Oikos Development". Did you change anything, or are you still seeing the error on your end?
Photo of lawgurl

lawgurl

  • 361 Posts
  • 14 Reply Likes
Hey Andrew...

Are we having issues with jQuery again as it pertains to external links... I am experiencing issues with almost all of my apps (old & new)... the most recent app is :: 75892 ::

The app goes to the link indicated, however, once the page fully builds, an error comes up... This same error appears for older apps that I have built as well (all of a sudden it has just appeared)...

Application Error

The connection to the server was unsuccessful. (http://name_of_website_goes_here.com)

Thanks,
Dax
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hello all,

This is actually an issue with the PhoneGap project.

I'm working on getting this resolved in the project, and hence have it corrected for build.

The solution to this problem is actually that for slower devices and emulators a timeout occurs when the device/emu is not able to make a connection to the server within the timeout set by default.

Hardeep Shoker
Photo of lawgurl

lawgurl

  • 361 Posts
  • 14 Reply Likes
Is the PhoneGap ChildBrowser Plugin a possible fix for this or will this just compound the problems that we are having with jQuery, external links and phonegap build?

Thanks
Dax
Photo of François Leblanc

François Leblanc

  • 2 Posts
  • 0 Reply Likes
Even thow large timeout set you can have this error. Seems related to bad url I figure that after first run and exit from application if you run again trying to reach serveur location file:///xx and not local files...
Photo of sukhdeep

sukhdeep

  • 1 Post
  • 0 Reply Likes
If this is the issue with connection timeout. Then why it is happening,when i am not connecting to any server. message is popping up frequently, even i am not doing anything at that time. Tried with increasing timeout, but still seeing timeout "CordovaWebView: TIMEOUT ERROR!". can someone tell me, how can i avoid this error?
Photo of lawgurl

lawgurl

  • 361 Posts
  • 14 Reply Likes
Question for ya... is this something that is strictly related to apps using jQuery? If not then that would be good to know... I will just have to do things old school until you can fix it if such is the case...

Dax
Photo of lawgurl

lawgurl

  • 361 Posts
  • 14 Reply Likes
Me again...

There needs to be a fix for this because this isn't just an issue on "Slower Devices"... I've sent the PG build apps to several individuals (all running Icecream Sandwich) and they are experiencing the same issue with me; I'm running GBread.

Internet connection can't be the issue because while we are all at home, we connect to our wireless via the house setup... Versus using our carriers dataplan... we've all tried it the same way...

Dax
Photo of glawson

glawson

  • 1 Post
  • 0 Reply Likes
We've run into the same issue when running our app in a AVD on a older machine. Can setIntegerProperty be added to the config options?
Photo of cs.cheung

cs.cheung

  • 12 Posts
  • 0 Reply Likes
same error
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Just an update, it's in our backlog and we hope to still have it resolved soon.

We should have an expected date soon.

Hardeep Shoker
Photo of Jeanette Andersen

Jeanette Andersen

  • 1 Post
  • 0 Reply Likes
I have the same problem, and adding super.setIntegerProperty("loadUrlTimeoutValue", 60000); does not fix the problem.

When is the update expected?

Jeanette Andersen
Photo of Heemanshu Bhalla

Heemanshu Bhalla

  • 13 Posts
  • 0 Reply Likes
you are right it gives error there
Photo of Edward Sudjatmiko

Edward Sudjatmiko

  • 1 Post
  • 0 Reply Likes
I vouch for a fix to this issue as well, please ...
Photo of MJ Lin

MJ Lin

  • 2 Posts
  • 0 Reply Likes
I have the same problem too. The device is a decent one and I have broadband at home.

It seems that when there are multiple outstanding ajax calls (I'm trying to simulate the situation where the user gets impatient and starts pressing different tabs), the link that takes the longest to load will sometimes timeout. Once the timeout occurs, all subsequent ajax calls to that link will alway timeout until you re-install the app.

Looking forward to hearing how to not have the timeout happening in the first place and subsequently (to the same link).

Thanks.
Photo of MJ Lin

MJ Lin

  • 2 Posts
  • 0 Reply Likes
By the way, I'm using Cordova 1.7.0.
Photo of yosauron.desarrollo

yosauron.desarrollo

  • 44 Posts
  • 7 Reply Likes
I have the same problem, I'm using PhoneGap Build with 1.7.0 Cordova
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hello all,

We've got a new location for our tracked issues that should help us identify problems that need to be fixed more urgently then others.

You can view this issue here: https://github.com/phonegap/build/iss...

Hardeep Shoker
Photo of Mohamed El-Ghazali

Mohamed El-Ghazali

  • 3 Posts
  • 0 Reply Likes
I developed a WP7 app using HTML, JS, and CSS following PhoneGap guidelines which works great on WP7 then I uploaded all the HTML, JS, CSS, PNG files in the "www" folders to PhoneGap build (https://build.phonegap.com/apps/53447). Build seems to have successed than I downloaded the APK file and deployed it to Android device emulator. The main page starts find but when I interact with app I get:

Application Error

A network error occurred. (file:///android_asset/www/index.html?#)

Can someone help please.

Thanks,
Mohamed


This reply was created from a merged topic originally titled
A network error occurred. (file:///android_asset/www/index.html?#).
Photo of Heemanshu Bhalla

Heemanshu Bhalla

  • 13 Posts
  • 0 Reply Likes
I am having same problem as you have how you got it solved
Photo of Tom Mannessen

Tom Mannessen

  • 1 Post
  • 0 Reply Likes
Hi,

I'm trying to get an app created with PhoneGap, but I'm receiving the "A network error occurred" message. Even though I've added the loadUrlTimeoutValue.
I'm using: cordova-1.9.0.js; jquery-1.7.1; jqmobile-1.1.0 (local js in project)
building on Eclipse Juno 2012 on Mac OSX 10.7.3
running on an android emulator 2.3.3 (which has an active network conn, and is quite fast)

Am I doing something wrong? or is this issue still open?
Once I comment out jquery+jqmobile all works (apart from the can't find variable $, ofcourse)

Thanks,
Tom

edit: on an android emulator v4.1it does seem to be working... how can I fix this for 2.3.3?
Photo of yosauron.desarrollo

yosauron.desarrollo

  • 44 Posts
  • 7 Reply Likes
I have found a work around for prevent the following error on android device:

"Application Error
A network error occurred. (file:///android_asset/www/index.html)"

The solution is very simple, you only have to rename your 'index.html' to 'main.html' for example, and create a new (dummy) 'index.html' that only have to redirect to the 'main.html'

Content of the new 'index.html':
 

<!doctype html>
<html>
<head>
<title>tittle</title>
<script>
window.location='./main.html';
</script>
<body>
</body>
</html>


That's all! :D

PS: works with PhoneGap Buidl too ;)
Photo of Joanna Lee

Joanna Lee

  • 4 Posts
  • 0 Reply Likes
works for me! thanks!:)
Photo of vishwajeet singh

vishwajeet singh

  • 2 Posts
  • 0 Reply Likes
This worked for first page load but subsequent clicks to public links still fail :(
Photo of Joanna Lee

Joanna Lee

  • 4 Posts
  • 0 Reply Likes
does this have anything to do with the whitelist feature of phonegap? i tried setting it to .* but it did not work that's why i found this post.
Photo of vishwajeet singh

vishwajeet singh

  • 2 Posts
  • 0 Reply Likes
Is there any fix to this issue yet ?
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
You can follow the issue here:

https://github.com/phonegap/build/iss...

I spoke with Brett today it should be resolved in the coming few days.

Hardeep Shoker
Photo of Anil

Anil

  • 1 Post
  • 0 Reply Likes
Is this issue resolved? I'm getting this alert even after trying all above suggested solutions.
Photo of Ganesh M

Ganesh M

  • 1 Post
  • 0 Reply Likes
Is the issue resolved?
Photo of sheetal dshivdas

sheetal dshivdas

  • 1 Post
  • 0 Reply Likes
I am using the latest cordova 2.2.0 and this damn issue still exists today also...can we ever have this fixed...