【问题标题】:使用 metaplex 创建糖果机时如何解决此错误?
【发布时间】:2021-12-03 16:04:39
【问题描述】:

我正在关注本教程“https://www.youtube.com/watch?v=4LLx7SMAOag&t=446s”,他在 9:28 告诉我们输入此内容

ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/config/solana/devnet-test.json

他的结果是一个初始化的糖果机,如视频所示。我的是:

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.

我该怎么做才能解决这个问题? (我在 Mac 上的 Visual Studio 代码中运行它)

【问题讨论】:

  • 请检查以下内容 1. 请检查每个元数据中的创建者地址。它应该是 solana 网络上的有效公钥。 2. 请检查 solana cli 是否在您的终端上运行。例如:solana balance

标签: visual-studio-code solana unhandled-promise-rejection metaplex


【解决方案1】:

如果您还没有,或许可以尝试将 10 个 SOL 空投到上面列出的那个钱包地址?但是先做 5 个,然后再做 5 个。

我不记得我遇到了什么错误,但我确实遇到了那条线的问题。

空投 Sol 的命令很简单。 Solana 空投 x(x 是您的 SOL 数量)。

Idk,值得一试。

【讨论】:

  • 谢谢,我能够通过更改为不同的互联网连接来解决这个问题。原来的连接工作得很好,但由于某种原因,我一直无法使用它上传/create_candy_machine 命令。
猜你喜欢
  • 2021-12-17
  • 2022-12-18
  • 2021-11-03
  • 2019-10-26
  • 2022-07-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多