2

When I try to run this simple "hello world" example, I get this error:

$ anchor test

Error: Function _ZN14solana_program4vote5state9VoteState11deserialize17h6501cbf018769324E Stack offset of 6344 exceeded max offset of 4096 by 2248 bytes, please minimize large stack variables
Error: Function _ZN229_$LT$solana_program..vote..state..vote_state_0_23_5.._..$LT$impl$u20$serde..de..Deserialize$u20$for$u20$solana_program..vote..state..vote_state_0_23_5..VoteState0_23_5$GT$..deserialize..__Visitor$u20$as$u20$serde..de..Visitor$GT$9visit_seq17h82eaf761022c2655E Stack offset of 5752 exceeded max offset of 4096 by 1656 bytes, please minimize large stack variables

It is default using version 1.15.2 for solana-program.

When I force change the version to 1.14.16 I get a different error:

$ anchor test

Is initialized!:
Error: failed to send transaction: Transaction simulation failed: This program may not be used for executing instructions
  at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/src/connection.ts:5792:13)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at Connection.sendRawTransaction (node_modules/@solana/web3.js/src/connection.ts:5751:20)
  at sendAndConfirmRawTransaction (node_modules/@project-serum/anchor/src/provider.ts:318:21)
  at AnchorProvider.sendAndConfirm (node_modules/@project-serum/anchor/src/provider.ts:149:14)
  at MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/src/program/namespace/rpc.ts:29:16)

What am I doing wrong?

1 Answer 1

2

You can solve this by running

anchor test --skip-local-validator

You must be running a local validator on a different window with:

solana-test-validator

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.