electron-builder: electron builder fails to parse identityName of appx
Hello,
Electron-builder (19.27.3) fails to parse identityName provided by Microsoft:
Using "release-builds\pre-appx-\appxmanifest.xml" as the manifest for the package.
MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Applications" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Application" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/@Id
'1234Company.MyAppName' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.
The attribute 'Id' with value '1234Company.MyAppName' failed to parse.
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.
My package.json electron-builder section looks like the following:
"build": {
"appId": "yourappid",
"directories": {
"output": "release-builds"
},
"appx" : {
"identityName" : "1234Company.MyAppName",
"publisher" : "CN=123456789-1234567889",
"publisherDisplayName" : "Company"
},
"win": {
"target": [
"appx"
],
"certificateFile" : "cert.pfx"
}
}
}
Generated by electron-builder Identity section in appxmanifest.xml looks ok for me:
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
<!-- use single quotes to avoid double quotes escaping in the publisher value -->
<Identity Name="1234Company.MyAppName"
ProcessorArchitecture="x64"
Publisher='CN=123456789-123456789'
Version="2.1.1.0" />
Kindly help.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 37 (21 by maintainers)
Commits related to this issue
- feat(appx): applicationId option for AppX Close #2108 — committed to develar/electron-builder by develar 7 years ago
Hello everyone, here is a bit more of background of how the “Publisher” value in the manifest works:
I hope it helps!
Hello @develar, I confirm that the package uploaded on the Store doesn’t have to be signed. Even if you sign it, the certificate is removed and the package resigned with a Microsoft one during the certification process. However, if I can share my humble opinion, I think you should offer a parameter to opt-in for signing or not, like the Desktop App Converter does. By default, our tool doesn’t sign the package, but if you add the -Sign parameter it will generate a test certificate and sign the package using it. The reason is that if the developer needs to manually install the app without using the Store (for testing it on its own machine or to share with external testers; for enterprise distribution; etc.), in this case the AppX needs to be signed.
Let me know if you have additional questions, I’ll be happy to help 😃
19.33.0 released as latest stable. Please try. After question above will be cleared up, other changes will be maybe done.
I consider our AppX target as amazing 😃 Thanks to Matteo Pagani.
Recreating cert with correct CN solved the issue.
Last step left - verification by MS appx package build with electron-builder. Hope, it will go smoothly. Will update you guys soon.
@black-snow I just contacted Matteo Pagani from MS and he kindly responded me with the following information regarding this issue:
As respect to clear and detailed answer from MS.
But because it is AppX and Windows is required to test, release will be only after approval from Windows CI server.
As I promised in #2027, just writing in that
appxpackage which was completely build withelectron-builderpassed MS certification and was approved by Windows Store successfully.There were few errors and trials first, which were not related to
electron-builder, but rather to my lack of knowledge of WS submission rules. Such as missing Privacy Policy and updating the app not internally, but only via Store platform. I made a separate issue for this #2165. But all of the issues with the help of @qmatteoq were resolved successfully.So in the end everything went smoothly.
Thanks again @black-snow @develar and @qmatteoq for your amazing support!
– P/S I removed sensitive info from all of my previous posts just in case.
Guys, please confirm that and option/by default will be introduced/fixed. I guess we can simply do not require code signing of AppX. If it is true — god, I love MS!
Kudos to Matteo, always great support.
So there’s two different fields that currently receive the same value but actually are different? Should be a quick fix then 😃
I started to think that no need to hate MS anymore but… God, save me. Well, at least MS support is very helpful. In any case I still think that AppX target (that cannot be used as default any time soon (5 years?), thanks to strange MS decision to not support it on Windows 7 and 8) will not became the same source of issues and nightmare of support as our current Windows target is.
Ok… fix will be soon, it is very cool that MS helps us and all critical bugs are fixed in a short term.