2
votes

I am trying to build a cordova windows 10 app.

I have used this article to create the pfx file:

https://docs.microsoft.com/en-gb/windows/uwp/packaging/create-certificate-package-signing

I used the publisher id from my windows developer account for the subject. e.g. "CN=1234567890........."

I added the subject and the generated thumbprint to the build.json file

I used the following command to build the app.

cordova build --release --buildconfig=build.json

I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2519,5): error AP PX0107: The certificate specified is not valid for signing. For more information about valid certificates, see http://g o.microsoft.com/fwlink/?LinkID=241478. [C:............Code\platforms\windows\CordovaApp.Windows.jsproj] Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1

Does anyone know what I am doing wrong?

Thanks in advance!

1
Facing the similar problem. dont know what is wrong - varun
I fixed this by not using the build.json file and specifying the parameters in the command i.e: cordova build -- --packageCertificateKeyFile="platforms\windows\CordovaApp_TemporaryKey.pfx" --packageThumbprint="ABCABCABCABC123123123123" - ee0jmt

1 Answers

0
votes

I basically in the same situation :-(

As workaround, I found that if you self-sign a pfx with this old article instructive: (https://msdn.microsoft.com/en-us/library/windows/desktop/jj835832%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396), the app signing works. I am not really sure why this one works but comparing both certs, the old article create a sha1 against sha256 of the new one. By the way, the old article came out of the lastest doc of Cordova at https://cordova.apache.org/docs/en/latest/guide/platforms/win8/index.html#signing-an-app . May be is a limitation of the current Cordova signing process.