electron-userland / electron-windows-store

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

publisherName must be a string #73

Closed MehediH closed 7 years ago

MehediH commented 7 years ago

I am trying to create a certificate for my app, but I am getting an error saying publisherName must be a string :/

image

Any idea what's causing this? This tool worked nicely for me in the past with the same app.

felixrieseberg commented 7 years ago

Thanks for the report, it seems like @jacobq's last PR broke something. Feel free to install the last version (0.9.3), I'll try to figure out what broke.

jacobq commented 7 years ago

I think it might be a publisher vs publisherName naming goof in my commit. https://github.com/felixrieseberg/electron-windows-store/commit/2130d97b9b4188e0f684f9822d257143b602b2b1#diff-3dc8020b53daf52d9c95dc37e8688b10R54

MehediH commented 7 years ago

Thanks guys! I am now getting this error, pretty sure this isn't related to this package but not sure how to fix this, couldn't find much details online either image

jacobq commented 7 years ago

@MehediH It looks like there's a " character in your path?

P.S. In the future if you could copy & paste the text instead of just a screenshot that would be more useful (avoids size/scaling problems on different screens, shows more text that just what's in the window, etc., as well as more search-friendly for other people who might be running into the same problem).

MehediH commented 7 years ago

@jacobq Will make sure to copy paste next time.

There isn't any electron-windows-store folder in my AppData folder for some reason, I looked into the npm folder but couldn't find anything.

jacobq commented 7 years ago

According to the screenshot above it was apparently in C:\Users\mehed\AppData\Roaming\npm\node_modules\electron-windows-store (probably from npm install -g ...) If you copy and paste that into Windows Explorer do you encounter an error?

MehediH commented 7 years ago

Nope, but I don't see the E9C87844-1C8E-430E-9950-8E0DC3A6EE56" folder there

jacobq commented 7 years ago

That may be because that's not a valid file name ;) Could you paste the config file or command line arguments you're passing? I have no idea where that crazy name is coming from unless you entered it.

MehediH commented 7 years ago

Here you go, removed my publisher details for obvious reasons :)

electron-windows-store --input-directory .\build --output-directory .\output\ --flatten true --package-version 1.0.0.0 --publisher "CN=pub_id_here" --package-name Tweeten.TweetenApp --package-display-name Tweeten --package-description "Tweeten, an app that makes TweetDeck prettier." --package-executable app\tweeten.exe --assets .\assets -m appxmanifest.xml

jacobq commented 7 years ago

@MehediH Unfortunately, I think the problem is in your publisher string, so if you're not comfortable sharing it I guess the best advice I can give you is look at it closely. Does it contain quotation marks? If so, try escaping them or removing the surrounding quotes.

Update: Also, you could try removing the leading CN= if you're using an older verion of electron-windows-store as fixing makeCert to not always add the CN= prefix was the main purpose of the pull request I made (that unfortunately also broke things for you because of a typo)

Alternatively, you can generate the self-signed certificate yourself and pass the (unencrypted .pfx) filename via the devCert option.

makecert.exe -r -h 0 -n <publisherName> -eku 1.3.6.1.5.5.7.3.3 -pe -sv <pvk file to generate> <cer/crt file to generate>
pvk2pfx.exe -pvk <pvk file> -spc <cer/crt file> -pfx <pfx output file>
MehediH commented 7 years ago

Hmm thanks anyway, @jacobq!