Reputation: 3
How to fix this Solana error?
throw new SendTransactionError( ^ SendTransactionError: failed to send transaction: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit. at Connection.sendEncodedTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4546:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Connection.sendRawTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4505:20) at async Connection.sendTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\connection.ts:4493:12) at async Object.sendAndConfirmTransaction (C:\Users\Alisa'sTech\node_modules@solana\web3.js\src\util\send-and-confirm-transaction.ts:31:21) at async main (C:\Users\Alisa'sTech\Desktop\mpl\main.ts:63:18) { logs: [] }
Upvotes: 0
Views: 1641
Reputation: 8462
The error says it all: "Attempt to debit an account but found no record of a prior credit."
This means that you're trying to move SOL from an account with no SOL. If you're on devnet / testnet / localnet, you can airdrop SOL directly to the account with solana airdrop 1 <ACCOUNT_PUBKEY>
.
Upvotes: 0