Visual Studio 2015 Cordova Windows 10 > Blank/white screen after associated with the existing windows store app

6

Without associating the app with the store, i can run and debug the cordova app on my devices (all works fine). But after associating the app with the store (or after built a package for the store), the app starts and i get a white screen, no errors in visual studio!

I have installed the update 3 and tried to run in release mode, but no success. No errors occur.

I Use: - Visual Studio 2015 with Update 3 - Node Version 4.5.0 - Cordova Version 6.3.1 - and release the app for windows 10

========================

I found out that the package name was changed after assocating with store. So i changed the package name at the start page option to the new one in the appxmanifest.

After that the app starts and i see my page, but with many errors, i cant interact now.

Here the errors:

  • JavaScript runtime error: 'Windows' is undefined cordova.js (1559,13)
  • deviceready has not fired after 5 seconds.
  • Channel not fired: onPluginsReady
  • Channel not fired: onCordovaReady

from the debugger:

  • "WWAHost.exe" (Skript): "Skriptcode (MSAppHost/3.0)" geladen.
  • Es wurde eine Ausnahme ausgelöst: in Zeile 596, Spalte 9 in ms-appx-web://........./www/WinJS/js/base.js 0x800a138f - JavaScript runtime error: Unable to get property 'UI' of undefined or null reference
  • Ausnahmefehler in Zeile 1559, Spalte 13 in ms-appx-web://......../www/cordova.js 0x800a1391 - JavaScript runtime error: 'Windows' is undefined

Who can help me?

Kevin

cordova
visual-studio-2015
windows-store-apps
asked on Stack Overflow Aug 29, 2016 by Kevin • edited Aug 29, 2016 by Kevin

4 Answers

5

I ran into the same issue.
In fact, when we associate app with the store, association change "Package Name" with name generated to the store.
The result is : start page don't know where is "index.html" because package name changed.

To resolve it, cordova team added two preferences :

<preference name="WindowsStoreIdentityName" value="12225TOTO42.3355241V9C2T6" />
<preference name="WindowsStorePublisherName" value="CN=9985D2C8-IUI5-4272-TOTO-EBR6FE26877A" />

You just have to add it to your config.xml and fill fields with your app identity informations (retrieve this values from App Management --> App Identity in the Dev Center)

Association should be successful now !

The issue reference is here : https://github.com/phonegap/build/issues/506

answered on Stack Overflow Nov 17, 2016 by Geoffrey Lalloué
2

I had the same problem but I resolve it now. When you associate the application to store, Visual Studio changes these values:

enter image description here

but it does not change the value of package name in the application tab:

enter image description here

so the index.html is not found and the app shows a blank screen. To resolve it, you must add two preferences in config.xml file as described here:

https://stackoverflow.com/a/40658027/2496666

and rebuild the project from CLI with the usual command:

cordova build windows

after rebuild the project, the values shown in the following image must be the same:

enter image description here

answered on Stack Overflow Nov 23, 2016 by Claudio Badii • edited May 23, 2017 by Community
0

i found a solution!

The error only occur, when i install cordova and plugins over CLI, but when i start a cordova project over visual studio 2015 and use the integrated plugin manager -> so it works without any error.

Kevin

answered on Stack Overflow Aug 30, 2016 by Kevin
0

before associate app in visual studio

ionic plarform add windows

cordova build -- --packageCertificateKeyFile="CordovaApp.Windows10_StoreKey.pfx" --packageThumbprint="8d66824...."

and you have associated app without visual studio

answered on Stack Overflow Nov 15, 2016 by Andrey Trubetskoy • edited Nov 17, 2016 by Andrey Trubetskoy

User contributions licensed under CC BY-SA 3.0