0

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

Detech
  • 1
  • 3

2 Answers2

1

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.

Jon C
  • 7,019
  • 10
  • 17
  • Doesn't seem like a devnet issue. I tried multiple times over the past few days. Same error. Built it from the scratch again with the above instructions; solana program deploy and anchor deploy don't work. Got through with anchor deploy --program-name but it seems like a false positive as it doesn't show up in the explorer. Prog ID: 322UyGdq4VrLd6zKv3PFhhgmGQYnxS3XSirX52Vaxe64 – Detech Nov 30 '21 at 18:40
  • Still getting the error: Data writes to account failed: HTTP status client error (408 Request Timeout) for url (https://api.devnet.solana.com/) – Detech Dec 02 '21 at 08:54
  • Try checking your local configs if they are correctly setup? `solana config get` ? – munanadi Dec 02 '21 at 17:33
  • Config File: /home/sola/.config/solana/cli/config.yml RPC URL: https://api.devnet.solana.com WebSocket URL: wss://api.devnet.solana.com/ (computed) Keypair Path: /home/sola/.config/solana/id.json Commitment: confirmed – Detech Dec 04 '21 at 18:07
0

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.

Detech
  • 1
  • 3