hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
290 stars 129 forks source link

unable to trigger deployment error #1478

Closed OxMarco closed 3 days ago

OxMarco commented 1 week ago

clarinet integrate gives me this very weird error, do you have any clue on how I can debug what is the underlying issue? Contract testing using unit tests is successful with 85% test coverage.

clarinet v2.2.0 thread 'Chains coordinator' panicked at /private/tmp/clarinet-20240201-5477-5tvpfc/components/stacks-network/src/chains_coordinator.rs:343:38: unable to trigger deployment: SendError { .. }

clarinet v2.6.0 (chaintip = #103thread 'Chains coordinator' panicked at /private/tmp/clarinet-20240422-4983-buu983/clarinet-2.6.0/components/stacks-network/src/chains_coordinator.rs:362:38: unable to trigger deployment: SendError { .. }dr(mzxXgV6e4BZSs Registering adnote: run with RUST_BACKTRACE=1 environment variable to display a backtrace

hugocaillard commented 1 week ago

@OxMarco Can you check what's your clarinet version clarinet --version ? Make sure to update to 2.6.0 and if it throws a different error message, can you update it?

OxMarco commented 1 week ago

updated to v2.6.0

(chaintip = #103thread 'Chains coordinator' panicked at /private/tmp/clarinet-20240422-4983-buu983/clarinet-2.6.0/components/stacks-network/src/chains_coordinator.rs:362:38: unable to trigger deployment: SendError { .. }dr(mzxXgV6e4BZSs Registering adnote: run withRUST_BACKTRACE=1environment variable to display a backtrace

The error is messed up as it appears inside the clarinet integrate console

screenshot
hugocaillard commented 1 week ago

The error is messed up as it appears inside the clarinet integrate console

Ah yes, we need to improve that. You can use --no-dashboard to hide the UI and get the error properly if needed. But what you shared is basically the full error I believe.

It'll be hard to debug if I can't reproduce, can you a minimal reproducible example or the full project if you can't produce an example?

OxMarco commented 1 week ago

I think it's a contract deployment issue, but our codebase is very large (1500 Clarity loc), is there a way to know why the deployment is failing? Like on the EVM I'd get "gas too low" or "Contract code size exceeds 24576 bytes", is there a debug feature for clarinet integrate?

hugocaillard commented 1 week ago

@OxMarco Clarinet does display some error message but this one is apparently unhandled / unexpected. With access to the project, I would be able to investigate further

hugocaillard commented 3 days ago

@OxMarco I'm closing this issue for now. Please reach me out on Stacks discord (in the clarinet channel) or re-open to issue, for further investigation. We would need a minimal reproducible example or access to the full project to be able to help you here.