electron-userland / electron-windows-store

:package: Turn Electron Apps into Windows AppX Packages
MIT License
677 stars 86 forks source link

Fails on every run after creating a certificate #46

Closed FullR closed 7 years ago

FullR commented 7 years ago

The first time I run electron-windows-store, I'm prompted to create a certificate, I create the certificate, and the app is successfully packaged and signed, but if I run it a second time with --publisher "CN=mycertificatename", it fails with this error:

SignTool Error: The specified PFX password is not correct.

Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe exited with code: 1
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-store\lib\utils.js:70:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe exited with code: 1
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-store\lib\utils.js:70:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

I also tried --publisher "mycertificatename" which produces this error:

Packing 3509 file(s) in "C:\sign-ftph\output\pre-appx" (content directory) to
Using "C:\sign-ftph\output\pre-appx\appxmanifest.xml" as the manifest for the
MakeAppx : error: Error info: error C00CE169: App manifest validation error:
RIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0
fier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")))*'.
The attribute 'Publisher' with value 'criticalthinkingco' failed to parse.

MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The

Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe exited wit
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-stor
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe exited wit
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-stor
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

And without --publisher at all, I receive this error:

SignTool Error: The specified PFX password is not correct.

Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe exited with
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-store\
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe exited with
    at ChildProcess.child.on (C:\sign-ftph\node_modules\electron-windows-store\
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

And if I just delete .electron-windows-store, say no to creating a new certificate, and enter my certificate's name when prompted, I receive this error:

SignTool Error: File not found: undefined

So far the only way I've found to re-run electron-windows-store successfully is to delete the .electron-windows-store file and my certificate file and recreate the certificate when prompted.

Am I doing something wrong here? I'm having a lot of trouble understanding this tool.

black-snow commented 7 years ago

Did you set a password? It was mentioned somewhere not to.

felixrieseberg commented 7 years ago

Yep, this is most likely because you've set a password. This is not a limitation of this tool, but of the Windows SDK. You can currently not use a password.

FullR commented 7 years ago

The issue was that I was using a password. Sorry about the unnecessary issue. I hope it helps someone else.