Circle Hsiao
Circle Hsiao

Reputation: 1977

Solana candy machine upload assets Error: memory allocation failed, out of memory

I was trying to upload testing content by

ts-node src/candy-machine-cli.ts upload assets --env devnet --keypair "~\.config\solana\devnet.json" -n 10

And ran into error below

Transaction simulation failed: Error processing Instruction 1: Program failed to complete Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ invoke [1] Program log: Error: memory allocation failed, out of memory Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ consumed 200000 of 200000 compute units Program failed to complete: BPF program panicked Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ failed: Program failed to complete

I think the message may be misleading since I'm processing only 10 images. But not sure what exactly went wrong.

Upvotes: 0

Views: 2326

Answers (3)

Sean O
Sean O

Reputation: 414

Not documented but according to Metaplex's code, the name length limit is 32

All the size limits for candy machine metadata can be found here (defined here).

Important values people commonly have errors with are:

MAX_NAME_LENGTH = 32;
MAX_SYMBOL_LENGTH = 10;
MAX_URI_LENGTH = 200;

so definitely start with checking the name length and symbol length in your metadata. The verify_metadata cmd in metaplex cli will also help to check for this before you upload.

Upvotes: 3

Igor Barbashin
Igor Barbashin

Reputation: 921

I had a similar error in Candy Machine v2. Turns out one of my token names was longer than 32 characters. It's completely undocumented, but check the names of your tokens.

0.json

{
  "name": "Apparently this name was too long",
  "symbol": "",
  "image": "0.png",
  "properties": {
    "files": [
      {
        "uri": "0.png",
        "type": "image/png"
      }
    ],
    "creators": [
      {
        "address": "3PH55LMruoQnMmEXLgofGDk3XE2ktDtCZso7K4EeYdQZ",
        "share": 50
      },
      {
        "address": "2iZ2Wpp96P5ncpBcGnrvRDFnts9fgBBTYHDbZgb5SDYa",
        "share": 50
      }
    ]
  }
}

Upvotes: 6

Circle Hsiao
Circle Hsiao

Reputation: 1977

I found the answer for my case on issue-exploer of metaplex

Although don't really get why; the issue can be prevented by keeping "symbol": "".

*This json property locates in each asset.json and is sourced from traits-configuration.json

Upvotes: 2

Related Questions