{
  "about": "algosdk (JavaScript) client-side errors reproduced locally, plus one node measurement.",
  "sdkVersion": "3.9.0",
  "capturedOn": "2026-12-03",
  "errors": [
    {
      "slug": "failed-to-decode-mnemonic",
      "question": "algosdk \"failed to decode mnemonic\"",
      "exactMessage": "failed to decode mnemonic",
      "answer": "The 25-word recovery phrase could not be turned into a key. The message is the same whether a word is wrong, the checksum is wrong or the word count is wrong, so you have to check which.",
      "cause": "Three different faults were tried and all gave the identical message \"failed to decode mnemonic\": a word that is not in the list (\"notaword\"), a valid word in the checksum position that makes the checksum wrong, and 24 words instead of 25.",
      "fix": [
        "Count the words: an Algorand account mnemonic has exactly 25 words separated by single spaces (no line breaks, no numbering).",
        "Check each word against the BIP-39 English word list; one typo is the usual cause.",
        "If all 25 words are valid, the last word (the checksum) is wrong: a word was swapped or reordered.",
        "Strip quotes and trailing whitespace if you read it from an environment variable."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "address-seems-to-be-malformed",
      "question": "algosdk \"address seems to be malformed: expected length 58\"",
      "exactMessage": "address seems to be malformed: expected length 58, got 12: NOTANADDRESS",
      "answer": "The string you passed as an address is not 58 characters, so it is not an Algorand address.",
      "cause": "The same message appeared for three different calls: a payment receiver \"NOTANADDRESS\" (got 12), decodeAddress(\"ABC\") (got 3) and an ABI address encode of \"nope\" (got 4). The message ends with the string you passed.",
      "fix": [
        "An Algorand address is 58 uppercase characters (base32). Print the value and its length before building the transaction.",
        "A common cause is passing an account object instead of its address, or a variable that is empty or truncated."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "invalid-base32-characters",
      "question": "algosdk \"Invalid base32 characters\" for an address",
      "exactMessage": "Invalid base32 characters",
      "answer": "The address was passed in lowercase. Algorand addresses are uppercase base32.",
      "cause": "The capture lowercased a valid 58-character address and got \"Invalid base32 characters\". The length was right; the case was not.",
      "fix": [
        "Use the address exactly as returned by the SDK (account.addr.toString()), without lowercasing.",
        "If it comes from user input, call .trim().toUpperCase() first."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "address-must-not-be-null-or-undefined",
      "question": "algosdk \"Address must not be null or undefined\"",
      "exactMessage": "Address must not be null or undefined",
      "answer": "A required address (sender, receiver, rekeyTo and so on) was undefined or null when the transaction was built.",
      "cause": "The capture passed receiver: undefined. This usually means a config value or environment variable was not set, or a property name was misspelled.",
      "fix": [
        "Log each address argument just before the call and find the one that is undefined.",
        "Fail early at startup if a required address env var is empty."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "value-is-not-a-uint64",
      "question": "algosdk \"Value X is not a uint64\"",
      "exactMessage": "Value -1 is not a uint64",
      "answer": "A number that must be an unsigned 64-bit integer (an amount, asset id, round or fee) was negative or larger than 18,446,744,073,709,551,615.",
      "cause": "Three captures gave this message: amount -1, amount 2^64 (18446744073709551616) and asset id -5. The message prints the offending value.",
      "fix": [
        "Check the sign: a negative result usually comes from subtracting a fee from a smaller balance.",
        "Use BigInt for large values; amounts are in microAlgos (1 ALGO = 1,000,000) or an asset's base units."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "value-is-not-a-safe-integer",
      "question": "algosdk \"Value 0.5 is not a safe integer\"",
      "exactMessage": "Value 0.5 is not a safe integer",
      "answer": "You passed a fractional or imprecise number as an amount. Amounts are whole numbers of base units.",
      "cause": "The capture passed an amount of 0.5. Algorand amounts are integers: 1 ALGO is 1,000,000 microAlgos and USDC has 6 decimals, so 0.5 USDC is 500000.",
      "fix": [
        "Convert dollars to base units with integer math: BigInt(Math.round(dollars * 1e6)) for 6-decimal assets.",
        "For large values prefer BigInt over number to avoid precision loss."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "not-a-uint8array",
      "question": "algosdk \"Not a Uint8Array\" when setting a note",
      "exactMessage": "Not a Uint8Array: hello",
      "answer": "The transaction note must be bytes (a Uint8Array), not a string.",
      "cause": "The capture passed note: \"hello\" and got \"Not a Uint8Array: hello\". The message prints the value you passed.",
      "fix": [
        "Encode the string: new TextEncoder().encode(\"hello\").",
        "The same applies to appArgs entries."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "cannot-read-firstvalid-of-undefined",
      "question": "algosdk TypeError: \"Cannot read properties of undefined (reading 'firstValid')\"",
      "exactMessage": "Cannot read properties of undefined (reading 'firstValid')",
      "answer": "You called a transaction builder without suggestedParams, so the SDK tried to read firstValid from undefined.",
      "cause": "The capture omitted suggestedParams and the SDK threw a plain TypeError, not a descriptive algosdk message.",
      "fix": [
        "Fetch params from the node and pass them: const suggestedParams = await algod.getTransactionParams().do();.",
        "Fetch them right before building: they carry the validity window of the transaction."
      ],
      "source": "TypeError, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "bad-secret-key-size",
      "question": "algosdk \"bad secret key size\" when signing",
      "exactMessage": "bad secret key size",
      "answer": "signTxn was given something that is not a full 64-byte secret key.",
      "cause": "The capture signed with a 10-byte array and got \"bad secret key size\". Accounts from generateAccount() and mnemonicToSecretKey() expose a 64-byte sk.",
      "fix": [
        "Pass account.sk to txn.signTxn(), not a seed, a hex string or a public key.",
        "If you stored the key as hex or base64, decode it back to the full 64 bytes first."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "max-group-size-is-16",
      "question": "algosdk \"transactions grouped together but max group size is 16\"",
      "exactMessage": "17 transactions grouped together but max group size is 16",
      "answer": "An atomic group can hold at most 16 transactions.",
      "cause": "The capture grouped 17 transactions and got \"17 transactions grouped together but max group size is 16\". The number in the message is how many you tried.",
      "fix": [
        "Split the work into several groups of 16 or fewer.",
        "Inner transactions made by apps do not count toward this top-level limit."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "abi-value-too-big-for-uint",
      "question": "algosdk ABI \"is not a non-negative int or too big to fit in size uint8\"",
      "exactMessage": "256 is not a non-negative int or too big to fit in size uint8",
      "answer": "The value does not fit the ABI integer type you encoded it as.",
      "cause": "The capture encoded 256 as uint8 (maximum 255) and got \"256 is not a non-negative int or too big to fit in size uint8\". It also fails for negative numbers.",
      "fix": [
        "Use a wider type (uint64) in the method signature, or validate the value before encoding.",
        "Check the ABI type of the argument in the contract's method signature."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "unsupported-uint-type-bitsize",
      "question": "algosdk ABI \"unsupported uint type bitSize\"",
      "exactMessage": "unsupported uint type bitSize: 9",
      "answer": "The ABI type string names an integer size that does not exist. ARC-4 integer sizes are multiples of 8.",
      "cause": "The capture parsed \"uint9\" and got \"unsupported uint type bitSize: 9\". The ARC-4 spec defines uint<N> for N a multiple of 8 from 8 to 512.",
      "fix": [
        "Use uint8, uint16, uint32, uint64 and so on, and check for typos in the method signature."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "invalid-method-signature",
      "question": "algosdk ABIMethod \"Invalid method signature\"",
      "exactMessage": "Invalid method signature: add(uint64,uint64",
      "answer": "The method signature string is malformed, for example a missing closing parenthesis.",
      "cause": "The capture parsed \"add(uint64,uint64\" (no closing parenthesis) and got \"Invalid method signature: add(uint64,uint64\". The message repeats the string you passed.",
      "fix": [
        "Write the full signature: name(argType,argType)returnType, for example add(uint64,uint64)uint64."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "incorrect-number-of-method-arguments",
      "question": "algosdk \"Incorrect number of method arguments. Expected 2, got 1\"",
      "exactMessage": "Incorrect number of method arguments. Expected 2, got 1",
      "answer": "addMethodCall received a different number of methodArgs than the ABI method declares.",
      "cause": "The capture called a two-argument method with one argument. The message states the expected and the received counts. Note that arguments the SDK fills in for you (such as a transaction argument) still count in the method's argument list.",
      "fix": [
        "Pass one entry in methodArgs per argument in the method signature, in order."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "cannot-build-a-group-with-0-transactions",
      "question": "algosdk \"Cannot build a group with 0 transactions\"",
      "exactMessage": "Cannot build a group with 0 transactions",
      "answer": "You asked an AtomicTransactionComposer to build or execute with nothing added.",
      "cause": "The capture called buildGroup() on an empty composer.",
      "fix": [
        "Add at least one transaction or method call before buildGroup() or execute(), and check conditional code paths that skip the add."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "composer-status-is-not-building",
      "question": "algosdk \"Cannot add transactions when composer status is not BUILDING\"",
      "exactMessage": "Cannot add transactions when composer status is not BUILDING",
      "answer": "You added to an AtomicTransactionComposer after it had already built its group.",
      "cause": "The capture called buildGroup() and then addTransaction(). Once built, the group is fixed because the group id depends on every transaction in it.",
      "fix": [
        "Add everything first, then call buildGroup() or execute() once.",
        "To send more, create a new AtomicTransactionComposer."
      ],
      "source": "Error, captured locally with algosdk 3.9.0 on 2026-12-03"
    },
    {
      "slug": "note-size-1024-bytes",
      "question": "Algorand transaction note longer than 1024 bytes: what error do you get?",
      "exactMessage": "TransactionPool.Remember: txgroup with 1mA fees is less than 1.001mA (usage=1.000100 * base=1mA)",
      "answer": "The SDK builds a transaction with a 1025-byte note without complaint. The node then rejects it with a fee error, not a \"note too long\" error.",
      "cause": "Measured on TestNet on 2026-12-03 with the default 1000 microAlgo fee: a payment with a 1024-byte note was accepted; the same payment with a 1025-byte note was rejected with the message above. On the SDK side, building the 1025-byte transaction raised no error at all. The node's wording talks about fees because the transaction became larger than the size the base fee covers.",
      "fix": [
        "Keep notes at or under 1024 bytes.",
        "Put long data in a box, an app, or off-chain with a hash in the note.",
        "If you see \"fees is less than 1.001mA\" with a normal-looking payment, check the size of the note first."
      ],
      "source": "measured against a TestNet node on 2026-12-03; the SDK itself raised no error"
    }
  ]
}