troubleshoot-errors

Map Algorand error messages to structured fixes for contracts and transactions.

2|Updated Jul 29, 2025
One-click install
npx skills add https://github.com/algorandfoundation/xgov-committees --skill troubleshoot-errors-algorandfoundation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: troubleshoot-errors
Source: https://github.com/algorandfoundation/xgov-committees/tree/main/.claude/skills/troubleshoot-errors
Command: npx skills add https://github.com/algorandfoundation/xgov-committees --skill troubleshoot-errors-algorandfoundation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Diagnose and resolve common Algorand development errors including smart contract failures, transaction rejections, and SDK exceptions. Use when encountering smart contract logic errors or assertion failures, transaction rejections or confirmation timeouts, SDK exceptions (AlgodHTTPError, LogicError), account-related errors (insufficient balance, not opted in), or ABI encoding/decoding errors. Strong triggers include "logic eval error", "assert failed", "overspend", "transaction rejected", "pc=X" in error messages, "opcode budget exceeded", "account not found", "asset not found".

Core Features & Use Cases

| Category | Common Causes | Reference | |----------|---------------|-----------| | Contract Errors | Assert failures, opcode budget, invalid operations | contract-errors.md | | Transaction Errors | Overspend, invalid params, group issues | transaction-errors.md |

Quick Diagnosis Flow

  1. Identify the error type from the message
  2. Check the error code if present (e.g., pc=123)
  3. Find the root cause using the reference docs
  4. Apply the fix from the common solutions

Common Error Patterns

Logic Eval Error (Contract Failure)

logic eval error: assert failed pc=123

Cause: An assert statement in the smart contract evaluated to false.

Debug steps:

  1. The pc=123 indicates the program counter where failure occurred
  2. Use source maps to find the exact line in your code
  3. Check the assertion condition and input values

Transaction Rejected

TransactionPool.Remember: transaction TXID: overspend

Cause: Sender account has insufficient balance for amount + fee.

Fix: Fund the sender account or reduce the transaction amount.

Opcode Budget Exceeded

logic eval error: dynamic cost budget exceeded

Cause: Contract exceeded the 700 opcode budget per app call.

Fix:

  • Add more app calls to the group for additional budget (pooled)
  • Optimize contract logic to reduce operations
  • Split complex operations across multiple calls

Asset Not Opted In

asset ASSET_ID missing from ACCOUNT_ADDRESS

Cause: The receiving account hasn't opted into the asset.

Fix: Have the receiver opt in before transferring:

algorand.send.asset_opt_in(AssetOptInParams(
    sender=receiver_address,
    asset_id=asset_id,
))

How to Proceed

  1. Find your error in the category references below
  2. Understand the cause from the explanation
  3. Apply the solution from the code examples

References

Quick Start

Input your Algorand error and follow the mapped fixes to resolve it.

Frequently Asked Questions about troubleshoot-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix an Algorand logic eval error like assert failed pc=123?

An Algorand logic eval error with assert failed means a contract assertion evaluated to false. Use the pc=123 program counter value and source maps to locate the exact failing line in your smart contract code.

Why does my Algorand transaction fail with an overspend error?

An overspend error in Algorand transactions means the sender account has insufficient balance to cover the transaction amount plus fees. Fund the sender account or reduce the transaction amount to resolve it.

What causes opcode budget exceeded errors in Algorand smart contracts?

Opcode budget exceeded errors happen when an Algorand contract surpasses the 700 opcode limit per app call. Optimize your contract logic, split operations across multiple calls, or pool app calls in a group for additional budget.

How do I resolve the Algorand asset missing from account error?

The Algorand asset missing error occurs when the receiving account has not opted in to the asset. Submit an asset opt-in transaction for the receiver before attempting the asset transfer.

Can I use this to diagnose Algorand SDK exceptions in testnet environments?

Yes, you can diagnose Algorand SDK exceptions like AlgodHTTPError and LogicError across local testing environments, testnets, and production nodes by mapping error messages to structured guidance and fixes.

What is the best way to debug Algorand ABI encoding and decoding errors?

To debug Algorand ABI encoding and decoding errors, input the exact error message to classify the failure type and apply corrective actions mapped from the contract and transaction reference guides.