electron-userland / electron-windows-store

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

Invalid manifest generated when the package name starts with a number #82

Open jarek-foksa opened 7 years ago

jarek-foksa commented 7 years ago

When the package name is 123JohnDoe.App then electron-windows-store generates AppXManifest.xml file that contains the following invalid line:

<Application Id="123JohnDoe.App" Executable="app/App.exe" EntryPoint="Windows.FullTrustApplication">

The error thrown:

MakeAppx : error: Error info: error C00CE169:
App manifest validation error: The app manifest must be valid as per schema:
Line 26, Column 18, Reason: '123JohnDoe.App' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'.

I managed to work around this issue by adjusting the manifest file in finalSay() callback so that Id="123JohnDoe.App" gets replaced with Id="JohnDoe.App". However, I'm not sure whether this is going to cause some problems in the submission process later.

andrewmbenton commented 6 years ago

Same thing happens when the package name contains a space. Seems like it would be worth replacing spaces with dashes automatically to create a valid name for the manifest.

jameshfisher commented 4 years ago

It appears this error does not originate from electron-windows-store code; it comes from makeappx.exe which it calls here: https://github.com/felixrieseberg/electron-windows-store/blob/master/lib/makeappx.js#L34

jameshfisher commented 4 years ago

Should be fixed in https://github.com/felixrieseberg/electron-windows-store/pull/131; in the meantime the correct (but confusing) way to use this package is like so:

const convertToWindowsStore = require('electron-windows-store');
convertToWindowsStore({
    identityName: '12345MyCompany.Ghost',  // This is actually the package name!
    packageName: 'Ghost',  // This is actually the application id!!
    // ...
});