Software Archive
Read-only legacy content
17061 Discussions

Windows 8 and Windows 8.1 Phone wp8 Crash at Splash

Rich_S_
Beginner
2,550 Views

Hi,

I have a cordova 5.1.1 jquery mobile application.  It works fine in Android and IOS. It crashes at the splash screen in Windows 8 and WP8.1 phone.

I've side loaded the windows 8 pc version (via powershell run) and tried it with fiddler.  Fiddler shows a call to watson.telemetry.microsoft.com so I know it is crashing.

I've tried using the WEINRE process but my program is dying before this gives me anything.

Works ok in the emulator.  Does't work correctly in the wp8 app preview (alert boxes won't show, doesn't do much).

You can try it in the windows 8.1 phone store (doesn't do anything, just crashes):
http://windowsphone.com/s?appid=256addf8-a7be-45d5-813f-18ec1954f745

Any ideas on where to start?

Thanks in advance,
Rich

 

0 Kudos
1 Solution
PaulF_IntelCorp
Employee
2,551 Views

@Rick -- we're in the process of deprecating the use of the JQM framework in App Designer. WP8 is difficult to get working, the webview used in it is a significant departure from that which was in WP7. Win10 is much better, but there aren't many WP10 devices out there. Win10 UA is supported thru out EA release now, and will be supported in the next major release of the mainstream product. So you can try it now with the EA release > https://software.intel.com/en-us/intel-xdk-early-access

View solution in original post

0 Kudos
30 Replies
Anusha_M_Intel1
Employee
1,508 Views

Hi Rich,

I have seen such an issue before with Windows Phone and I would love to take a look at your project and try to side load it myself to help narrow down the issue. Also, was this project created from any of the XDK samples or templates? And are you using the admob plugin?

 

0 Kudos
Rich_S_
Beginner
1,508 Views

Great!  I'll get you a copy ASAP!

Yes, I started with the Springboard jquery demo:

https://software.intel.com/en-us/xdk/article/jquery-mobile-springboard-navigation

No, I'm not using any admob plugins.

Rich

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee - The status bar plugin you are using does not work with Windows. The documentation states that it works with iOS and Android. Just to double check I ran your index.html file in Internet explorer and immediately got an error on line 22 of statusbar.js  that "require" is undefined. So you will not be able to use that plugin with Windows.

0 Kudos
Rich_S_
Beginner
1,508 Views

Anusha - I sent my project last week via message - Did you get it?  Rich

0 Kudos
Anusha_M_Intel1
Employee
1,508 Views

Hi Rich,

Yes I did take a look at it. In index.html, line 83 throws the error - '$' is undefined. That is jquery syntax, 

Here is one more error: File: index.html, Line: 192, Column: 10 - Unable to get property 'querySelector' of undefined or null reference

For a quick solution, open your index.html in IE and turn on developer tools in settings. In the debugger tab you can see the issues. You should also use XDK debug. It is very powerful - https://software.intel.com/en-us/xdk/docs/lp-debugging

Like Pamela mentioned, most of the reasons the Windows app crashes happen at launch is because you are using a plugin that is not applicable to Windows 8 platform. Could you narrow down such plugins and change them to those supported on all three platforms? Let me know if the problem still persists. 

 

 

0 Kudos
Anusha_M_Intel1
Employee
1,508 Views

Timothee, 

Make sure to remove any plugin calls from your project. Since the plugin has been removed, javascript will return undefined and that can cause app failure. 

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee,

I looked further into the documentation for your StatusBar plugin. Yesterday I had only read the top where it says that it supports iOS and Android. But somewhere along the line Windows support was added, but the documentation was not updated. It will fail in IE because IE will not go get Cordova plugins, and it is a Cordova plugin. But it is a core Cordova plugin so you can use the Test tab with App Preview, or weinre with a built app for debugging. See https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview for testing with weinre.

I don't have a Windows Phone to test on today. But I tested on Windows 8 and your app works. It lets me type a login and password and click verify, then tells me that I used a bad combination.

You said "Windows" in your post above, but you don't have a Windows publisher ID in the build settings. You do have a Windows Phone publisher ID in build settings so I presume you are working with Windows Phone. If not, add the Windows publisher ID. Using the Windows Phone build on a Windows device will cause your app to fail.

Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee - I will check on my Windows Phone tomorrow. I ran it on my Windows laptop (which is like a tablet) and got to enter my login information, which failed, but the app was working to that point. To clarify, it sounds like it is failing on the phone before you get to the login page. Right?

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee,

Just an update. I got a Windows Phone for testing. I thought that side loading was no longer necessary (https://software.intel.com/en-us/xdk/articles/side-loading-win-phone-apps), but I am not able to install otherwise at the moment. I will try side loading this weekend. If that does not work I will check with my colleagues next week.

Pamela

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee - short update - I managed to get back to your app and the Windows Phone. I got the app side-loaded (https://software.intel.com/en-us/xdk/articles/side-loading-win-phone-apps). I get no error deploying (but I skipped the Windows Store part). When I invoke the app, it does as you said, the splash screen comes up and after 20-30 seconds the app dies. I will have more time to work with it tomorrow.

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee - I am puzzled as to where the problem lies with your app. I've been working with some simple apps to try to discover precisely what works and what does not. I have found some strange inconsistencies and am continuing to tease apart cause and effect. I have not yet found any clear path as to the cause of this Windows Phone difficulty.

0 Kudos
Pamela_H_Intel
Moderator
1,508 Views

Timothee,

We are experiencing WP build anomalies with several apps that used to work. There have been major changes in Cordova recently as well as many Cordova plugin changes. We also have made some changes in our build system and also in the XDK itself. Additionally, Windows changed some publishing rules (https://software.intel.com/en-us/forums/intel-xdk/topic/600503). The failure in your app may or may not be a mistake in your app. There are so very many changes lately. It could be that there is a single issue, or it might be that there are a combination of issues. We can't say right now. We are continuing to trace the problem(s).

0 Kudos
Joe_S_2
Beginner
1,508 Views

I have a similar issue with app crashes in a JQM application on Windows Phone. The app has been published on both Android and iOS and works perfectly. In my case, the app does not crash after the splash screen. The app reaches the index.html page, but it crashes when navigating to a second html page. In the Windows developer dashboard, I was able to get the following failure details:

TerminalNavigationErrorCalled_80004005_ms-appx://<app_id>/www/undefined/www/trials.html!TOP_FRAME_NAVIGATION_FAILED_WITH_ERROR_80004005

My initial thoughts are that there is an issue with the source directory as "www" is in the URL path along with "undefined". The main index.html file which is in the same www source directory is working though, so I'm not sure why the second link would not be working.

Any ideas?

0 Kudos
PaulF_IntelCorp
Employee
1,508 Views

Joe, it's best to stick to using a single html file in Cordova apps, for a variety of reasons. See this Cordova doc page for some background > https://cordova.apache.org/docs/en/5.1.1/guide/next/index.html

0 Kudos
PaulF_IntelCorp
Employee
1,508 Views

Hello Timothee -- so you're saying that you installed the Windows Phone 10 preview on your phone and now your app works!?

0 Kudos
Joe_S_2
Beginner
1,508 Views

Thanks Paul for the valuable feedback. I have consolidated the 2 jQuery pages into a single HTML, re-built the application and sideloaded to both Android and Windows Phone. As before, the app works fine on Android (as it has also done on iOS) but crashes in WP. This time, with the single page, the app crashes within 2 seconds of displaying the main page (after the splashscreen). Any other suggestions for troubleshooting WP-specific issues?

0 Kudos
PaulF_IntelCorp
Employee
1,508 Views

You're only debug option, for WP, is using weinre. See these links for some help in figuring out how to do that:

One thing that helps is to remove any code that "kicks off" or starts your app. Instead, get the weinre console connection and then start your app by hand, at the console, rather than relying on the device ready event or a document ready event to start things. This will give you the opportunity to connect to the WP webview and try a few things.

Another thing you can do is try running the app inside of IE11 on your desktop, you'll have to "skip around" anything that is dependent on a Cordova API, since they won't be present in your desktop.

0 Kudos
Michael_O_2
New Contributor I
1,508 Views

I think it's better to use Cordova 2.9.0 or 3.0 for Windows Phone 8and Windows 8 builds for now. As it stands, version 4.1.2 or 5.1.1 are causing Windows apps to crash after the splash screen. Android and iOS apps are working perfectly with these two Cordova versions.

0 Kudos
PaulF_IntelCorp
Employee
1,508 Views

I've been working on debugging one of the demo apps that also crashes at startup. I have not completely resolved the issues, but I believe the crash is being caused by the version of jQuery that App Designer is including with jQuery Mobile (and, possibly, other) projects. In other words, I believe that if you are using jQuery in your app, that may be the reason the WP8 builds are crashing.

0 Kudos
Michael_O_2
New Contributor I
1,435 Views

Hello Everyone! I have built two apps by using CLI 5.4 they are working very well. The apps were built locally. So, this means the Cordova build server for Windows via intel XDK is faulty. The apps have jQuery library and app framework(custom download).

Intel Engineers should use the default phonegap build. Most cloud build providers are actually doing this.

Cheers!

0 Kudos
Reply