leo icon indicating copy to clipboard operation
leo copied to clipboard

[Bug] Error installing leo

Open feewet opened this issue 3 years ago • 3 comments

🐛 Bug Report

(Write your description here)

Steps to Reproduce

Code snippet to reproduce

# Add code here

git clone https://github.com/AleoHQ/workshop:aleo-workshop cd also-workshop ./install.sh

# ./install.sh

Starting installation...

Step 0: Install Command Line Developer Tools
    Command Line Developer Tools are already installed!

Step 1: Fetching the Aleo and Leo Github repositories...
Already up to date.
Already up to date.

Step 2: Installing Aleo...
  Installing aleo v0.2.0 (/Users/feewet/fun/aleo-workshop/.build/aleo)
    Updating crates.io index
    Updating git repository `https://github.com/AleoHQ/snarkVM.git`
   Compiling aleo v0.2.0 (/Users/feewet/fun/aleo-workshop/.build/aleo)
    Finished release [optimized] target(s) in 1m 22s
   Replacing /Users/feewet/.cargo/bin/aleo
    Replaced package `aleo v0.2.0 (/Users/feewet/fun/aleo-workshop/.build/aleo)` with `aleo v0.2.0 (/Users/feewet/fun/aleo-workshop/.build/aleo)` (executable `aleo`)

Step 3: Installing Leo...
  Installing leo-lang v1.5.3 (/Users/feewet/fun/aleo-workshop/.build/leo)
    Updating git repository `https://github.com/AleoHQ/aleo.git`
    Updating crates.io index
    Updating git repository `https://github.com/AleoHQ/snarkVM.git`
   Compiling leo-lang v1.5.3 (/Users/feewet/fun/aleo-workshop/.build/leo)
    Finished release [optimized] target(s) in 45.39s
   Replacing /Users/feewet/.cargo/bin/leo
    Replaced package `leo-lang v1.5.3 (/Users/feewet/fun/aleo-workshop/.build/leo)` with `leo-lang v1.5.3 (/Users/feewet/fun/aleo-workshop/.build/leo)` (executable `leo`)

Step 4: Downloading parameters. This will take a few minutes...

       Leo Compiled 'main.leo' into Aleo instructions
⏳ Compiling 'install.aleo'...


ATTENTION - "combine.prover.c8d8c6d" does not exist, downloading this file remotely and storing it locally. Please ensure "combine.prover.c8d8c6d" is stored in "/Users/feewet/.aleo/resources/combine.prover.c8d8c6d".

snarkvm_parameters::testnet3 - Downloading parameters...
snarkvm_parameters::testnet3 - thread `main` panicked at 'Failed to load proving key: Crate("curl::error", "Error { description: \"Transferred a partial file\", code: 18, extra: Some(\"transfer closed with 81112176 bytes remaining to read\") }")', /Users/feewet/.cargo/git/checkouts/snarkvm-f1160780ffe17de8/ea14990/parameters/src/testnet3/mod.rs:93:9
stack backtrace: 
   0: backtrace::capture::Backtrace::new
   1: leo::set_panic_hook::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: _rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::result::unwrap_failed
   8: std::sync::once::Once::call_once::{{closure}}
   9: std::sync::once::Once::call_inner
  10: snarkvm_compiler::process::Process<N>::load
  11: snarkvm::package::Package<N>::get_process
  12: snarkvm::package::build::<impl snarkvm::package::Package<N>>::build
  13: aleo::commands::build::Build::parse
  14: <leo::commands::build::Build as leo::commands::Command>::apply
  15: leo::commands::Command::execute
  16: leo::commands::Command::try_execute
  17: leo::run_with_args
  18: scoped_tls::ScopedKey<T>::set
  19: leo::main
  20: std::sys_common::backtrace::__rust_begin_short_backtrace
  21: std::rt::lang_start::{{closure}}
  22: std::rt::lang_start_internal
  23: _main

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/AleoHQ/leo/issues/new?labels=bug,panic&template=bug.md&title=[Bug]

note: leo-lang 1.5.3 running on Darwin 21.6.0

note: compiler args: leo build

note: compiler flags: CLI { debug: false, quiet: false, command: Build { command: Build { compiler_options: BuildOptions { offline: false, enable_spans: false, enable_all_ast_snapshots: false, enable_initial_input_ast_snapshot: false, enable_initial_ast_snapshot: false, enable_unrolled_ast_snapshot: false, enable_ssa_ast_snapshot: false, enable_flattened_ast_snapshot: false } } }, api: None, path: None }

Expected Behavior

Expected to install Leo

Your Environment

leo 1.5.3 cargo 1.64.0 MacOS Monterey 12.5 (21G72)

feewet avatar Oct 13 '22 20:10 feewet

Hi @feewet Could you try running:

cd auction

leo run

collinc97 avatar Oct 13 '22 21:10 collinc97

I'm getting this issue:

ATTENTION - "combine.prover.c8d8c6d" does not exist, downloading this file remotely and storing it locally. Please ensure "combine.prover.c8d8c6d" is stored in "/Users/feewet/.aleo/resources/combine.prover.c8d8c6d".

feewet avatar Oct 14 '22 01:10 feewet

Hi @feewet, To run programs you must have the parameter files downloaded. The Leo (and Aleo) CLI will attempt to do this for you, but sometimes the download may fail. Here is a small script that should help you do this easily. Note that this script assumes that Leo is installed and you have a network connection.

echo "
Downloading parameters. This will take a few minutes...
"

# Create a new Leo project.
leo new install > /dev/null 2>&1 
cd install 

# Attempt to compile the program until it passes.
# This is necessary to ensure that the universal parameters are downloaded.
declare -i DONE

DONE=1

while [ $DONE -ne 0 ]
do
      leo build 2>&1
      DONE=$?
      sleep 0.5
done

# Remove the program.
cd .. && rm -rf install 

d0cd avatar Oct 14 '22 06:10 d0cd

Resolved above. Feel free to re-open if the issue persists!

d0cd avatar Oct 21 '22 19:10 d0cd

i am gettting error " error: failed to compile `leo-lang v1.10.0 "

naaimmd avatar Nov 29 '23 07:11 naaimmd