metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.31k stars 6.28k forks source link

error on upload #723

Closed supercarsforall closed 2 years ago

supercarsforall commented 2 years ago

Describe the bug Attempting to upload files on devnet using local keypair and png's and json in ./assets folder, produces the error below. What did I do wrong?

Steps to reproduce the behavior:

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

Expected behavior Should have verification of upload

Screenshots

Beginning the upload for 10 (png+json) pairs
started at: 1634191221770
wallet public key: 7PBvdg8PbZNNZrsfx8ZxdGn26cQiTpwZXjCPUwqh1DBi
Processing file: 0
initializing config
Error deploying config to Solana network. TypeError: Cannot read property '_bn' of undefined
    at isPublicKeyData (/Users/design_workstation/Code/metaplex/js/node_modules/@solana/web3.js/src/publickey.ts:29:35)
    at new PublicKey (/Users/design_workstation/Code/metaplex/js/node_modules/@solana/web3.js/src/publickey.ts:45:9)
    at /Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:104:26
    at Array.map (<anonymous>)
    at Object.<anonymous> (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:102:52)
    at step (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:44:23)
    at Object.next (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:25:53)
    at fulfilled (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:3996) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_bn' of undefined
    at isPublicKeyData (/Users/design_workstation/Code/metaplex/js/node_modules/@solana/web3.js/src/publickey.ts:29:35)
    at new PublicKey (/Users/design_workstation/Code/metaplex/js/node_modules/@solana/web3.js/src/publickey.ts:45:9)
    at /Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:104:26
    at Array.map (<anonymous>)
    at Object.<anonymous> (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:102:52)
    at step (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:44:23)
    at Object.next (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:25:53)
    at fulfilled (/Users/design_workstation/Code/metaplex/js/packages/cli/src/commands/upload.ts:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3996) 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:3996) [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.

Desktop (please complete the following information):

zamkamec commented 2 years ago

+1 facing the same issue on Xubuntu Linux

Akronae commented 2 years ago

Same on Windows

PS C:\Users\alexr\prog\solana> candy upload .\simple-collection\ -k C:\Users\alexr\.config\solana\devnet.json --env devnet
Beginning the upload for 2 (png+json) pairs
started at: 1634208286634
wallet public key: 3H3Zqg61KgLKbmSHA3egMKo4n6DQ9GR2GrpKa4y5d97w
Processing file: 0
initializing config
Error deploying config to Solana network. TypeError: Cannot read property 'map' of undefined
    at Object.<anonymous> (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:104:52)
    at step (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:44:23)
    at Object.next (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:25:53)
    at fulfilled (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:4724) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
    at Object.<anonymous> (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:104:52)
    at step (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:44:23)
    at Object.next (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:25:53)
    at fulfilled (C:\Users\alexr\metaplex-foundation\metaplex\js\packages\cli\src\commands\upload.ts:16:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4724) 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:4724) [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.
ysfbsf commented 2 years ago

Can you copy/paste a sample of your manifest file ( 0.json )? It seems that you have an issue with the creator address.

Akronae commented 2 years ago

Yes, that was the problem. I missed creatorand symbol.

elonplant commented 2 years ago

Me too facing the same issue.

supercarsforall commented 2 years ago

Here is my 0.json file. Address is a valid wallet I generated on phantom but has no tokens. It is not the dev wallet I generated using this tutorial: https://hackmd.io/@levicook/HJcDneEWF, don't know if that matters

    "name": "Version_,
    "symbol": "",
    "image": "0.png",
    "properties": {
        "files": [
            {
                "uri": "0.png",
                "type": "image/png"
            }
        ],
        "category": "image",
        "creators": [
            {
                "addresss": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "share": 100
            }
        ]
    },
0xMMelvin commented 2 years ago

Having the same issue... v1.0.0

0xMMelvin commented 2 years ago

Added creator and symbol. Still getting the _bn undefined error.

amine7777 commented 2 years ago

@mmelvin0581 Have you found a solution for this issue ? I am facing the same error..

0xMMelvin commented 2 years ago

@anime7777 i generated a new keypair and deleted the .cache folder and ran from scratch. That seemed to work for me. Also, wait a while to run verify. Check the .cache for the temp folder, copy/paste it to a json folder, then paste the "links" url into the browser. Arweave was taking a while to upload things yesterday. After you've checked a few of the links. You're good to continue.

amine7777 commented 2 years ago

I resolved the error by correcting the json files with @supercarsforall 's solution. My issue was the following the creators key was looking for a dict and I was giving a string. @mmelvin0581 Thank you for your fast reply and thank you @supercarsforall for the solution.

Deadstop1 commented 2 years ago

I have played around with my json file and it still showing this error.

amine7777 commented 2 years ago

Can you show us your json file please ?

Mamu9 commented 2 years ago

Here is my 0.json file. Address is a valid wallet I generated on phantom but has no tokens. It is not the dev wallet I generated using this tutorial: https://hackmd.io/@levicook/HJcDneEWF, don't know if that matters

    "name": "Version_,
    "symbol": "",
    "image": "0.png",
    "properties": {
        "files": [
            {
                "uri": "0.png",
                "type": "image/png"
            }
        ],
        "category": "image",
        "creators": [
            {
                "addresss": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "share": 100
            }
        ]
    },

There is a typo/comma at the end bracket - in the last. @supercarsforall

github-actions[bot] commented 2 years ago

This Issue has received no activity for 30 days. We will close it in 2 days, please reopen if you are still experiencing this issue.

utgarda commented 2 years ago

Here is my 0.json file. Address is a valid wallet I generated on phantom but has no tokens. It is not the dev wallet I generated using this tutorial: https://hackmd.io/@levicook/HJcDneEWF, don't know if that matters

    "name": "Version_,
    "symbol": "",
    "image": "0.png",
    "properties": {
        "files": [
            {
                "uri": "0.png",
                "type": "image/png"
            }
        ],
        "category": "image",
        "creators": [
            {
                "addresss": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "share": 100
            }
        ]
    },

There is a typo/comma at the end bracket - in the last. @supercarsforall

And it has addresss, should be address

github-actions[bot] commented 2 years ago

This Issue has received no activity for 30 days. We will close it in 2 days, please reopen if you are still experiencing this issue.

Jessika-Art commented 2 years ago

hi guys I got a similar issue when I try to verify_assets: \metaplex\js\packages\cli\src\commands\verifyTokenMetadata\index.ts:155 throw new Error( ^ Error: At least one media file entry in properties.files array is expected to match the image property. at verifyImageURL (C:\Users\amari\Desktop\Project\metaplex\js\packages\cli\src\commands\verifyTokenMetadata\index.ts:155:11)