Monday, November 24, 2014

Visual Studio Cordova: Black Screen/No Launch

If you are using the Visual Studio Tools for Apache Cordova and your app doesn't launch when debugging, take a look at the Output Windows in Visual Studio for some clues.

Recently I hit a case where the Output Window contained:

              CordovaWebView: TIMEOUT ERROR!

Which means that the app couldn't launch (and the debugger attach) within the allotted time.

You can increase the default launch time by adding an option to config.xml. However, since this option isn't yet supported in the VS Editor for config.xml, you need to edit the XML manually:

  • right-click config.xml and select "Open With..." and then "XML (Text) Editor"
  • below all of the existing <preference> nodes, add the following:

    <preference name="loadUrlTimeoutValue" value="120000" />
...which will increase the load time to 2 minutes. 


No comments:

Post a Comment