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

An error occurred when updating program id using anchor keys sync #3222

Open
caesear opened this issue Sep 4, 2024 · 4 comments
Open

An error occurred when updating program id using anchor keys sync #3222

caesear opened this issue Sep 4, 2024 · 4 comments
Labels
bug Something isn't working cli

Comments

@caesear
Copy link

caesear commented Sep 4, 2024

First, I modify the configuration of the anchor.toml file and then run the run build command. This is normal.
image

Now I want to change a program id. I first deleted my program key file target/deploy/kinobi_test-keypair.json. Then run the anchor keys list command to generate a new program key. Then run the anchor keys sync command. The result is that the anchor.toml I modified before is overwritten, causing me to lose my original configuration information, and the anchor build will fail at this time.
image

@caesear
Copy link
Author

caesear commented Sep 4, 2024

anchor version is 0.29.0.
rust version is 1.80.1 (3f5fd8dd4 2024-08-06).
cargo version is 1.80.1 (376290515 2024-07-16)

@acheroncrypto acheroncrypto added bug Something isn't working cli labels Sep 4, 2024
@acheroncrypto
Copy link
Collaborator

It seems like serialization of the custom provider.cluster input isn't compatible with its deserialization. You can easily get around this by using one of the supported cluster strings (like Localnet).

@caesear
Copy link
Author

caesear commented Sep 5, 2024

image
Unlike what you said, I simply wrote a test above, but it's useless if you change it to effective development. Focus on removing my commented code. Join I want to switch the cluster to my own paid rpc and mainnet rpc. When I use one of these, the other annotations disappear. I have to add it again. There are two problems

@nishim3
Copy link

nishim3 commented Oct 26, 2024

I am facing the same issue. Everytime I run anchor keys sync the wss url is added to the cluster and that causes an error in building...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

No branches or pull requests

3 participants