{
  "about": "Algorand node errors reproduced on a live node. Each entry: message pattern, exact captured message, cause, fix.",
  "capturedOn": "2026-12-03",
  "network": "testnet",
  "errors": [
    {
      "slug": "overspend",
      "question": "Algorand \"overspend\" error: why does my transaction fail?",
      "messagePattern": "overspend (account <ADDRESS>, data {AccountBaseData:{... MicroAlgos:<balance> ...}}, tried to spend <amount>)",
      "exampleMessage": "transaction TRQ2QLHD5MUGRKHBI32TTCIQB2IEHAEJRD7SUQRI2UM4XGFHYQKA: overspend (account LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI, data {AccountBaseData:{Status:Offline MicroAlgos:0.0A RewardsBase:0 RewardedMicroAlgos:0.0A AuthAddr:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ IncentiveEligible:false TotalAppSchema:{NumUint:0 NumByteSlice:0} TotalExtraAppPages:0 TotalApp",
      "answer": "The sending account does not have enough ALGO (above its minimum balance) to cover what the transaction spends, fees included.",
      "cause": "Algorand checks the sender after the transaction: balance minus amount minus fee must stay at or above the account minimum balance (0.1 ALGO, plus 0.1 ALGO per opted-in asset and more for app state). In the capture the sender was a brand-new account with 0 ALGO, and the message printed its whole account record and \"tried to spend 1mA\" (1 milliAlgo = 1000 microAlgos, i.e. the fee). So the figure after \"tried to spend\" is not always the payment amount. A second measurement, run the same day: an account that held real ALGO on mainnet was used to sign a payment sent to a TestNet node, and the TestNet node answered with the same \"overspend\" message and \"tried to spend 1mA\", because on TestNet that address has a balance of 0. If you funded an account but the record inside the message shows MicroAlgos:0.0A, check that you are pointing at the network where you funded it.",
      "fix": [
        "Read the sender: algod.accountInformation(addr) gives amount and minBalance (microAlgos).",
        "Spendable = amount - minBalance. It must be at least payment amount + fee.",
        "On TestNet fund the account from the dispenser; on mainnet send ALGO to it first.",
        "If the account is funded but the message shows a zero balance, you are on the wrong network: confirm the algod URL (mainnet vs TestNet) matches where you sent the ALGO."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "balance-below-min",
      "question": "Algorand \"balance below min 100000\" error when sending ALGO to a new account",
      "messagePattern": "account <ADDRESS> balance <n> below min 100000 (0 assets)",
      "exampleMessage": "transaction EHKJCF3O2ZKSDL2WWJ5WXOH3ZEZQFSIJIHMYLZARCFYLKOUWRSPA: account LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI balance 1000 below min 100000 (0 assets)",
      "answer": "The payment would leave the receiving account under its minimum balance, which is 100000 microAlgos (0.1 ALGO) for an account with nothing opted in.",
      "cause": "A new account must receive at least 0.1 ALGO in its first payment. In the capture a payment of 1000 microAlgos to an unfunded address was rejected with \"balance 1000 below min 100000 (0 assets)\". The \"(0 assets)\" part is the number of assets the account holds; each opted-in asset raises the minimum by another 100000.",
      "fix": [
        "Send at least 100000 microAlgos (0.1 ALGO) to an account that has never been funded.",
        "If the account will also hold an asset (for example USDC), send at least 200000 so it can opt in."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "must-optin",
      "question": "Algorand \"receiver error: must optin\" when sending an asset (USDC)",
      "messagePattern": "receiver error: must optin, asset <ASSET_ID> missing from <RECEIVER_ADDRESS>",
      "exampleMessage": "transaction GLEANC4GYP5RDJJ22FYTV5JMHLZ65Y5DO2SLXPOT2AWGUTFHA5EQ: receiver error: must optin, asset 778799416 missing from LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI",
      "answer": "The receiving address has not opted in to the asset, so it cannot hold it. The receiver has to opt in first.",
      "cause": "Algorand assets (ASAs) must be explicitly opted into by the holder. The capture sent an asset to an address that had not opted in and got \"receiver error: must optin, asset 778799416 missing from <address>\". The address in the message is the receiver.",
      "fix": [
        "The RECEIVER sends a 0-amount transfer of the asset to itself (the opt-in). That also needs 0.1 ALGO of extra minimum balance.",
        "For USDC on mainnet the asset id is 31566704; on TestNet 10458941.",
        "Check beforehand: accountInformation(receiver).assets must list the asset id."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "fee-too-small",
      "question": "Algorand \"txgroup fees is less than 1mA\" error",
      "messagePattern": "txgroup with <fee>A fees is less than 1mA (usage=<n> * base=1mA)",
      "exampleMessage": "txgroup with 0.0A fees is less than 1mA (usage=1.000000 * base=1mA)",
      "answer": "The transaction fee is below the network minimum of 1000 microAlgos (written 1mA, one milliAlgo).",
      "cause": "The capture built a payment with fee 0 and flatFee set, and the node answered \"txgroup with 0.0A fees is less than 1mA\". The number before \"A\" is your fee in ALGO; \"1mA\" is the minimum for this group.",
      "fix": [
        "Use the suggested params from the node and do not force a fee: await algod.getTransactionParams().do().",
        "If you set a fee yourself with flatFee, make it at least 1000 microAlgos per transaction in the group."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "txn-dead",
      "question": "Algorand \"txn dead: round outside of\" error",
      "messagePattern": "txn dead: round <current round> outside of <firstValid>--<lastValid>",
      "exampleMessage": "txn dead: round 69849949 outside of 1--900",
      "answer": "The current round of the node is outside the transaction's validity window (firstValid to lastValid). The transaction expired, was built too early, or was built for a different network.",
      "cause": "Two captures produced this exact message. (1) A transaction with a window of rounds 1 to 900 was sent when the network was at round 69849949. (2) A transaction built from MAINNET suggested params and sent to TestNet answered \"txn dead: round 69849949 outside of 67531387--67532387\", because the mainnet round window means nothing on TestNet. The wrong network did not produce a genesis-hash message first: it showed up as \"txn dead\".",
      "fix": [
        "Fetch suggested params right before building the transaction; do not cache them for long (the window is about 1000 rounds, roughly an hour).",
        "If the window in the message is nowhere near the current round, check that the params came from the same network you are sending to (mainnet vs TestNet)."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "asset-missing-from-sender",
      "question": "Algorand \"asset <id> missing from <address>\" error when sending an asset",
      "messagePattern": "transaction <TXID>: asset <ASSET_ID> missing from <SENDER_ADDRESS>",
      "exampleMessage": "transaction 5XEL3OGH5E3J7J5PKUERKP2Z2N6QFTAX5RH64PR6257AWVAD4JVA: asset 99999999999 missing from I7UPLJPMKA67GCEXWW4EVGPS5MUOROAIRD4FMV4DCGUGCQLVNRJTSDHJFU",
      "answer": "The sending address does not hold this asset (never opted in, or the asset id is wrong or does not exist).",
      "cause": "The capture sent asset id 99999999999, which does not exist, from a funded account, and got \"asset 99999999999 missing from <sender>\". A second capture used a real asset that exists (TestNet USDC, 10458941) which the sender had not opted in to, and got the identical wording \"asset 10458941 missing from <sender>\", so this message alone cannot tell the two cases apart. Compare with \"receiver error: must optin\", which names the RECEIVER.",
      "fix": [
        "Confirm the asset id exists: GET /v2/assets/{id} on the node (404 means it does not).",
        "Confirm the sender holds it: accountInformation(sender).assets lists it with an amount."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "should-have-been-authorized-by",
      "question": "Algorand \"should have been authorized by ... but was actually authorized by\" error",
      "messagePattern": "transaction <TXID>: should have been authorized by <EXPECTED_ADDRESS> but was actually authorized by <SIGNER_ADDRESS>",
      "exampleMessage": "transaction W2WU4PF2HFPFBL76Q7K3HWSXLLP7GUYSJCB3NWGD63MIBCFDKNCQ: should have been authorized by I7UPLJPMKA67GCEXWW4EVGPS5MUOROAIRD4FMV4DCGUGCQLVNRJTSDHJFU but was actually authorized by LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI",
      "answer": "The transaction was signed with a key that does not control the sender address.",
      "cause": "The capture signed a transaction from address A with the key of address B, and the node printed both addresses: the one that should have signed, and the one that did. A rekeyed account behaves the same way: its spending key is the auth address, not its own key.",
      "fix": [
        "Sign with the secret key of the transaction's sender.",
        "If the account was rekeyed, check accountInformation(addr)['auth-addr'] and sign with that key instead."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "transaction-already-in-ledger",
      "question": "Algorand \"transaction already in ledger\" error",
      "messagePattern": "transaction already in ledger: <TXID>",
      "exampleMessage": "transaction already in ledger: AJRE6DCADN6E6XWJ5GOQV3ZU5C2JPCCGR5ANLVU22IVHYRAU4FGQ",
      "answer": "This exact signed transaction was already confirmed. Resubmitting identical bytes is rejected; the earlier one succeeded.",
      "cause": "The capture confirmed a self-payment and then sent the same signed bytes again. The node replied \"transaction already in ledger: <txid>\" and named the transaction id, so a retry after a timeout is safe to treat as success if the id matches the one you built.",
      "fix": [
        "On this error, look the txid up (pendingTransactionInformation or the indexer) and treat the payment as done.",
        "To send a second, different payment, change something (a note, the amount, the validity window) so the transaction id changes."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "msgp-decode-error",
      "question": "Algorand sendRawTransaction 'msgp: attempted to decode type \"int\" with method for \"map\"'",
      "messagePattern": "msgp: attempted to decode type \"<type>\" with method for \"<type>\"",
      "exampleMessage": "msgp: attempted to decode type \"int\" with method for \"map\"",
      "answer": "The bytes sent to the node are not a valid MessagePack-encoded signed transaction (the node could not decode them).",
      "cause": "The capture sent four arbitrary bytes and got this MessagePack decoding error. In practice it appears when you post a base64 string, JSON, or an unsigned transaction where the node expects the raw bytes of a signed transaction.",
      "fix": [
        "Post the raw bytes returned by txn.signTxn(sk) (a Uint8Array), not a base64 or JSON string.",
        "To send several transactions as one atomic group, concatenate the raw signed bytes."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "logic-eval-assert-failed",
      "question": "Algorand \"logic eval error: assert failed pc=\" in an app call",
      "messagePattern": "logic eval error: assert failed pc=<PC>. Details: app=<APP_ID>, pc=<PC>, opcodes=<nearby opcodes>",
      "exampleMessage": "logic eval error: assert failed pc=106. Details: app=778835193, pc=106, opcodes=return; label2:; intc_1 // 0; assert",
      "answer": "A condition in the smart contract was false at the instruction named by pc, so the app call was rejected.",
      "cause": "The test app executed <code>int 0; assert</code> and the node answered \"assert failed pc=106\", then printed the app id, the program counter and the opcodes around it. The pc is a byte offset into the compiled program, not a line number. The opcodes in the Details part show which assert it was, but not why the condition was false.",
      "fix": [
        "Map the pc back to your source with the source map from the compile step (await algod.compile(teal).sourcemap(true).do() returns it), or read the opcodes printed after \"opcodes=\".",
        "Re-run the call through simulateTransactions with an exec trace to see the stack before the assert.",
        "Typical causes: wrong sender, wrong argument, a state value that is not what the contract expects."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "err-opcode-executed",
      "question": "Algorand \"logic eval error: err opcode executed\"",
      "messagePattern": "logic eval error: err opcode executed. Details: app=<APP_ID>, pc=<PC>, opcodes=<nearby opcodes>",
      "exampleMessage": "logic eval error: err opcode executed. Details: app=778835193, pc=109, opcodes=intc_0 // 1; return; label3:; err; label4:",
      "answer": "The contract reached an explicit err instruction, which always fails the call. It is a deliberate \"this path is not allowed\".",
      "cause": "The test app branched into <code>err</code> and the node answered \"err opcode executed\" with the app id, pc and nearby opcodes. Contract routers commonly end with err for the case where no method or OnComplete value matched, so a call with the wrong method selector, wrong argument count or wrong on-completion type often lands here. That is how routers are commonly written; the capture itself only proves the message for a direct err.",
      "fix": [
        "Check the first application argument (the method selector) and the OnComplete value against what the contract routes.",
        "Look at the opcodes printed after \"opcodes=\": the instruction before err tells you which branch fell through."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "dynamic-cost-budget-exceeded",
      "question": "Algorand \"dynamic cost budget exceeded\" app call error",
      "messagePattern": "logic eval error: dynamic cost budget exceeded, executing <opcode>: local program cost was <n>. Details: app=<APP_ID>, pc=<PC>, ...",
      "exampleMessage": "logic eval error: dynamic cost budget exceeded, executing intc_0 (1): local program cost was 700. Details: app=778835193, pc=116, opcodes=keccak256; pop; intc_0 // 1",
      "answer": "The app call ran more opcodes than the budget allows. A single app call has a budget of 700 and expensive opcodes (hashing, EC math) use it up fast.",
      "cause": "The test app looped over <code>keccak256</code>, an expensive opcode, and the node stopped it with \"dynamic cost budget exceeded ... local program cost was 700\". The 700 in the message is the per-call budget shown by the node in this capture. The budget is shared across the app calls in one atomic group. Measured on this test app, whose loop needs about 2600 units: the call alone failed, with one extra plain app call in the group it still failed, and with four extra plain app calls (5 x 700 = 3500) it passed. Simulate with <code>extraOpcodeBudget: 5000</code> also passed.",
      "fix": [
        "Add dummy app calls to the same atomic group to pool more budget (each adds its own), or make the program cheaper.",
        "In simulate, set extraOpcodeBudget to see how much more you need.",
        "Avoid hashing or curve operations in loops."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "invalid-box-reference",
      "question": "Algorand \"invalid Box reference\" in an app call",
      "messagePattern": "logic eval error: invalid Box reference 0x<hex of the box name>. Details: app=<APP_ID>, pc=<PC>, ...",
      "exampleMessage": "logic eval error: invalid Box reference 0x6d79626f78. Details: app=778835193, pc=134, opcodes=return; label5:; pushbytes 0x6d79626f78 // \"mybox\"; box_get",
      "answer": "The contract touched a box that the transaction did not list in its box references.",
      "cause": "The test app read the box named \"mybox\" without it being declared, and the node answered \"invalid Box reference 0x6d79626f78\". The value after 0x is the box name in hex: 6d79626f78 is the bytes of \"mybox\". Every box an app call reads or writes must be listed in the transaction (or be available through the group's pooled references).",
      "fix": [
        "Decode the hex to find the box name, then add { appIndex, name } to the transaction's boxes list.",
        "Use simulate with allowUnnamedResources to have the node report which resources the call needs."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "invalid-accounts-index",
      "question": "Algorand \"invalid Accounts index\" in an app call",
      "messagePattern": "logic eval error: invalid Accounts index <n>. Details: app=<APP_ID>, pc=<PC>, ...",
      "exampleMessage": "logic eval error: invalid Accounts index 5. Details: app=778835193, pc=139, opcodes=intc_0 // 1; return; label6:; txna Accounts 5",
      "answer": "The contract asked for an account at an index the transaction did not provide.",
      "cause": "The test app executed <code>txna Accounts 5</code> on a call with no extra accounts and the node answered \"invalid Accounts index 5\". In the accounts array, index 0 is the sender and the foreign accounts you pass follow from index 1.",
      "fix": [
        "Pass the account in the transaction's accounts list and use the matching index (1 for the first foreign account).",
        "Inside the contract, check txn NumAccounts before indexing."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "would-result-negative",
      "question": "Algorand TEAL \"- would result negative\" error",
      "messagePattern": "logic eval error: - would result negative. Details: app=<APP_ID>, pc=<PC>, opcodes=...",
      "exampleMessage": "logic eval error: - would result negative. Details: app=778835193, pc=155, opcodes=intc_1 // 0; intc_0 // 1; -",
      "answer": "The contract subtracted a larger unsigned number from a smaller one. TEAL integers are unsigned 64-bit and subtraction does not wrap: it fails the call.",
      "cause": "The test app ran <code>int 0; int 1; -</code> and the node answered \"- would result negative\". The message names the operator. The same family of messages exists for other arithmetic opcodes, but only the subtraction wording was captured here.",
      "fix": [
        "Compare before subtracting (a >= b) and handle the smaller case explicitly.",
        "Check the balance or counter your contract subtracts from is what you assumed."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    },
    {
      "slug": "only-clearstate-supported",
      "question": "Algorand \"only ClearState is supported for an application that does not exist\"",
      "messagePattern": "transaction <TXID>: only ClearState is supported for an application (<APP_ID>) that does not exist",
      "exampleMessage": "transaction DKOMMG5ZUBZLB7RJHIKW4JQICN6PSUOHNQZ53ZCTZTDXTXQV7PGQ: only ClearState is supported for an application (99999999999) that does not exist",
      "answer": "The app id in your call does not exist on this network (never created, deleted, or an id from a different network).",
      "cause": "Two captures returned this exact message: a NoOp call and an OptIn call to application 99999999999, which does not exist. The wording is odd (it mentions ClearState) because a ClearState call is the only call allowed against a missing app. In practice it almost always means a wrong app id or a mainnet id used on TestNet.",
      "fix": [
        "Check the id on the network you submit to: GET /v2/applications/{id} returns 404 if it does not exist.",
        "Confirm your client points at the same network (mainnet vs TestNet) as the app you deployed."
      ],
      "capturedOn": "2026-12-03",
      "network": "testnet"
    }
  ]
}