w3f/polkadot-deployer

First time running polkadot-deployer, UnhandledPromiseRejectionWarning; works afterward

laboon opened this issue · 5 comments

DESCRIPTION

On my machine, the first time I try running polkadot-deployer create I get an UnhandledPromiseRejectionWarning (see below). Additional creates (after the first time) seem to work fine.

REPRODUCTION

  1. Be sure that polkadot-deployer was not yet installed
  2. Install with npm i -g polkadot-deployer
  3. polkadot-deployer create

EXPECTED BEHAVIOR

  1. Polkadot deployed

OBSERVED BEHAVIOR

  1. "UnhandledPromiseRejectionWarning" (see notes below for details)

NOTES

Output from my terminal..

(20040) $ polkadot-deployer create
Downloading component helm...
chmod: /Users/laboon/Library/Application: No such file or directory
chmod: Support/polkadot-deployer/components/helm: No such file or directory

Command execution failed with code: 1
(node:5074) UnhandledPromiseRejectionWarning: Error: 1
at ChildProcess.child.on (/Users/laboon/.nvm/versions/node/v10.7.0/lib/node_modules/polkadot-deployer/lib/cmd.js:37:18)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:599:12)
(node:5074) 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:5074) [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.

[laboon@ekaterina ~/web3/polkadot-deployer]
(20042) $ polkadot-deployer list
No deployments found, try polkadot-deployer create

[laboon@ekaterina ~/web3/polkadot-deployer]
(20043) $ polkadot-deployer create
? Enter the new deployment name: meow
? Deployment type: local
? Number of Polkadot nodes (1-20): 4
Creating directory /Users/laboon/Library/Application Support/polkadot-deployer/deployments/meow...
Done
Creating directory /Users/laboon/Library/Application Support/polkadot-deployer/deployments/meow/keys...
Done
Creating directory /Users/laboon/Library/Application Support/polkadot-deployer/deployments/meow/values...
Done
Creating local cluster 'meow'...
Unable to find image 'bsycorp/kind:latest-1.13' locally

latest-1.13:

...

Thanks for reporting @laboon !! :) As we talked online yesterday, this was caused by the whitespaces in the path of the downloaded components, specifically in this case helm.

It should be fixed after the latest changes, you can check by removing /Users/laboon/Library/Application Support/polkadot-deployer/ (so that a complete initialization is required) and running polkadot-deployer create.

Can you please confirm and close this issue if all is ok? Thanks!

I've got a few meetings this morning but will try it out as soon as I can.

Still getting an error, albeit a different one

...Successfully got an update from the "stable" chart repository
Update Complete. ⎈ Happy Helming!⎈

Error: This command needs 1 argument: chart name

Command execution failed with code: 1
Could not install polkadot chart: 1

[laboon@ekaterina ~/web3/substrate-playground/rust-playground]
(20056) $ polkadot-deployer --version
0.5.5

Ok, there was still one more path with spaces on the same command call, 3 in total 😄 Already published v0.5.6 that fixes it, pls give it another try (hopefully this time no more errors of this kind).

Thanks a lot for your patience! :)

Looks like it is working now with 0.5.6!