metaplex-foundation / metaplex

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

[Bug]: mintig to mainnet beta json issue Unexpected token E in JSON at position 0 #1827

Closed jester91 closed 2 years ago

jester91 commented 2 years ago

Which package is this bug report for?

candy machine cli

Issue description

2 weeks ago I've tried to mint on prod it was successful, I've removed the .cache files also, so everything should be fresh. I've set up the json and the png and the config file based on the docs but when I tried to run the following command I got this issue.

Command

ts-node .\js\packages\cli\src\candy-machine-v2-cli.ts upload ./assets --env mainnet-beta --keypair ~/config/solana/mainnet-test.json -cp config.json

Relevant log output

Uploading Size 10 { mediaExt: '.png', index: '0' }
Processing asset: 0
Error uploading file [object Object] FetchError: invalid json response body at https://us-central1-metaplex-studios.cloudfunctions.net/uploadFile reason: Unexpected token E in JSON at position 0
    at D:\Projects\solana_mint\metaplex\js\packages\cli\node_modules\node-fetch\lib\index.js:273:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async upload (D:\Projects\solana_mint\metaplex\js\packages\cli\src\helpers\upload\arweave.ts:24:10)
    at async arweaveUpload (D:\Projects\solana_mint\metaplex\js\packages\cli\src\helpers\upload\arweave.ts:105:18)
    at async D:\Projects\solana_mint\metaplex\js\packages\cli\src\commands\upload.ts:265:41
    at async Promise.all (index 0)
    at async uploadV2 (D:\Projects\solana_mint\metaplex\js\packages\cli\src\commands\upload.ts:221:7)
    at async Command.<anonymous> (D:\Projects\solana_mint\metaplex\js\packages\cli\src\candy-machine-v2-cli.ts:184:7) {
  type: 'invalid-json'
}

Operating system

Windows

Priority this issue should have

High (immediate attention needed)

Check the Docs First

jester91 commented 2 years ago

my json looks like : { "name": "20000$ - Legendary - Bull - Data", "symbol": "1.png", "description": "PayPal plans to launch its global crypto services. Binance, the worlds largest cryptocurrency exchange, has started shipping its physical Binance Visa cards. Official CryptoMemories NFT minted on the Solana blockchain. https://CryptoMemories.io/", "seller_fee_basis_points": 500, "image": "1.png", "attributes": [ { "trait_type": "Event (A)", "value": "Binance" }, { "trait_type": "Event (B)", "value": "PayPal" }, { "trait_type": "Event (C)", "value": " - " }, { "trait_type": "Event (D)", "value": " - " }, { "trait_type": "Mood", "value": "Data" }, { "trait_type": "CryptoCurrency", "value": "Data" }, { "trait_type": "Year", "value": "Data" }, { "trait_type": "Month", "value": "Data" }, { "trait_type": "Rarity", "value": "Data" }, { "trait_type": "Stars", "value": "Data" }, { "trait_type": "Serial Number", "value": "Data" } ], "collection": { "name": "data data", "family": "data" }, "properties": { "files": [ { "uri": "1.png", "type": "image/png" } ], "category": "image", "creators": [ { "address": "data", "share": 100 } ] } }

iourivolkov commented 2 years ago

I am getting the same error on Mac (intel).

Sankey5 commented 2 years ago

I'm having this same issue when uploading to Mainnet and Devnet on an Ubuntu 20.04 Server

iourivolkov commented 2 years ago

Going by an earlier comment, I tried using smaller file sizes (< 11mb) and the deployment worked successfully. I'm not 100% sure whether this issue is caused by larger file sizes, but i would suggest testing it out.

Khushhal23 commented 2 years ago

Hello! This issue is caused if you use files with size larger than 10 MB, for storage upto 100 mb per file, please use arweave-sol

jester91 commented 2 years ago

@Khushhal23 yepp, that helped me. Compressing the files solved the problem.

SMCul commented 2 years ago

Hello! I have the same issue, but my files aren't bigger than 10 MB. Any idea?

JstnEdr commented 2 years ago

This appears to still be an issue.

Error uploading {"mediaExt":".png","index":"1"} asset (skipping) invalid json response body at https://us-central1-meta0

Proto133 commented 2 years ago

On Devnet, I'm getting ....asset (skipping) invalid json response body at https://us-central1-metaplex-st0