{
  "about": "Algorand TEAL compiler errors and algod / indexer HTTP errors, reproduced against public TestNet endpoints.",
  "capturedOn": "2026-12-03",
  "network": "testnet",
  "errors": [
    {
      "slug": "teal-unknown-opcode",
      "kind": "teal",
      "question": "TEAL compile error: \"unknown opcode\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 2: unknown opcode: foo",
      "answer": "The assembler does not know the word you used where an opcode belongs. Usually a typo, or an opcode that does not exist.",
      "cause": "Captured with a program whose second line was foo. The message gives the line number (2) and prints the word it rejected.",
      "fix": [
        "Compare the word on the reported line with the opcode list for your TEAL version; check spelling and underscores (app_global_get).",
        "Labels end with a colon; a label name without the colon is read as an opcode."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-expects-immediate-argument",
      "kind": "teal",
      "question": "TEAL compile error: \"int expects 1 immediate argument\"",
      "httpStatus": 400,
      "exactMessage": "2:3: int expects 1 immediate argument\n3: return expects 1 stack arguments but stack height is 0",
      "answer": "The opcode needs a value written after it on the same line, and it was missing.",
      "cause": "Captured with a bare int line. The compiler reported two lines: the missing immediate (2:3, line:column) and a follow-on return expects 1 stack arguments but stack height is 0, which is a consequence, not a second mistake.",
      "fix": [
        "Write the value: int 1, byte \"x\".",
        "When you see several errors, fix the first one and recompile; later ones are often knock-on effects."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-reference-to-undefined-label",
      "kind": "teal",
      "question": "TEAL compile error: \"reference to undefined label\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 2:2: reference to undefined label \"nowhere\"",
      "answer": "A branch (b, bz, bnz, callsub) points to a label that is not defined anywhere in the program.",
      "cause": "Captured with b nowhere and no nowhere: line. The message names the label and gives line and column (2:2).",
      "fix": [
        "Define the label on its own line with a trailing colon, or correct the spelling at the branch.",
        "Label names are case sensitive."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-duplicate-label",
      "kind": "teal",
      "question": "TEAL compile error: \"duplicate label\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 3: duplicate label \"loop\"",
      "answer": "The same label name is defined more than once.",
      "cause": "Captured with loop: written twice. The message reports the line of the second definition and the name.",
      "fix": [
        "Rename one of them; label names must be unique in the program."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-unsupported-version",
      "kind": "teal",
      "question": "TEAL compile error: \"unsupported version\"",
      "httpStatus": 400,
      "exactMessage": "1:16: unsupported version: 99\n3: return opcode was introduced in v2",
      "answer": "The #pragma version number is higher than the node you compiled on supports.",
      "cause": "Captured with #pragma version 99 on a TestNet node. The compiler reported 1:16: unsupported version: 99, then also return opcode was introduced in v2, because it fell back to an old version to keep checking the rest.",
      "fix": [
        "Use a version the target network supports; check the node's supported versions in the Algorand developer docs.",
        "Ignore the follow-on \"introduced in\" lines until the version is fixed."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-wanted-type-uint64-got-byte",
      "kind": "teal",
      "question": "TEAL compile error: \"+ arg 0 wanted type uint64 got [1]byte\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 4: + arg 0 wanted type uint64 got [1]byte",
      "answer": "An arithmetic opcode got a byte string where it needs an integer. The compiler type-checks the stack.",
      "cause": "Captured with byte \"a\", int 1, +. The message reports + arg 0 wanted type uint64 got [1]byte: argument 0 is the deeper stack item, which is the byte string. Strings must be converted (for example btoi) before arithmetic.",
      "fix": [
        "Convert bytes to an integer with btoi (max 8 bytes) or use byte math opcodes (b+) for bigger numbers.",
        "Check which value you pushed first: \"arg 0\" is the one pushed earliest."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-opcode-introduced-in-version",
      "kind": "teal",
      "question": "TEAL compile error: \"box_get opcode was introduced in v8\"",
      "httpStatus": 400,
      "exactMessage": "3: box_get opcode was introduced in v8\n5: pop expects 1 stack arguments but stack height is 0",
      "answer": "You used an opcode that did not exist yet in the program's declared TEAL version. Raise the #pragma version.",
      "cause": "Captured with #pragma version 5 and box_get. The message states the version that introduced the opcode (v8). A second line (pop expects 1 stack arguments but stack height is 0) appears because the compiler did not count the unavailable opcode's results.",
      "fix": [
        "Set #pragma version to at least the version in the message.",
        "If you have no pragma line at all, see the entry for programs without a pragma: the default is version 1."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-no-pragma-defaults-to-version-1",
      "kind": "teal",
      "question": "TEAL program without #pragma version fails with \"opcode was introduced in v8\"",
      "httpStatus": 400,
      "exactMessage": "2: box_get opcode was introduced in v8\n3: return opcode was introduced in v2",
      "answer": "A program with no #pragma version line is compiled as version 1, so any newer opcode is rejected.",
      "cause": "Captured with int 1, box_get, return and no pragma. Both box_get (v8) and return (v2) were reported as \"introduced in\" newer versions, which is what a version-1 compile looks like.",
      "fix": [
        "Always put #pragma version N on the first line."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-expects-stack-arguments-but-stack-height-is-0",
      "kind": "teal",
      "question": "TEAL compile error: \"pop expects 1 stack arguments but stack height is 0\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 2: pop expects 1 stack arguments but stack height is 0",
      "answer": "An opcode needs values on the stack and the compiler can show the stack is empty at that point.",
      "cause": "Captured with pop as the first instruction. The error is reported at compile time, not at run time, when the stack depth is statically known.",
      "fix": [
        "Push the operands before the opcode, or remove the extra pop.",
        "Count what the previous opcodes leave on the stack: each opcode documents its stack inputs and outputs."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-unable-to-parse-as-integer",
      "kind": "teal",
      "question": "TEAL compile error: \"unable to parse ... as integer\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 2:4: unable to parse \"18446744073709551616\" as integer",
      "answer": "The integer literal does not fit a 64-bit unsigned integer (maximum 18446744073709551615).",
      "cause": "Captured with int 18446744073709551616, which is 2^64, one more than the maximum. The message prints the literal and its line and column.",
      "fix": [
        "Use byte arrays with byte math (b+, b*) for numbers larger than 2^64-1.",
        "Check for stray characters (a trailing comma, a unit like \"1_000\")."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-odd-length-hex-string",
      "kind": "teal",
      "question": "TEAL compile error: \"byte encoding/hex: odd length hex string\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 2:5: byte encoding/hex: odd length hex string",
      "answer": "A byte 0x... literal has an odd number of hex digits. Each byte needs two.",
      "cause": "Captured with byte 0xABC (three digits). The message includes line and column.",
      "fix": [
        "Pad to an even number of digits: 0x0ABC."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "teal-cannot-assemble-empty-program-text",
      "kind": "teal",
      "question": "TEAL compile error: \"Cannot assemble empty program text\"",
      "httpStatus": 400,
      "exactMessage": "1 error: 0: Cannot assemble empty program text",
      "answer": "The request body was empty. The compile endpoint received no program text.",
      "cause": "Captured by posting an empty body to /v2/teal/compile. The message says line 0 because no line was read.",
      "fix": [
        "Send the TEAL source as the raw request body with Content-Type: text/plain.",
        "Check that your file read or template step actually produced text."
      ],
      "source": "POST /v2/teal/compile, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-invalid-format-for-parameter-address",
      "kind": "algod",
      "question": "algod 400: \"Invalid format for parameter address ... decoded bad addr\"",
      "httpStatus": 400,
      "exactMessage": "Invalid format for parameter address: error unmarshaling 'NOTANADDRESS' text as *basics.Address: decoded bad addr: NOTANADDRESS",
      "answer": "The account path parameter is not a valid Algorand address (wrong length or checksum).",
      "cause": "Captured with GET /v2/accounts/NOTANADDRESS. The status was 400 and the message repeats the value you sent.",
      "fix": [
        "Use the full 58-character address; check for truncation, whitespace or a lowercase copy."
      ],
      "source": "GET /v2/accounts/NOTANADDRESS, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-unfunded-account-returns-200",
      "kind": "algod",
      "question": "algod returns 200 with amount 0 for an address that does not exist",
      "httpStatus": 200,
      "exactMessage": "(HTTP 200) {\"address\":\"LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI\",\"amount\":0,\"amount-without-pending-rewards\":0,\"apps-local-state\":[],\"apps-total-schema\": ...",
      "answer": "algod does not return a \"not found\" for a never-funded address. It returns HTTP 200 with an account whose balance and counters are all zero.",
      "cause": "Captured with a valid, never-funded address on TestNet: status 200, \"amount\":0, empty lists. The indexer behaves differently for the same address: see the indexer 404 entry. A 200 here does not prove the account exists on chain.",
      "fix": [
        "Treat amount: 0 with min-balance 100000 and no created assets as \"empty or new account\", not as an error.",
        "If you must tell \"never funded\" from \"drained\", ask the indexer: it answers 404 for an address it has never seen."
      ],
      "source": "GET /v2/accounts/…, HTTP 200, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-asset-does-not-exist",
      "kind": "algod",
      "question": "algod 404: \"asset does not exist\"",
      "httpStatus": 404,
      "exactMessage": "asset does not exist",
      "answer": "No asset with that id exists on the network you queried.",
      "cause": "Captured with GET /v2/assets/99999999999. Remember that TestNet and mainnet have different asset ids (USDC is 31566704 on mainnet and 10458941 on TestNet).",
      "fix": [
        "Check that the id belongs to the network of the node you are calling."
      ],
      "source": "GET /v2/assets//…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-application-does-not-exist",
      "kind": "algod",
      "question": "algod 404: \"application does not exist\"",
      "httpStatus": 404,
      "exactMessage": "application does not exist",
      "answer": "No application with that id exists on this network.",
      "cause": "Captured with GET /v2/applications/99999999999.",
      "fix": [
        "Verify the app id and the network. A deleted application also returns not found."
      ],
      "source": "GET /v2/applications//…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-failed-to-retrieve-information-from-the-ledger",
      "kind": "algod",
      "question": "algod 404: \"failed to retrieve information from the ledger\"",
      "httpStatus": 404,
      "exactMessage": "failed to retrieve information from the ledger",
      "answer": "You asked for a block that the node does not have, such as a round in the future.",
      "cause": "Captured with GET /v2/blocks/999999999 on TestNet. The message does not say the round is in the future; that is the situation that produced it here. A pruned (non-archival) node may give the same message for very old rounds, which was not tested.",
      "fix": [
        "Compare with the current round from /v2/status.",
        "For old history use an archival node or the indexer."
      ],
      "source": "GET /v2/blocks/999999999, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-could-not-find-the-transaction-in-the-transaction-pool",
      "kind": "algod",
      "question": "algod 404: \"could not find the transaction in the transaction pool or in the last 1000 confirmed rounds\"",
      "httpStatus": 404,
      "exactMessage": "could not find the transaction in the transaction pool or in the last 1000 confirmed rounds",
      "answer": "The pending-transaction lookup only covers the pool and the last 1000 rounds. An unknown or older transaction id gets this 404.",
      "cause": "Captured with a made-up 52-character id. The message itself states the 1000-round window.",
      "fix": [
        "For older transactions use the indexer (/v2/transactions/{txid}).",
        "If you just submitted it, confirm the txid and the network."
      ],
      "source": "GET /v2/transactions/pending/…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-box-not-found",
      "kind": "algod",
      "question": "algod 404: \"box not found\"",
      "httpStatus": 404,
      "exactMessage": "box not found",
      "answer": "The application has no box with that name.",
      "cause": "Captured with a name that was never written, passed as ?name=b64:....",
      "fix": [
        "Use the exact box name bytes (the b64: prefix means base64 of the raw bytes), and check the app id.",
        "Boxes must be created by the app before they can be read."
      ],
      "source": "GET /v2/applications/778835193/box?name=b64:bm9wZQ==, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-empty-txgroup",
      "kind": "algod",
      "question": "algod 400: \"empty txgroup\"",
      "httpStatus": 400,
      "exactMessage": "empty txgroup",
      "answer": "You posted to /v2/transactions with no body.",
      "cause": "Captured with an empty POST body.",
      "fix": [
        "Send the signed transaction bytes (msgpack) as the body with Content-Type: application/x-binary.",
        "Check that signing returned bytes and that your HTTP client actually attaches them."
      ],
      "source": "POST /v2/transactions, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-msgp-attempted-to-decode-type-int-with-method-for-map",
      "kind": "algod",
      "question": "algod 400: msgp: attempted to decode type \"int\" with method for \"map\"",
      "httpStatus": 400,
      "exactMessage": "msgp: attempted to decode type \"int\" with method for \"map\"",
      "answer": "The body of the submit request is not a signed transaction in msgpack. A JSON body triggers this decoder error.",
      "cause": "Captured by posting {\"a\":1} as JSON to /v2/transactions. The first byte of the JSON text was read as a msgpack integer where a map was expected.",
      "fix": [
        "Post the raw bytes from signTxn(), not JSON, not base64 text and not hex.",
        "If you have base64, decode it to bytes before sending."
      ],
      "source": "POST /v2/transactions, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "algod-not-found-wrong-path",
      "kind": "algod",
      "question": "algod 404 \"Not Found\" on a request",
      "httpStatus": 404,
      "exactMessage": "Not Found",
      "answer": "The path does not exist on the node. The body is just \"Not Found\", with no hint about which part is wrong.",
      "cause": "Captured with GET /v2/nothing.",
      "fix": [
        "Check the path against the algod REST API list, including a trailing slash and the /v2 prefix.",
        "Hosted node providers sometimes expect the token or base path in a different place."
      ],
      "source": "GET /v2/nothing, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-no-accounts-found-for-address",
      "kind": "indexer",
      "question": "indexer 404: \"no accounts found for address\"",
      "httpStatus": 404,
      "exactMessage": "no accounts found for address: LP6YOM6CQ2X65SJRRMLWVITLYTGGGNERYIOXJRTDTZP2O5PQWIL6KERJVI",
      "answer": "The indexer has never seen this address in a transaction. A new, never-funded address gets a 404 here, where algod would return 200 with zeros.",
      "cause": "Captured with a valid address that was never funded. The message repeats the address.",
      "fix": [
        "Treat 404 as \"no on-chain activity yet\" for this address.",
        "If you just funded it, the indexer can lag behind algod by a few rounds; retry shortly."
      ],
      "source": "GET /v2/accounts/…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-unable-to-parse-address",
      "kind": "indexer",
      "question": "indexer 400: \"unable to parse address: decoded address is the wrong length\"",
      "httpStatus": 400,
      "exactMessage": "unable to parse address: decoded address is the wrong length, should be 36 bytes",
      "answer": "The address in the path could not be decoded to the 36 bytes an Algorand address has.",
      "cause": "Captured with NOTANADDRESS. The message says it must decode to 36 bytes (32-byte key plus a 4-byte checksum).",
      "fix": [
        "Pass the full 58-character address, uppercase, with no whitespace."
      ],
      "source": "GET /v2/accounts/NOTANADDRESS, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-no-transaction-found-for-transaction-id",
      "kind": "indexer",
      "question": "indexer 404: \"no transaction found for transaction id\"",
      "httpStatus": 404,
      "exactMessage": "no transaction found for transaction id: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "answer": "The indexer has no transaction with that id.",
      "cause": "Captured with a well-formed but nonexistent id. The message repeats it. Right after submitting, a real transaction can also give this until the indexer catches up (indexer lag, not tested here).",
      "fix": [
        "Check the txid and the network, and retry after a couple of rounds if the transaction is brand new."
      ],
      "source": "GET /v2/transactions/…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-unable-to-parse-base32-digest-data-txid",
      "kind": "indexer",
      "question": "indexer 400: \"unable to parse base32 digest data 'txid'\"",
      "httpStatus": 400,
      "exactMessage": "invalid input: unable to parse base32 digest data 'txid': illegal base32 data at input byte 0",
      "answer": "The transaction id is not valid base32. A real id is 52 uppercase characters.",
      "cause": "Captured with the id not-a-txid. The error names the byte position of the first illegal character (0 here, because of the lowercase letter).",
      "fix": [
        "Use the id exactly as returned by the SDK, uppercase, 52 characters."
      ],
      "source": "GET /v2/transactions/not-a-txid, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-invalid-format-for-parameter-limit",
      "kind": "indexer",
      "question": "indexer 400: \"Invalid format for parameter limit\"",
      "httpStatus": 400,
      "exactMessage": "Invalid format for parameter limit: error binding string parameter: strconv.ParseUint: parsing \"abc\": invalid syntax",
      "answer": "A query parameter that must be a number was not.",
      "cause": "Captured with ?limit=abc. The message includes the underlying Go parse error strconv.ParseUint: parsing \"abc\": invalid syntax.",
      "fix": [
        "Send plain digits for limit and other numeric filters (min-round, asset-id)."
      ],
      "source": "GET /v2/transactions?limit=abc, HTTP 400, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-no-assets-found-for-asset-id",
      "kind": "indexer",
      "question": "indexer 404: \"no assets found for asset-id\"",
      "httpStatus": 404,
      "exactMessage": "no assets found for asset-id: 99999999999",
      "answer": "The indexer has no asset with that id on this network.",
      "cause": "Captured with 99999999999. The wording differs from algod's \"asset does not exist\" for the same situation.",
      "fix": [
        "Check the id and the network; a code that matches on the exact message text must handle both wordings."
      ],
      "source": "GET /v2/assets//…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-no-application-found-for-application-id",
      "kind": "indexer",
      "question": "indexer 404: \"no application found for application-id\"",
      "httpStatus": 404,
      "exactMessage": "no application found for application-id: 99999999999",
      "answer": "The indexer has no application with that id.",
      "cause": "Captured with 99999999999. algod words the same case \"application does not exist\".",
      "fix": [
        "Check the id and network. By default the indexer hides deleted applications; the include-all parameter shows them (documented behaviour, not tested here)."
      ],
      "source": "GET /v2/applications//…, HTTP 404, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-decodetxnrownext-decode-err-illegal-base64",
      "kind": "indexer",
      "question": "indexer 500: \"DecodeTxnRowNext() decode err: illegal base64 data\"",
      "httpStatus": 500,
      "exactMessage": "error while searching for transaction: DecodeTxnRowNext() decode err: illegal base64 data at input byte 4",
      "answer": "The next pagination token you sent is not one the indexer issued. Bad client input comes back as HTTP 500, which looks like a server fault but is not.",
      "cause": "Captured with ?next=garbage: status 500 and the message above. Only tokens from the next-token field of a previous response are valid.",
      "fix": [
        "Pass back the next-token value exactly as received, unmodified, with the same filters as the original query.",
        "Do not retry a 500 of this kind: it will fail every time."
      ],
      "source": "GET /v2/transactions?next=garbage, HTTP 500, captured against a public TestNet node on 2026-12-03"
    },
    {
      "slug": "indexer-invalid-format-for-parameter-after-time",
      "kind": "indexer",
      "question": "indexer 400: \"Invalid format for parameter after-time\"",
      "httpStatus": 400,
      "exactMessage": "Invalid format for parameter after-time: error parsing 'yesterday' as RFC3339 or 2006-01-02 time: parsing time \"yesterday\" as \"2006-01-02\": cannot parse \"yesterday\" as \"2006\"",
      "answer": "The time filter must be RFC 3339 or a plain date, not a word like \"yesterday\".",
      "cause": "Captured with ?after-time=yesterday. The message says it accepts \"RFC3339 or 2006-01-02\" formats.",
      "fix": [
        "Use 2026-12-03 or 2026-12-03T00:00:00Z."
      ],
      "source": "GET /v2/transactions?after-time=yesterday, HTTP 400, captured against a public TestNet node on 2026-12-03"
    }
  ]
}