Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid blockhash error when I try to deploy #1157

Closed
Sargnec opened this issue Dec 17, 2021 · 10 comments
Closed

Invalid blockhash error when I try to deploy #1157

Sargnec opened this issue Dec 17, 2021 · 10 comments

Comments

@Sargnec
Copy link

Sargnec commented Dec 17, 2021

I dont know how to solve this. When I try to deploy to solana with anchor deploy its always gives me this error
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.

I'm following tutorial made by buildspace and the tutorial name is Build a Web3 app on Solana with React and Rust. I get this error in section 3 lesson 1

@0xdhu
Copy link

0xdhu commented Dec 29, 2021

I am getting exactly same issue

@enzoampil
Copy link
Contributor

enzoampil commented Jan 11, 2022

getting this issue now on a devnet deployment. Interesting bit is i notice it correlating with deployments taking longer. Could it be that larger programs are not being validated in time; hence, the "timeout error" (ExitStatus(unix_wait_status(256)) seems like a timeout error)

@enzoampil
Copy link
Contributor

I was able to resolve my error by reverting to earlier versions of solana-cli and anchor-cli

solana-cli 1.8.0 (src:4a8ff62a; feat:1813598585)
anchor-cli 0.18.2
rustc 1.57.0 (f1edd0429 2021-11-29)

@armaniferrante
Copy link
Member

This is likely not related to Anchor. Closing.

@AuroraLantean
Copy link

AuroraLantean commented Jan 12, 2022

I have solved this in my Linux Mint(Ubuntu):

Local npm package: @project-serum/anchor 0.20.1
Solana program dependencies: anchor-lang 0.20.1, anchor-spl 0.20.1, solana-program 1.9.4
deployment to devnet failed

Local npm package: @project-serum/anchor 0.18.2
Solana program dependencies: anchor-lang 0.18.2, anchor-spl 0.18.2, solana-program 1.9.4
deployment to devnet succeeded!

in both cases, the global environment is:

Rust 1.57.0
solana-cli 1.9.4
@project-serum/anchor-cli 0.20.1

@abhi3700
Copy link

abhi3700 commented Jan 14, 2022

For Mac M1,

Rust 1.57.0
solana-cli 1.8.0
@project-serum/anchor-cli 0.20.1

these tools' versions work.
I tried myself.

@jeffhu1
Copy link

jeffhu1 commented Feb 11, 2022

Reverting solana-cli from 1.9.5 to 1.8.0 fixed this for me

@compscihq
Copy link

@abhi3700 @jeffhu1 did u have issues compiling solana 1.8.0 on M1 mac?

i'm getting

 Installing spl-token-cli v2.0.15
error: failed to compile `spl-token-cli v2.0.15`, intermediate artifacts can be found at `/var/folders/5x/qdyndvsd67924z389z1dxngh0000gn/T/cargo-installEv9kzL`

Caused by:
  failed to download `ed25519 v1.4.0`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/Users/username/.cargo/registry/src/github.com-1ecc6299db9ec823/ed25519-1.4.0/Cargo.toml`

Caused by:
  feature `edition2021` is required

  this Cargo does not support nightly features, but if you
  switch to nightly channel you can add
  `cargo-features = ["edition2021"]` to enable this feature

@qbig
Copy link

qbig commented Mar 12, 2022

solana-cli 1.8.12 works

@Abusayid693
Copy link

One main reason for this error is poor internet connection, make sure your internet connection is fast enough before deploying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants