Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solana deploy "account data too small for instruction"

Tags:

solana

When i try to deploy a program with anchor (devnet or mainnet, same error), i get the following error : Deploying program failed: Error processing Instruction 0: account data too small for instruction.

I have no clue where this comes from.

The so file is around 331Ko, and apparently, the error shows up when i try to use "mpl-token-metadata" to get metadata of NFT

Any one has an idea how to correct that ?

like image 745
Frederic Avatar asked Dec 21 '25 18:12

Frederic


2 Answers

You don't have to redeploy your program.

Using Solana CLI (>1.18) you can do:

$ solana program extend <PROGRAM_ID> <MORE_BYTES>

To allocate more bytes, then try again.

like image 63
kevinrodriguez-io Avatar answered Dec 24 '25 11:12

kevinrodriguez-io


Delete the target folder

Run anchor build, this will add a new keypair to target/deploy

run anchor keys list, this will give you the new program id

copy the id to the top of your lib.rs

run anchor build again

and anchor deploy

like image 40
Hadi Saleh Avatar answered Dec 24 '25 11:12

Hadi Saleh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!