onflow / kitty-items

Kitty Items: CryptoKitties Sample App
https://kitty-items.onflow.org
Apache License 2.0
409 stars 214 forks source link

UnhandledPromiseRejection while trying to do "npm run dev:testnet" #300

Closed harshnambiar closed 1 year ago

harshnambiar commented 1 year ago

I am just trying to run the code with no changes per se, just to test deploy on the testnet. However, the following error occurs: _npm run dev:testnet

kitty-items@1.0.0 dev:testnet npx cross-env CHAIN_ENV=testnet node .ki-scripts/startup.js

ℹ Stopping previously launched processes...

xargs - Usage: kill [options] [...]

Options:

[...] send signal to every listed -, -s, --signal specify the to be sent -q, --queue integer value to be sent with the signal -l, --list=[] list all signal names, or convert one to a name -L, --table list all signal names in a nice table -h, --help display this help and exit -V, --version output version information and exit For more details see kill(1). node:internal/process/promises:246 triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: 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(). The promise rejected with the reason "undefined".] { code: 'ERR_UNHANDLED_REJECTION' }_ Steps to Reproduce: 1. cd kitty-items 2. npm install 3. npm run dev:testnet
codingone21 commented 1 year ago

I've been able to recreate this issue after cleaning up and restarting my repo. I'm working on a fix currently, and will update this thread when the change is ready!

codingone21 commented 1 year ago

@harshnambiar Hi! There was a fix related to testnet startup recently. Could you retry after stopping all processes pm2 delete all then retrying npm run dev:testnet?

Let us know and we'll close this issue!

harshnambiar commented 1 year ago

It works now. Thanks