How do I fix this error when creating a candy machine with metaplex? - visual-studio-code

I am following this tutorial "https://www.youtube.com/watch?v=4LLx7SMAOag&t=446s" and at 9:28 he tells us to input this
ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/config/solana/devnet-test.json
His result is an initialized candy machine as shown in the video. Mine is the following:
Beginning the upload for 150 (png+json) pairs
started at: 1634300753134
wallet public key: GLCNNSs9QA1YqxkY6Ptq3pb6UZrkRbwGw7ZUGeJK1CCg
(node:6434) UnhandledPromiseRejectionWarning: Error: failed to get info about
account 63N3bBDCVVzdCaofQAnY5s4kcZodw1evomptDgNQ4feK: FetchError: request to https://api.devnet.solana.com/ failed, reason: connect ENETUNREACH 128.0.113.156:443
at Connection.getAccountInfo (/Users/hectorbardales/Desktop/metaplex/js/node_modules/#solana/web3.js/src/connection.ts:2404:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.fetchIdl
(/Users/hectorbardales/Desktop/metaplex/js/node_modules/#project-serum/anchor/src/program/index.ts:309:25)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6434) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6434) [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.
What do I do to fix this? (I'm running this in visual studio code on a Mac)

Here's what I did for example
ts-node ./js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k ./js/cm.devnet.json \
-cp ./js/config.json \
-c temp \
./js/assets-pictures
I made sure the path was clear and direct to each file, make sure for -k its path is to the file created when you did your keygen.

If you haven't, perhaps try airdropping 10 SOLs into that wallet address listed above? But do 5 first, then 5 again.
I can't remember what error I got, but I did have issues with that line.
Command for airdropping Sol is simple. Solana Airdrop x (x is your SOL amount).
Idk, worth a shot.

ENETUNREACH is a connection-related error. Even if you are able to browse the web or do other things, the best option is to test again with a new internet connection.

Related

NPM UnhandledPromiseRejectionWarning [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I've set up a 20.04 Ubuntu server in a virtual machine and on AWS to run an uno bot that is no longer hosted by the developer. (https://github.com/Exium1/UnoBot) I've been following someone's guide on how to set it up (https://github.com/DaanWet/UnoBot/blob/master/documentation/Install.md) but it is failing when i go to start it.
I get the following error:
(node:14998) UnhandledPromiseRejectionWarning: DiscordHTTPError: 401 Unauthorized on GET /api/v9/gateway/bot
at RequestHandler.request (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/rest/RequestHandler.js:75:15)
at Client.getBotGateway (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/Client.js:2135:36)
at ClusterManager.calculateShards (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:507:38)
at process.nextTick (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:179:41)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:14998) 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:14998) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js pro
cess with a non-zero exit code.
could anyone help with resolving this issue?
In order to address the UnhandledPromiseRejectionWarning warning that was logged, you can fix it by adding the following to your code:
process.on("unhandledRejection", console.error);
This will log the error much more clearly, and will prevent your console from being filled up with those warnings.
As for what #mmenschig said, they are indeed correct. Ensure that you have the correct token passed into <Client>.login().

Can not connect to MongoDB Atlas version 4.0

I can't connect to the last version of Atlas (4.0), but if using an older version it connects!
I got this message when trying to connect to version 4.0
(node:9920) UnhandledPromiseRejectionWarning: Error: queryTxt ETIMEOUT cluster0.zgdl9.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9920) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9920) [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.
Go the the Network Access on your Atlas Cluster and check if you whitelisted your IP. You can also whitelist all IPs with 0.0.0.0/0. I think by default no IP is whitelisted and that is why you can't connect.

Firebase CLI failed to login

I want to deploy a website by Firebase; however, I cannot use firebase CLI, no matter I use firebase login, firebase login --reauth, firebase login --no-localhost, or other commands are all not useful. If I use firebase login --no-localhost command, it show below error
? Paste authorization code here: (node:56671) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
at Client.doRequest (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:161:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:56671) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:56671) [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.
If i paste the credentials, it will show credentials are not valid and asked me use firebase login --reauth to authenticate.

Webdriver-manager update unable to download geckodriver

I am trying to setup protractor for my angular app automation. I am on Node version 12 , I installed protractor version 5.4.3. when I use webdriver-manger update --proxy=blahblahproxy.com , I see the below error.
[13:37:06] I/config_source - curl -oC:\Users\******\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json '**corpproxy**/repos/mozilla/geckodriver/releases' -H 'host:api.github.com'
(node:15904) UnhandledPromiseRejectionWarning: Error: response status code is not 200. It was 407
at Request.<anonymous> (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\binaries\config_source.js:181:28)
at Request.emit (events.js:311:20)
at Request.onRequestResponse (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:1059:10)
at ClientRequest.emit (events.js:311:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at Socket.socketOnData (_http_client.js:476:22)
at Socket.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
(node:15904) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15904) [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.
Chrome and selenium standlaone server are updated/downlaoded just fine
when i do webdriver-manager status
[13:39:39] I/status - selenium standalone version available: 3.141.59
[13:39:39] I/status - chromedriver version available: 80.0.3987.106
[13:39:39] I/status - geckodriver is not present
[13:39:39] I/status - IEDriverServer is not present
[13:39:39] I/status - android-sdk is not present
[13:39:39] I/status - appium is not present
Under corporate proxies we will face issues like this.
The 407 Proxy Authentication Required is an HTTP response status code indicating that the server is unable to complete the request because the client lacks proper authentication credentials for a proxy server that is intercepting the request between the client and server.
Option 1 : Try using selenium-standalone npm package. This is similar to webdriver-manager.
https://www.npmjs.com/package/selenium-standalone
Install this package globally
npm i -g selenium-standalone
Then to download/install the drivers
selenium-standalone install
Then to start the server
selenium-standalone start
(Or)
Option 2: https://stackoverflow.com/a/53358685/8903949

Strapi Start Install Issue on Mac

Having an issue installing Strapi on my Mac. Not sure what is going on really. Tried running npm install strapi-hook-strapi-mongoose and ran into 404 Not Found: strapi-hook-strapi-mongoose#latest.
USERs-MacBook-Pro:DIRECTORY USER$ strapi start
[2018-08-08T04:22:21.087Z] warn (hook:strapi-mongoose) `strapi-hook-strapi-mongoose` is missing in your dependencies. Please run `npm install strapi-hook-strapi-mongoose`
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/settings-manager/config/functions/bootstrap.js:17:26)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) 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: 3)
(node:42355) [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.
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/users-permissions/config/functions/bootstrap.js:77:45)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) 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: 4)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/email/config/functions/bootstrap.js:53:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) 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: 6)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/upload/config/functions/bootstrap.js:55:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) 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: 8)
[2018-08-08T04:22:25.197Z] info File changed: /Users/USER/Documents/GitHub/DIRECTORY/plugins/graphql/config/generated/schema.graphql
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
Installation
npm install strapi#alpha -g
Installation Guide
For Strapi installation Guide, Click here
Turns out this is a common Mac bug, instead of using the 'strapi' command where I too got that error, I created my project using yarn and I was able to get past it.
yarn create strapi-app new-project-name