anchor: devnet deploy error: unrecognized signer source
I created setup project using anchor init testproject --javascript
in $HOME/solana project
directory.
After:
- setting up to devnet using
solana config set --url devnet
- changing localnet to devnet in
Anchor.toml
- changing program id in
lib.rs
andAnchor.toml
file same assolana address -k target/deploy/testproject-keypair.json
anchor build
--> successanchor deploy
--> error
anchor deploy error:
Deploying workspace: https://api.devnet.solana.com
Upgrade authority: $HOME/.config/solana/id.json
Deploying program "testproject"...
Program path: $HOME/solana project/target/deploy/testproject.so...
error: Invalid value for '--program-id <PROGRAM_ID>': unrecognized signer source
There was a problem deploying: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "" }.
I have followed same steps as above but created project in $HOME/solana_project
directory, anchor deploy
worked properly.
Observation: project path containing space could have caused the whole issue.
Analysis:
In the solana program deploy....
command here
for 2nd project command will be solana program deploy ... --program-id ... $HOME/solana_project/...
for 1st project command will be solana program deploy ... --program-id ... $HOME/solana project/...
a space in the whole command is causing the issue similar to how a copy/move command errors out in linux
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 30 (4 by maintainers)
Just to bump this as I have the same problem as @titocosta. I’m following the instructions from Buildspace as foundhere and running on an M1 Macbook Air.
Using
anchor deploy --program-name <PROGRAM ID>
lets it deploy butanchor test --skip-local-validator
causes the errorI have the Solana validator running locally as per the linked documentation
@jlubeck @kfartusov @BowTiedUrsus would you mind trying again with an updated version installed via
cargo install --git https://github.com/project-serum/anchor anchor-cli --locked --force
?If the issue continues, could you please confirm there are no spaces in the path to your project directory.
@tomlinton I can confirm that this also worked for me and I’m able to deploy with Anchor:
--program-name <program id>
solved it for me onanchor deploy
but I still get the same error when usinganchor test
which doesn’t seem to accept a--program-name
option.Was having the very same problem and this fixed it, thank you!
Works now! Thanks!
@tomlinton worked for me! I was able to just do
anchor test
and it worked 😃 😃@armaniferrante looks like #1046 is not fixing this, would you mind re-opening it please? Thanks!
The same for me, last build, with fix https://github.com/project-serum/anchor/pull/1046. Still the same behavior
My solution about this problem is run
anchor deploy
with--program-name
parameter.anchor deploy --program-name <your ID>
To get this ID, i use this doc.
@shivam-agarwal-0