1

We have a cross platform application based on Cordova (version 6.1.1) and Sencha ExtJS (cmd version 6.1.2 ext version 6.0.2). The application also uses the jQuery (version 2.1.4). Now we found a very frustrating problem on the Windows platform.

We created the Visual Studio project with cordova (the sencha app is built with testing option before)

When we open the Visual Studio (version 14.0.25123.00 Update 2) and build the project (in release mode) on a device, then everything works as expected.

If we create an app package from the Visual Studio and install it any device manually, then seems like the ExtJS application is not loaded, and the application will hang on splash screen after start. (As I debugged it the script elements are added to the html by the microloader script, but the attached onload listeners on these elements are never fired, therefore the app never started)

And here is coming the most funny part. If you use the Visual Studio function to debug an already installed application, and connect to this application, then everything will works as is should, the ExtJS codes will be loaded.

Anyone found this before, or any similar thing?

talamaki
  • 5,324
  • 1
  • 27
  • 40
  • Sounds like a racing condition and/or a javascript error occurred. I'm not too familiar with Windows apps as for debugging but is there a log of errors? – Mitchell Simoens Jun 08 '16 at 12:03
  • no errors in the console log. It just stopped. The ExtJS microloader adding the js files dynamically to the html as usual, but seems like these files never loaded. – Steve Summer Jun 08 '16 at 15:18
  • I see files failing to load when I use Electron but when I open dev tools (that disables caching) and refresh the app it works no problems. Maybe something similar happening here? – Mitchell Simoens Jun 08 '16 at 16:01
  • Any solutions? Seems I'm running into the same problem :( What did you do in the end? Thanks! – Benjamin E. May 16 '17 at 13:54

2 Answers2

0

What you can try is to use Vorlon.JS remote debugger. Vorlon.JS An open source, extensible, platform-agnostic tool for remotely debugging and testing your JavaScript.

  • We used the weinre for remote debugging, But in the console no errors. And also we tried the Visual Studio debug installed app, but with that the application is worked. – Steve Summer Jun 08 '16 at 15:16
0

Could it be Cordova is failing something that works fine during debug, more forgiving environment. But truly fails the app when sideloading and running without debugger.. ?

EinarI
  • 627
  • 1
  • 9
  • 14
  • What I figured out until now that the problem is in the Sencha Microloader. This inject the resource (css, script) files dynamically into the code, and attach an onload listener to it. It should fire when the resource is loaded by the web view. But this never happened with the script files. The cordova works with a same logic, and inject the plugin script dynamically, and there the onload is always fired. – Steve Summer Jun 09 '16 at 19:03