Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an unhandled promise rejection error #118

Open
iggymakesthings opened this issue Apr 21, 2019 · 2 comments
Open

Getting an unhandled promise rejection error #118

iggymakesthings opened this issue Apr 21, 2019 · 2 comments

Comments

@iggymakesthings
Copy link

Hi, I am trying to convert my electron app to appX using electron-windows-store and have been getting this error. My version of windows 10 sdk is Windows 10 SDK, version 1903.

PS C:\WINDOWS\system32> electron-windows-store --input-directory C:\Projects\Javascript\simplephotoviewer\dist\simplephotoviewer-win32-x64 --output-directory c:\projects\javascript\simplephotoviewer\dist\AppX --package-version 1.1.0.0 --package-name simplephotoviewer
You need at least Node 4.x to run this script
? Did you download and install the Desktop App Converter? It is not required to run this tool. No
? You need to install a development certificate in order to run your app. Would you like us to create one? No
Welcome to the Electron-Windows-Store tool!

This tool will assist you with turning your Electron app into
a swanky Windows Store app.

We need to know some settings. We will ask you only once and store
your answers in your profile folder in a .electron-windows-store
file.

? Please enter your publisher identity: CN=IggyMakesThings
? Please enter the location of your Windows Kit's bin folder:

Setup complete, moving on to package your app!

Configuration:
Desktop Converter Location: undefined
Expanded Base Image: undefined
Publisher: CN=IggyMakesThings
Dev Certificate: undefined
Windows Kit Location:

(node:15548) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'match' of undefined
at inquirer.prompt.then.then (C:\Users\igweo\AppData\Roaming\npm\node_modules\electron-windows-store\lib\params.js:86:29)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15548) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\WINDOWS\system32>

Would appreciate any help

@SpyHoodle
Copy link

I am also getting this problem. My error message:
(node:2144) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'match' of undefined
at inquirer.prompt.then.then (C:\Users\samho\AppData\Roaming\npm\node_modules\electron-windows-store\lib\params.js:86:29)
at processTicksAndRejections (internal/process/next_tick.js:81:5)
(node:2144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2144) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@JohnTendik
Copy link

JohnTendik commented Sep 5, 2019

Im getting the same error. The error gives some hint as to what is going on and its because all of us are choosing "no" for the dev certificate question so it is undefined. Doing a .match on an undefined object will error out.

find you global node modules folder and go into windows-store-manager/lib/params.js

on line 86 there is a .match check for a dev certificate. Simply just check if there is a dev certificate. Im not sure if this is the actual fix however I was able to move past this error doing this fix:

if (program.devCert && program.devCert.match(/.p12$/i)) {

However this lead me to another unrelated error 🤷‍♂ The struggle goes on :D

annnnd the solution to the other problem was that my path to the windows-kits folder was wrong, its supposed to be C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 annnnd my built package .exe file had spaces in the name "My application" which is a nono apparently. Removed the space in the package title, changed the windows kits folder to the actual one and both signing and building the .appx file worked flawlessly.

Hope this helps someone out there that runs into the same issue :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants