Problem with local env. tests fail
Account doesn't get initiated every time for other program tests as well, but works on solpg
anchor test Finished release [optimized] target(s) in 0.10s
Found a 'test' script in the Anchor.toml. Running it as a test suite!
Running test suite: "/home/madhan/dev/solana/program-examples/tokens/spl-token-minter/anchor/Anchor.toml"
yarn run v1.22.19 warning package.json: No license field warning ../../../../../../package.json: No license field $ /home/madhan/dev/solana/program-examples/tokens/spl-token-minter/anchor/node_modules/.bin/ts-mocha -p ./tsconfig.json -t 1000000 'tests/**/*.ts'
SPL Token Minter 1) Create an SPL Token! 2) Mint some tokens to your wallet!
0 passing (117ms) 2 failing
SPL Token Minter Create an SPL Token!: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete at Connection.sendEncodedTransaction (node_modules/@project-serum/anchor/node_modules/@solana/web3.js/src/connection.ts:5922:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Connection.sendRawTransaction (node_modules/@project-serum/anchor/node_modules/@solana/web3.js/src/connection.ts:5881:20) at sendAndConfirmRawTransaction (node_modules/@project-serum/anchor/src/provider.ts:284:21) at AnchorProvider.sendAndConfirm (node_modules/@project-serum/anchor/src/provider.ts:144:14) at MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/src/program/namespace/rpc.ts:29:16)
SPL Token Minter Mint some tokens to your wallet!: Error: AnchorError caused by account: mint_account. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized. at Function.parse (node_modules/@project-serum/anchor/src/error.ts:167:14) at translateError (node_modules/@project-serum/anchor/src/error.ts:276:35) at MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/src/program/namespace/rpc.ts:35:29) at processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
- Edit
tx logs from .anchor after adding {skipPreflight: true} inside of the .rpc() method
Streaming transaction logs mentioning AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx. Confirmed commitment
Transaction executed in slot 6: Signature: 3oxzqTbUWnqbKEyoMgZ4XGx6dUr2e2BKmpdW32FE6SLqht65xHR6smv5SfZbTN63u37kCvcyYubmGgGjxCRZ7g6w
Status: Error processing Instruction 0: Program failed to complete
Log Messages: Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx invoke 1
Program log: Instruction: CreateToken
Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx consumed 8173 of 200000 compute units
Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx failed: Invoked an instruction with data that is too large (12884933564 > 10240)
Transaction executed in slot 7: Signature: 5BFo6C3n1Mp5gmu9QsAZJ5SgrFSBdEm3hrmdbQBdoFuEhR7wimXiAYqywWyVzozNVbhAykUQvcMjhwnZMnXqSEdZ
Status: Error processing Instruction 0: custom program error: 0xbc4
Log Messages: Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx invoke 1 Program log: Instruction: MintTo
Program log: AnchorError caused by account: mint_account. Error Code: AccountNotInitialized. Error Number: 3012.
Error Message: The program expected this account to be already initialized.
Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx consumed 5093 of 200000 compute units
Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx failed: custom program error: 0xbc4
- Edit 2
New dependency error shows up everytime during build with the errors mentioned in the img