Problem with latest safe-authenticator-cli

Just cloned the safe-authenticator-cli and got this

willie@gagarin:~/projects/maidsafe/safe-authenticator-cli$ cargo build --features mock-network
    Updating git repository `https://github.com/nbaksalyar/threshold_crypto.git`
error: failed to load source for a dependency on `threshold_crypto`

Caused by:
  Unable to update https://github.com/nbaksalyar/threshold_crypto.git?branch=pks-copy#0f41fe73

Caused by:
  revspec '0f41fe7348ca6aa6f9c6492036ee9720032e1727' not found; class=Reference (4); code=NotFound (-3)

rust version rustc 1.35.0 (3c235d560 2019-05-20)

1 Like

Hello,

I re-pushed this branch so it should work now. :slight_smile:

4 Likes

Was going to report partial success with this but just had a suspected mobo failure on my main machne.
Thank you @nbaksalyar the latest git pull now compiles - but ONLY with --features mock-network - dunno if this is intended/expected behaviour

Could not get a myconfig.json file to work

However I can use safe-authenticator-cli and safe-cli to make accounts wallets on the mock network and transfer testcoins.
About to try connecting with safe-drive when the screens went blank and sound of fans spinning down.
I’ll try to replicate on the laptop later and post the relevant error messages/logs from the issues above.

2 Likes

It is for safe-cli. safe-authenticator-cli should work on the Alpha 2 network too though.

Thank you! This really helps.

1 Like

I am failing to create an new account on a fresh git clone of safe-authenticator-cli and safe-cli on my laptop.

does this command line look right?

willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ cargo run  --   --invite-token t --features mock-network  --verbose  2>&1 | tee debug.log`

Compiling safe_core v0.32.1 (https://github.com/bochaco/safe_client_libs?branch=temp-experimental#b40de6d0) error[E0432]: unresolved importrouting::Client--> /home/willie/.cargo/git/checkouts/safe_client_libs-78dcb58b240b6e71/b40de6d/safe_core/src/client/core_client.rs:12:5 | 12 | use routing::Client as Routing; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ noClientin the root

|
|
| snip
|
|

error[E0282]: type annotations needed
    --> /home/willie/.cargo/git/checkouts/safe_client_libs-78dcb58b240b6e71/b40de6d/safe_core/src/client/mod.rs:1248:46
     |
1248 |     send(client, request.message_id(), move |routing| {
     |                                              ^^^^^^^ consider giving this closure parameter a type
     |
     = note: type must be known at this point

error[E0282]: type annotations needed
    --> /home/willie/.cargo/git/checkouts/safe_client_libs-78dcb58b240b6e71/b40de6d/safe_core/src/client/mod.rs:1290:55
     |
1290 |     send_mutation(client, message.message_id(), move |routing, dst| {
     |                                                       ^^^^^^^ consider giving this closure parameter a type
     |
     = note: type must be known at this point

error: aborting due to 21 previous errors

Some errors occurred: E0282, E0432.
For more information about an error, try `rustc --explain E0282`.
error: Could not compile `safe_core`.

To learn more, run the command again with --verbose. `

full debug.log is at https://pastebin.com/sK7cmHwD
rustc -V rustc 1.35.0 (3c235d560 2019-05-20)
Ubuntu 18.04

It must be because the --features has to go before the --, so try with this instead @southside:

$ cargo run --features mock-network -- --invite-token t --verbose  2>&1 | tee debug.log
1 Like

Nice that works fine.
It barfed at --verbose but then I took that out it worked as expected.

I want to get my head round this thoroughly and then have a shot at further adding to the docs. Seems the switches and their order is quite critical.

Busy with other stuff now but I’ll try replicating my earlier successes and failures and report back with error msgs and logs.

Thanks again

1 Like

Getting places now :slight_smile:
However trying to use a config file to hold the secret and password fails as before.
rust 1.35.0

willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 2), reused 2 (delta 1), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/maidsafe/safe-authenticator-cli
   23a5963..62a03a2  master     -> origin/master
Updating 23a5963..62a03a2
Fast-forward
 README.md | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ cat my.config.json 
// my.config.json
{
  "password": "1234",
  "secret": "1234"
}
willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ cargo run --features mock-network -- --pretty --config ./my.config.json
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
     Running `target/debug/safe_auth --pretty --config ./my.config.json`
thread 'main' panicked at '

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!   unwrap! called on Result::Err                                              !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
src/cli_helpers.rs:64,38 in safe_auth::cli_helpers

Err(Error("expected value", line: 1, column: 1))

', /home/willie/.cargo/registry/src/github.com-1ecc6299db9ec823/unwrap-1.2.1/src/lib.rs:67:25
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:336
   7: <core::result::Result<T,E> as unwrap::VerboseUnwrap>::verbose_unwrap
             at ./<::std::macros::panic macros>:8
   8: safe_auth::cli_helpers::get_login_details
             at src/cli_helpers.rs:64
   9: safe_auth::cli::run
             at src/cli.rs:59
  10: safe_auth::main
             at src/main.rs:27
  11: std::rt::lang_start::{{closure}}
             at /rustc/3c235d5600393dfe6c36eeed34042efad8d4f26e/src/libstd/rt.rs:64
  12: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  14: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  15: std::rt::lang_start
             at /rustc/3c235d5600393dfe6c36eeed34042efad8d4f26e/src/libstd/rt.rs:64
  16: main
  17: __libc_start_main
  18: _start

Make sure you remove the comment you have in the json config file (// my.config.json). We should handle the error better though, I’ll try to send a PR for that.

Edit: https://github.com/maidsafe/safe-authenticator-cli/pull/50

1 Like

excellent - thank you :slight_smile:
willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ nano my.config.json willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$ cargo run --features mock-network -- --pretty --config ./my.config.json Finished dev [unoptimized + debuginfo] target(s) in 0.35s Running ``target/debug/safe_auth --pretty --config ./my.config.json Warning! Storing your secret/password in plaintext in a config file is not secure. Logged in the SAFE Network successfully! willie@sputnik:~/projects/maidsafe/safe-authenticator-cli$

2 Likes