Short answer: The contract asked for an account at an index the transaction did not provide.
Pattern:
logic eval error: invalid Accounts index <n>. Details: app=<APP_ID>, pc=<PC>, ...
Captured verbatim from a testnet node on 2026-12-03:
logic eval error: invalid Accounts index 5. Details: app=778835193, pc=139, opcodes=intc_0 // 1; return; label6:; txna Accounts 5
The test app executed txna Accounts 5 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.
accounts list and use the matching index (1 for the first foreign account).txn NumAccounts before indexing.makeApplicationNoOpTxnFromObject({ sender, appIndex, accounts: [otherAddress], suggestedParams }) // otherAddress is Accounts[1]
Method: this message was produced on purpose against a live testnet node (https://testnet-api.algonode.cloud) on 2026-12-03. Message wording can change between node versions. All errors: index · errors.json.