Running rv test|invariant on a Clarinet project that pulls mainnet contracts via [[project.requirements]] aborts immediately with an unhandled rejection whose reason is the bare string "err", before any run.
Cause: extractProjectTraitImplementations (dist/traits.js) iterates every deployed contract and calls simnet.getContractAST(contractId). For requirement contracts (e.g. SM3VDXK3…sbtc-token, …sbtc-registry) clarinet-sdk's wasm getContractAST throws because their source AST isn't retained in the simnet, so the whole run dies.
Fix: wrap the getContractAST call in try/catch and return acc on failure — a contract with no introspectable AST can't implement a project-local trait. (1-line guard; patch attached.)
Repro: any project with an sBTC requirement; minimal: a contract that references 'SM3VDXK3…sbtc-token plus that requirement, then rv . test. Version: @stacks/rendezvous 1.0.0, @stacks/clarinet-sdk 3.19.0. For example: https://github.com/friedger/clarity-pox-5-pool/
Running rv test|invariant on a Clarinet project that pulls mainnet contracts via [[project.requirements]] aborts immediately with an unhandled rejection whose reason is the bare string "err", before any run.
Cause: extractProjectTraitImplementations (dist/traits.js) iterates every deployed contract and calls simnet.getContractAST(contractId). For requirement contracts (e.g. SM3VDXK3…sbtc-token, …sbtc-registry) clarinet-sdk's wasm getContractAST throws because their source AST isn't retained in the simnet, so the whole run dies.
Fix: wrap the getContractAST call in try/catch and return acc on failure — a contract with no introspectable AST can't implement a project-local trait. (1-line guard; patch attached.)
Repro: any project with an sBTC requirement; minimal: a contract that references 'SM3VDXK3…sbtc-token plus that requirement, then rv . test. Version: @stacks/rendezvous 1.0.0, @stacks/clarinet-sdk 3.19.0. For example: https://github.com/friedger/clarity-pox-5-pool/