Detech
Detech

Reputation: 1

Cannot deploy program to devnet with Anchor

On trying to deploy a program to devnet using anchor deploy, it takes a long while and throws the below error: Data writes to account failed: There was a problem deploying: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "" }.

I tried downgrading both anchor and solana; it doesn't work. On retrying, it goes into: Blockhash expired. 5 retries remaining Blockhash expired. 4 retries remaining Blockhash expired. 3 retries remaining Blockhash expired. 2 retries remaining Blockhash expired. 1 retries remaining Error: Data writes to account failed: Custom error: Max retries exceeded

Upvotes: 0

Views: 1909

Answers (2)

Detech
Detech

Reputation: 1

It might actually be just a network error. I switched to a different network and since the devnet wallet is not working currently, deployed it on the testnet and it totally worked.

Note: I'd tried to deploy on testnet earlier (using my previous network) and still got the same error, so it's not a devnet issue. Switching to a different network is what got it working.

Upvotes: 0

Jon C
Jon C

Reputation: 8402

Perhaps devnet was experiencing some issues at the time. To try from scratch, please do the following:

  • install the newest version of the CLI (1.8.5 as of this writing): https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-tool
  • airdrop yourself enough SOL, say 10 to be safe, using solana airdrop 1 multiple times
  • make sure you're on devnet: solana config set --url devnet
  • build the program to be sure: cargo build-bpf
  • deploy the program: solana program deploy path_to_my_built_program.so

If you're still having issues after that, could you post your program's address? Then we can see the transactions that have succeeded and failed.

Upvotes: 1

Related Questions