stacksdapp doctor. Use stacksdapp doctor --strict in CI to fail on warnings.
Contents
- Prerequisites
- Project not found
- Deploy failures
- Devnet issues
- Clarity version mismatch
- Bindings out of sync
- Check failed
- Frontend errors
- Tests and generate failed
- Init conflicts
- Git hook blocked commit
- Getting help
Prerequisites
Project not found (exit 2)
cdto a directory containingstacksdapp.tomlorcontracts/Clarinet.toml- Or:
stacksdapp --root /path/to/project <command> - For raw Clarinet repos: run
stacksdapp initfirst
Deploy failures (exit 8)
Testnet / mainnet
Devnet
Devnet issues
Boot stuck
- Ensure Docker is running
- Stop conflicting containers:
docker ps --filter name=devnet -q | xargs docker stop - Start the chain again:
stacksdapp dev - Do not run
clarinet devnet startalongsidestacksdapp dev
stacksdapp clean --force deletes generated bindings and local cache files. It does not stop Docker. When a devnet is running, clean restores that chain to the snapshot, leaves the process up, and waits until Stacks mines a new block. If the tip does not move, it restarts only the signer. Deploy after clean finishes. Then run stacksdapp generate.
Chain stops at the first PoX reward cycle
On Clarinet older than 3.26, stacks-node 4.0.1 stops mining at the first PoX reward-cycle boundary after the epoch 4.0 snapshot (around burn height 180).stacksdapp dev already points that devnet at stacks-node 4.0.5, stakes the devnet wallets, and mines a Bitcoin block if the chain goes quiet.
Clarinet 3.26 and newer run their own devnet. You do not pass extra flags.
If the tip still does not move, use testnet. Testnet and mainnet deploy are unaffected. See Local devnet.
Clarity version / epoch mismatch
- C5 requires
epoch = "3.4"(not"4.0") - C6 requires
epoch = "4.0" - Regenerate plans:
cd contracts && clarinet deployments generate --devnet
stacksdapp add name --clarity-version 5
Full mapping: Clarity versions
Bindings out of sync
frontend/src/generated/* manually. See Code generation.
Check failed (exit 6)
Runstacksdapp check and fix Clarinet checker errors in .clar files.
use of undeclared trait <sip-010-trait>
Explorer or deploy abort when impl-trait uses a short trait name instead of a full on-chain contract path.
Fix steps:
- Run
stacksdapp add NAME --template sip010(orsip009) instead of rewriting from blog snippets - Match
[[project.requirements]]inClarinet.tomlto the target network stacksdapp check→stacksdapp test→ redeploy
Frontend errors
Cannot convert [object Object] to a BigInt
Common when formatting SIP-010 balances or other uint read-only results.
Cause: Hook data from read-only calls uses cvToValue, which represents (ok uint) as { type: "uint", value: "1500000" } — not a native bigint.
Fix: Do not BigInt(hook.data) directly. Unwrap the cvToJSON shape first. Full helpers and examples: Frontend guide.
Failed to fetch on read-only calls
Browser could not reach the Stacks node — not a contract revert.
Checklist:
cat frontend/src/generated/deployments.json— contract entry existsgrep NEXT_PUBLIC_NETWORK frontend/.env.local— matches deploy network- After testnet deploy:
stacksdapp dev --network testnet(barestacksdapp devis the local chain, not the testnet UI) - Guard read-only
call()until wallet address is valid; showhook.error
Tests failed (exit 7) / Generate failed (exit 10)
Tests:- Validate
contracts/Clarinet.toml - Run
npm installincontracts/andfrontend/ stacksdapp clean --forcethenstacksdapp generate
Init conflicts
Merge duplicatesettings/, tests/, or deployments/ directories before rerunning stacksdapp init.
Git hook blocked commit
The pre-commit hook blocks likely seed phrases inTestnet.toml and Mainnet.toml. Unstage real mnemonics before committing.
Emergency bypass only: