I was working on an anchor program that when I tested gave me the "Program failed to complete" error randomly. I read that generating a new wallet keypair with solana-keygen new would help but after doing so my program is unable to deploy and i get the error Program's authority Some(32BMsbefwV9PLzXenSoakzagGmdVqzxNctXYkqNiHKxT) does not match authority provided DFXxxFYktHT1Z7d1xWgq4WoMqniEfiNeTagU751xMLM. Does anyone know how I could proceed? Any help is greatly appreciated!

2 Answers 2


If you don't care about the old program address

You can fix this by deleting target/ folder and running cargo clean. Then anchor test or anchor build and anchor deploy And keep in mind that you have to update the declare_id after deploy.


I am guessing the program was already deployed with a pre existing file system wallet. A program account stores something called an Upgrade Authority which maintains the publicKey of the wallet which has the authority to change the program. It usually is the file system wallet.

If you changed the Keypair of your file system wallet, you will not be able to change the program. You need to revert back to the old Keypair with which the program was deployed.

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.