0

I can deploy successfully using the localhost, but when deploying to the devnet, I encounter this error. Could someone please help me?

Deploying program "user_profile_backend"...
Program path: /home/pluto/Dev/UserProfile_Solana/user-profile-backend/target/deploy/user_profile_backend.so...
thread 'main' panicked at cli/src/program.rs:2590:26:
Should return a valid tpu client: PubsubError(ConnectionError(Io(Os { code: 101, kind: NetworkUnreachable, message: "Network is unreachable" })))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(25856)), stdout: "", stderr: "" }.

Anchor.toml

[toolchain]

[features]
seeds = true
skip-lint = false

[programs.localnet]
user_profile_backend = "***"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Devnet"
wallet = "/home/pluto/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

Cargo.toml

[workspace]
members = [
    "programs/*"
]

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
4
  • Can you please edit your question to include your Anchor.toml and Cargo.toml file? Otherwise its pretty difficult to see what could be going wrong here with certainity. Commented Mar 10 at 8:33
  • Of course.@SyedAabisAkhtar
    – Pluto
    Commented Mar 10 at 8:51
  • Can you try explicitly adding a custom devnet RPC URL when running anchor deploy? For example: anchor deploy --provider.cluster custom_devnet_rpc_url Commented Mar 10 at 9:11
  • Anchor deploy was indeed successful using the custom URL! Is it because of network issues that I cannot deploy to devnet?
    – Pluto
    Commented Mar 10 at 11:20

1 Answer 1

1

Devnet seems to be working fine (You can check out https://explorer.solana.com and change the network to Devnet on top right and scroll down to see its status)

If you had by chance misconfigured to some invalid URL, then the error is different and tells you straight away that you have to use a valid cluster. Examples: enter image description here

Perhaps the default devnet RPC (https://api.devnet.solana.com) was overloaded with requests at the time you were trying. Good to hear your problem is solved now!

1
  • I checked the status of the dev network on explorer.solana.com, and it seems to be working fine. However, when I attempted to deploy to devnet again, I encountered the same error, and my SOL was deducted.
    – Pluto
    Commented Mar 11 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.