-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: account data too small for instruction #2928
Comments
This error is related to your Solana version. With Anchor
The first
This error happens because in Solana Running
All this is irrelevant to the actual problem. You can run |
Thanks for the detailed answer. I'm surprised that changing the size of the program by modifying the code does not trigger an update of the program ID via Another option, like you mentioned, could be to automatically call Are there any downsides to removing |
I'm just starting out with Solana and Anchor development.
Currently following the tutorial at this address and I'm hitting a snag.
I'm using the latest beta solana
1.18.5
and anchor0.30.0
.Steps to reproduce:
anchor init test
cd test
anchor build
-> "packagesolana-program v1.18.11
cannot be built"cargo update -p [email protected] --precise 1.18.5
(annoying, but ok, only needs to be done once...)anchor build
anchor keys sync
solana-test-validator
anchor test --skip-local-validator
-> Successfullib.rs
to add a parameter to theinitialize
function, and mirror the change in the test fileanchor test --skip-local-validator
-> Error belowSteps I tried to do to resolve (right after the last command)
anchor keys sync
(NOTE: this does NOT change the program id in the code)anchor test --skip-local-validator
-> Same errorsolana-test-validator
anchor test --skip-local-validator
-> Same errorWhat gives? I'm super confused and it's a really frustrating experience.
I noticed that doing
cargo clean
then building again makes the error go away, but that's such bad DX I can't see myself doing that every time I make a change to my program!NOTE: after cargo clean, the next call to
anchor keys sync
reports: "Found incorrect program id declaration in Anchor.toml for the programtest
"This would indicate a cache invalidation problem with
anchor keys sync
.The text was updated successfully, but these errors were encountered: