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 ``
error: failed to load source for a dependency on `threshold_crypto`

Caused by:
  Unable to update

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

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

1 Like


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


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.


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 ( error[E0432]: unresolved importrouting::Client --> /home/willie/.cargo/git/checkouts/safe_client_libs-78dcb58b240b6e71/b40de6d/safe_core/src/client/ | 12 | use routing::Client as Routing; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ noClient in the root

| snip

error[E0282]: type annotations needed
    --> /home/willie/.cargo/git/checkouts/safe_client_libs-78dcb58b240b6e71/b40de6d/safe_core/src/client/
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/
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
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


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.
   23a5963..62a03a2  master     -> origin/master
Updating 23a5963..62a03a2
Fast-forward | 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/,38 in safe_auth::cli_helpers

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

', /home/willie/.cargo/registry/src/
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/
             at src/libstd/
   3: std::panicking::default_hook
             at src/libstd/
   4: std::panicking::rust_panic_with_hook
             at src/libstd/
   5: std::panicking::continue_panic_fmt
             at src/libstd/
   6: std::panicking::begin_panic_fmt
             at src/libstd/
   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/
   9: safe_auth::cli::run
             at src/
  10: safe_auth::main
             at src/
  11: std::rt::lang_start::{{closure}}
             at /rustc/3c235d5600393dfe6c36eeed34042efad8d4f26e/src/libstd/
  12: std::panicking::try::do_call
             at src/libstd/
             at src/libstd/
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/
  14: std::rt::lang_start_internal
             at src/libstd/
             at src/libstd/
             at src/libstd/
  15: std::rt::lang_start
             at /rustc/3c235d5600393dfe6c36eeed34042efad8d4f26e/src/libstd/
  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.


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$


I’m also having problems with this. Probably something blindingly obvious but it would save me time and annoyance if someone could point it out.

I’m using Win 10 and Rust 1.36 and following the instructions here.

Clone and build safe-cli - seems to be OK.
Clone and start safe-authenticator-cli in a separate terminal with cargo run --features mock-network -- --daemon 41805 - seems to be OK. Output ends with:

Running `target\debug\safe_auth.exe --daemon 41805

Added safe-cli and safe-authenticator-cli and C:\Users\John.cargo folders to PATH


$ safe auth
bash: safe: command not found

$ which safe doesn’t find anything either.

Did you build CLI with mock network? cargo build --release --features mock-network ?

And then, the folder you’re linking to in PATH is using the target/release subdirectory?

That’s be a ‘No’ to both of those. I’ll try again.

Thanks @joshuef

1 Like

OK progress of sorts. I can’t get it to recognise my PATH whatever I do (I’m using a MINGW bash console btw), but running it direct from the release folder I get this.

$ ./safe auth
Authorising CLI application...
[2019-08-09T12:33:11Z ERROR safe] safe_cli error: Application authorisation failed: [Error] AuthError - Failed to send request to Authenticator: http://localhost:41805/authorise/bAAAAAAHX24WWUAAAAAABAAAAAAAAAAAANZSXILTNMFUWI43BMZSS4Y3MNEAAQAAAAAAAAAAAKNAUMRJAINGESEAAAAAAAAAAABGWC2LEKNQWMZJONZSXIICMORSAAAIAAAAAAAAAAAAAC: an error occurred trying to connect: No connection could be made because the target machine actively refused it. (os error 10061)

OS error 10061 is:


Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

And that’s with the above running in a different terminal?

Yep [20 characters].

Hmm okay. That sounds reasonably buggy. Would windows have a firewall or something blocking it? Are you able to ping the server otherwise? I’m not super familiar with windows I’m afraid, so not sure what to suggest. And I know @bochaco also isn’t in a windows machine.

Can you please open an issue w/repro steps and we can hopefully get someone to repro that on a Windows box and figure out what’s up. :bowing_man:

1 Like

Yeah sure - will do. I’ll give it a go on Linux when I have a moment. Generally much more straightforward. Cheers

1 Like

No worries. Thanks for diving in! Excited to see more folk play with this :slight_smile:

Can you please try running the safe_auth in diff port, e.g.

cargo run --features mock-network -- -i sdfsd --daemon 15000

and from safe_cli:

cargo run --features mock-network -- auth --port 15000

just to make sure it’s not a problem with that port, also can you try to do

wget localhost:15000

and see if it fails?