-1

When I try to run my worklight hybrid app in android emulator, its giving me timeout error. But, its running well on my android phone.

Help me how to run it in android emulator. Btw, I increased loadUrlTimeoutValue to 60sec. still its not working

Sourabh Saldi
  • 3,567
  • 6
  • 34
  • 57
  • I think its a worklight specific issure as an alert is displayed saying "The connection to the server is unsuccessful" – user2028015 May 02 '13 at 07:41

2 Answers2

2

I had been having these issues now and then. I have realized why this is. If you see an error in the Logcat like this

CordovaWebView: TIMEOUT ERROR!

It means that it takes too long to load the code (maybe your js).


In the workbench, expand the android folder > native folder > res folder > xml folder > and open config.xml file.
add the following in the preference section.

<preference name="loadUrlTimeoutValue" value="60000" />


Build all and deploy again.

JFJF
  • 35
  • 6
0

Make sure that in the file application-descriptor.xml, you use the actual network IP address of your computer, as the value for worklightServerRootURL.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • i specified it as http://${local.IPAddress}:8085.. giving the value like this should work fine right?? – user2028015 May 02 '13 at 09:00
  • Why 8085? Are you deploying Worklight on an Application Server, or using the Eclipse plug-in (Worklight Studio)? I suggest using the actual IP address (use IPCONFIG in a CMD window). If you are changing the port, you must also change it in worklight.properties. Please edit your question WITH ALL RELEVANT INFORMATION about your development environment. – Idan Adar May 02 '13 at 09:36