Skip to content

Recovery Scenarios

Actionable recovery paths for common failure modes. For the full error reference, see errors.md. For step-by-step troubleshooting, see troubleshooting.md.


Interrupted deploy

SymptomWhat happenedRecovery
Deploy stopped mid-graphEarlier contracts in dependsOn order may already be in caatinga.artifacts.jsonRe-run ctg deploy --network <network> --source <identity> — already-deployed contracts are skipped unless --force
CLI killed during artifact writeAtomic write (write temp → rename) prevents truncated JSONIf file is corrupt, restore from Git or run ctg migrate artifacts after fixing JSON
Transient testnet errorRetry logs appear: Deploy hit a transient testnet errorWait for automatic retries or re-run deploy

Doctor: ctg doctor --network testnet lists partial deploy coverage (CAATINGA_DOCTOR_PARTIAL_DEPLOY advisory).


Invalid artifacts

CodeRecovery command
CAATINGA_ARTIFACT_NOT_FOUNDctg init or copy caatinga.artifacts.json from a teammate
CAATINGA_ARTIFACT_INVALIDFix JSON manually, or delete and redeploy: ctg deploy --network <network> --source <identity>
Unsupported schema versionUpgrade CLI: npm install -g @caatinga/cli@latest

Migration: ctg migrate artifacts upgrades schema v1 → v2 on disk.


RPC offline

SymptomCodeRecovery
Browser invoke fails at simulate/prepareCAATINGA_XDR_PREPARE_FAILEDVerify rpcUrl in config and .env; test with curl <rpcUrl>
Submit rejectedCAATINGA_XDR_SUBMIT_FAILEDCheck network passphrase matches wallet network
CLI read/invoke failsCAATINGA_INVOKE_FAILEDConfirm Soroban RPC endpoint is reachable

Stellar CLI absent or wrong version

CodeRecovery
CAATINGA_STELLAR_CLI_NOT_FOUNDInstall from Stellar setup guide
CAATINGA_UNSUPPORTED_CLI_VERSIONInstall Stellar CLI ≥ 23.0.0 (27.0.0 recommended)
CAATINGA_RUST_TARGET_NOT_FOUNDrustup target add wasm32v1-none

Preflight: ctg doctor


Outdated bindings

CodeRecovery
CAATINGA_PLACEHOLDER_BINDINGctg generate <contract> --network <network> then restart dev server
CAATINGA_BINDING_CLIENT_NOT_FOUNDSame as above
CAATINGA_BINDING_METHOD_NOT_FOUNDRegenerate bindings after contract interface change

Doctor reports binding freshness per contract.


Multi-contract partial state

When token deployed but vault failed:

bash
ctg deploy vault --network testnet --source alice
# or deploy full graph:
ctg deploy --network testnet --source alice

Placeholders like ${contracts.token.contractId} resolve from artifacts on retry.