0

I am facing a strange issue. I create a simple PhoenGap app, that loads a HTML website no JavaScript so far. I am able to start the app using a

2.3.3 emulator
4.0.3 emulator
4.1 emulator
or 2.3.3 device

but the app crashes with a "CardovaWebView: TIMEOUT ERROR" in the console and a "Application Error: The connection to the server was unsuccessful. (File://android_asset/www/index.html)" on the screen. This error occurs randomely on all devices.

I am just finding infos about heavy JavaScript things taking too long to trigger the timeout but that's not the case here. Anyone with a hint? Thanks in advance

I just found out: The error occurs only when using GPRS and not using WLAN. So phonegap (or something else) is trying to achieve a connection somewhere... Setting a higher timeout value does not work... Any ideas?

Redfox
  • 1,024
  • 1
  • 11
  • 28

1 Answers1

2

I just found the solution:

Its the weinre debugger. Despite being a useful tool, it's using a hardcoded IP for the importing of the javascript-script like this:

<script src="http://x.x.x.x:8081/target/target-script-min.js"></script>

When using starting the app on a real device using WLAN this poses no problem. But using GPRS it results in the timeout error mentioned above. Hopefully this will save others the time and nerves I lost here.

Redfox
  • 1,024
  • 1
  • 11
  • 28