| title | Common Issues & Solutions |
|---|---|
| description | Solutions to frequently encountered problems when using Tari CLI |
| last_updated | 2025-06-26 |
| version | Latest (main branch) |
| verified_against | Real error messages from codebase and common usage patterns |
| audience | users |
Quick solutions to the most frequently encountered problems with Tari CLI
Problem: cargo install tari-cli fails with compilation errors
Error Messages:
error: failed to compile `tari-cli`
error[E0554]: `#![feature(...)]` may not be used on the stable release channel
Solutions:
-
Update Rust Toolchain:
rustup update stable rustup default stable
-
Install Required Targets:
rustup target add wasm32-unknown-unknown
-
Clear Cargo Cache:
cargo clean rm -rf ~/.cargo/registry/cache cargo install tari-cli --git https://github.com/tari-project/tari-cli --force -
Alternative: Use Pre-built Binaries:
# Download from releases instead curl -L https://github.com/tari-project/tari-cli/releases/latest/download/tari-cli-linux.tar.gz | tar xz
Problem: Downloaded binary cannot be executed
Error Messages:
permission denied: ./tari-cli
zsh: permission denied: tari-cli
Solutions:
# Fix permissions
chmod +x tari-cli
# Install to user directory
mkdir -p ~/.local/bin
mv tari-cli ~/.local/bin/
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify installation
tari --versionError Message:
Template not found by name: basic. Possible values: ["advanced", "minimal", "nft"]
Cause: Template repositories not accessible or template name incorrect
Solutions:
-
Check Internet Connection:
# Test git repository access git clone https://github.com/tari-project/wasm-template.git test-clone rm -rf test-clone -
Use Interactive Selection:
# Don't specify template, let CLI show options tari create my-project # Select from available templates
-
Check Available Templates:
# Create project to see what's available tari create test-project # Note available templates, then cancel
-
Clear Repository Cache:
# Remove cached repositories (if they exist) rm -rf ~/.local/share/tari_cli/template_repositories # Retry template creation tari create my-project
Problem: Template generation stops with cargo-generate errors
Error Messages:
Error: Failed to generate project from template
Error: template path does not exist
Debugging Steps:
-
Verify Template Repository Structure:
# Clone repository manually to inspect git clone https://github.com/tari-project/wasm-template.git debug-templates cd debug-templates find . -name "template.toml" -exec echo "Found: {}" \;
-
Check Template Descriptor Format:
# Ensure template.toml has required fields name = "template-name" description = "Template description" # Optional extra configuration [extra] templates_dir = "templates"
-
Test with Minimal Template:
mkdir test-template && cd test-template cat > template.toml << EOF name = "test" description = "test template" EOF mkdir src echo 'fn main() { println!("Hello!"); }' > src/main.rs
Error Messages:
Connection refused (os error 61)
Failed to connect to wallet daemon at http://127.0.0.1:9000/
Diagnostics:
# Check if wallet daemon is running
curl -X POST http://127.0.0.1:9000/ \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"ping"}'
# Expected response: {"jsonrpc":"2.0","result":"pong","id":1}Solutions:
-
Start Wallet Daemon:
# Install and run Tari Wallet Daemon git clone https://github.com/tari-project/tari-dan.git cd tari-dan cargo build --release --bin tari_wallet_daemon ./target/release/tari_wallet_daemon --network localnet
-
Verify Network Configuration:
# In tari.config.toml default-network = "esmeralda" [networks.esmeralda] wallet-daemon-url = "http://127.0.0.1:5100/json_rpc"
-
Test Different Port:
# Check if port is available netstat -an | grep 5100 # Use alternative port if needed tari_wallet_daemon --json-rpc-address "127.0.0.1:9001"
-
Check Firewall Settings:
# Linux: Check iptables sudo iptables -L # macOS: Check system firewall sudo pfctl -sr # Windows: Check Windows Firewall netsh advfirewall show allprofiles
Error Messages:
Authentication failed
Insufficient permissions for admin operations
Solutions:
-
Verify Admin Access:
# Ensure wallet daemon is configured for admin operations # Check wallet daemon startup logs for authentication setup
-
Check Account Configuration:
# Verify account exists in wallet daemon # Account names are case-sensitive tari deploy --account "MyAccount" my-template
Error Messages:
error[E0463]: can't find crate for 'std'
error: could not compile for target `wasm32-unknown-unknown`
Solutions:
# Install WASM target
rustup target add wasm32-unknown-unknown
# Verify installation
rustup target list | grep wasm32-unknown-unknown
# Should show: wasm32-unknown-unknown (installed)
# Test compilation
cd templates/your-template
cargo check --target wasm32-unknown-unknownError Messages:
error: linking with `rust-lld` failed: exit status: 1
error: could not compile `your-template`
Debugging Steps:
-
Check Rust Version:
rustc --version # Ensure using stable Rust (1.70+) rustup default stable rustup update -
Verify Dependencies:
# In templates/your-template/Cargo.toml [dependencies] tari-template-lib = { git = "https://github.com/tari-project/tari-dan.git", branch = "development" } serde = { version = "1.0", features = ["derive"] } # Avoid std-dependent crates for WASM # Remove: tokio, std::fs, reqwest, etc.
-
Test Compilation Manually:
cd templates/your-template # Check syntax and dependencies cargo check --target wasm32-unknown-unknown # Full compilation cargo build --target wasm32-unknown-unknown --release # Verify WASM output ls target/wasm32-unknown-unknown/release/*.wasm
Problem: WASM binary exceeds size limits
Solutions:
# In Cargo.toml
[profile.release]
opt-level = "s" # Optimize for size
lto = true # Link-time optimization
codegen-units = 1 # Single codegen unit
panic = "abort" # Smaller panic handling
strip = true # Remove debug symbolsAdditional Optimization:
# Use wasm-opt for further optimization
cargo install wasm-pack
wasm-pack build --target web --out-dir pkg
# Or use wee_alloc for smaller memory footprint
# Add to Cargo.toml:
# wee_alloc = "0.4"Error Messages:
Insufficient funds for deployment
Account balance: 1000 XTR, Required: 256875 XTR
Solutions:
-
Check Account Balance:
# Use wallet daemon interface to check balance # Ensure account has sufficient XTR tokens
-
Estimate Deployment Cost:
# See cost estimate before deploying tari deploy --account your-account your-template # Note the estimated cost in prompt
-
Use Maximum Fee Limit:
# Limit deployment cost tari deploy --account your-account --max-fee 100000 your-template -
Request Test Tokens:
# For testnets, use faucet or request test tokens # For local development, create account with initial balance
Error Messages:
Network timeout
Failed to submit transaction to network
Connection refused to network endpoint
Solutions:
-
Verify Network Configuration:
# Check tari.config.toml default-network = "esmeralda" [networks.esmeralda] wallet-daemon-url = "http://127.0.0.1:5100/json_rpc"
-
Test Network Connection:
# Test wallet daemon connectivity telnet 127.0.0.1 9000 # Test HTTP endpoint curl -v http://127.0.0.1:9000/
-
Check Network Status:
# Verify local network is running ps aux | grep tari # Check network logs for issues tail -f ~/.tari/localnet/log/tari_wallet_daemon.log
Error Messages:
Template validation failed
Invalid WASM binary
Template does not meet network requirements
Debugging:
-
Verify WASM Binary:
# Check WASM file exists and is valid ls -la target/wasm32-unknown-unknown/release/*.wasm # Verify file is not empty file target/wasm32-unknown-unknown/release/your_template.wasm
-
Test WASM Validity:
# Install wasmtime for testing cargo install wasmtime-cli # Validate WASM binary wasmtime --invoke _start target/wasm32-unknown-unknown/release/your_template.wasm
-
Check Template Interface:
// Ensure template follows required interface #[template] mod your_template { // Required: Component implementation // Required: Constructor function // Required: Proper error handling }
Error Messages:
Project is not a Cargo workspace project!
Failed to update workspace members
Solutions:
-
Verify Workspace Structure:
# In root Cargo.toml [workspace] members = [ "templates/*", # Pattern to include all templates ] resolver = "2"
-
Manual Workspace Update:
# If automatic update fails, manually add template [workspace] members = [ "existing-template", "new-template-name" ]
-
Create Outside Workspace:
# Generate template in separate directory if needed mkdir ../standalone-template cd ../standalone-template tari new my-template
Problem: CLI takes long time to discover templates
Solutions:
-
Clear Repository Cache:
# Remove cached repositories rm -rf ~/.local/share/tari_cli/template_repositories
-
Check Network Speed:
# Test git clone speed time git clone https://github.com/tari-project/wasm-template.git speed-test rm -rf speed-test
-
Use Local Development:
# For development, consider local template repository git clone https://github.com/tari-project/wasm-template.git local-templates # Configure CLI to use local path (future feature)
Problem: WASM compilation takes excessive time
Solutions:
-
Optimize Build Configuration:
# In Cargo.toml [profile.dev] opt-level = 1 # Some optimization in debug builds [profile.release] codegen-units = 4 # Parallel compilation
-
Use Build Cache:
# Install sccache for build caching cargo install sccache export RUSTC_WRAPPER=sccache # Verify cache is working sccache --show-stats
-
Incremental Compilation:
# Enable incremental compilation export CARGO_INCREMENTAL=1 # Use cargo-watch for development cargo install cargo-watch cargo watch -x "check --target wasm32-unknown-unknown"
When reporting issues, include this information:
# System information
echo "OS: $(uname -a)"
echo "Rust: $(rustc --version)"
echo "Cargo: $(cargo --version)"
echo "Tari CLI: $(tari --version)"
# Environment check
echo "WASM target: $(rustup target list | grep wasm32-unknown-unknown)"
echo "Wallet daemon: $(curl -s http://127.0.0.1:9000/ > /dev/null && echo "accessible" || echo "not accessible")"
# Test basic functionality
tari --help > /dev/null && echo "CLI functional: Yes" || echo "CLI functional: No"# Set environment variable for detailed logging
export RUST_LOG=debug
tari create debug-project
# Or for specific modules
export RUST_LOG=tari_cli::templates=debug- π Bug Reports: GitHub Issues
- π¬ Community Discussion: Tari Discord
- π Documentation: Complete guides
- β Questions: GitHub Discussions
When reporting issues, include:
- Exact command that failed
- Complete error message
- System information (OS, Rust version, CLI version)
- Configuration files (with sensitive info removed)
- Steps to reproduce
Still having issues? Check our Advanced Debugging Guide or reach out to the community for help!