So I need to make all links in my website relative to make it work?
My 4 am brain assumed there was some magic going on when I uploaded the files to convert links from http to safe, but I guess the links that work are relative.
Browser wonāt make assumptions, as that wouldnāt necessarily be correct and in all casesā¦ so, be deliberate and use safe:// prefix for links out of context and either relative or absolute links for the site itself. There might be a use case where safe:// and http:// are used side by sideā¦ though atm not possible to action the jump from one space to another.
I have updated safe and safe auth to try again and have had more luck, although things take a long time so I expect the longer timeout has helped.
I gave up with safe long --self-auth a couple of times because it was taking a long time, but then left it alone and when I came back I was logged in and safe auth status showed I was logged in.
So I tried safe cat safe://cdn which again took ages but did succeed. So I decided to time it and this time it failed. Hereās the output:
time safe cat safe://cdn
[2020-04-14T18:16:34Z ERROR safe] safe-cli error: Failed to connect: [Error] ConnectionError - Failed to connect to the SAFE Network: Unexpected("Connection timed out when bootstrapping to the network")
real 3m0.332s
user 0m0.193s
sys 0m0.058s
Maybe my connection isnāt great, although it seems fine for all the web stuff I do, uploading my VisLab website etc.
$ time safe cat safe://cdn
#<snip />
#auth not started and not logged into auth
real 0m0.809s
user 0m0.103s
sys 0m0.014s
# auth started
real 0m0.991s
user 0m0.103s
sys 0m0.017s
#auth running and logged in
real 0m0.944s
user 0m0.099s
sys 0m0.010s
PS can we get some consistency in the use of dashes and underscores in safe commands ? ( after Fleming release - its just a minor irritation to my OCD)
The -V is only for the command, not for any subcommand, you can try it with any subcommand and it will tell you only the binary version, the only way to check the version of authd is by running safe auth status or by using th safe-authd binary itself with -V.
The output is confusing, and itās known, but still couldnāt figure out how to fix it as thatās handled by a dep we use (structopt)
I wouldnāt be able to advise here, perhaps @lionel.faber?? can guess why your connectivity with the shared section is worse than with other servers on the web.
Iād be glad to take a look at this. @happybeing could you please run the CLI commands with RUST_LOG=safe=trace so we could get a better idea of whatās happening.
The ālong timeā is just because there are 3 attempts being made to connect to the network. The connection attempt will timeout after 30 seconds so you are probably seeing an error after 1.5 minutes.
There might be a specific reason why you are not able to connect the logs should help
Hi @JPL Iām on this right now. And Iām getting a similar error.
To confirm this, could you please run the command with the env variable RUST_LOG=safe=trace and share the logs please?
BTW Iām on Ubuntu 19.10. Iām not sure how best to send you the logs so here you go:
INFO 2020-04-14T18:27:30.393194136+01:00 [safe-authd/operations.rs:146] authd instance starting (PID: 12662)...
INFO 2020-04-14T18:27:30.393318677+01:00 [safe-authd/operations.rs:174] Initialising SAFE Authenticator services...
INFO 2020-04-14T18:27:30.393853905+01:00 [safe-authd/authd.rs:80] Listening on 127.0.0.1:33000
INFO 2020-04-14T18:28:45.794027811+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:28:45.794207493+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (3707466448): 'login'
INFO 2020-04-14T18:28:45.794256607+01:00 [safe-authd/requests/log_in.rs:25] Logging in to SAFE account...
INFO 2020-04-14T18:29:38.033588112+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:29:38.033745533+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (3870159741): 'status'
INFO 2020-04-14T18:29:38.033792943+01:00 [safe-authd/requests/status.rs:29] Preparing authd status report...
INFO 2020-04-14T18:30:07.039142678+01:00 [safe-authd/operations.rs:146] authd instance starting (PID: 12924)...
INFO 2020-04-14T18:30:07.039536699+01:00 [safe-authd/operations.rs:174] Initialising SAFE Authenticator services...
INFO 2020-04-14T18:30:07.040894035+01:00 [safe-authd/authd.rs:80] Listening on 127.0.0.1:33000
INFO 2020-04-14T18:30:09.942247494+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:30:09.942437384+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (1860721091): 'status'
INFO 2020-04-14T18:30:09.942505307+01:00 [safe-authd/requests/status.rs:29] Preparing authd status report...
INFO 2020-04-14T18:30:09.942572218+01:00 [safe-authd/requests/status.rs:55] Status report sent: AuthdStatus { logged_in: false, num_auth_reqs: 0, num_notif_subs: 0, authd_version: "0.0.8" }
WARN 2020-04-14T18:30:09.943425339+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-14T18:30:09.943440204+01:00 [safe-authd/authd.rs:154] Response sent, request complete
INFO 2020-04-14T18:30:24.905856682+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:30:24.906023646+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (1288008650): 'login'
INFO 2020-04-14T18:30:24.906086490+01:00 [safe-authd/requests/log_in.rs:25] Logging in to SAFE account...
INFO 2020-04-14T18:30:34.441351082+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:30:34.441542896+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (3942603263): 'login'
INFO 2020-04-14T18:30:34.441603936+01:00 [safe-authd/requests/log_in.rs:25] Logging in to SAFE account...
ERROR 2020-04-14T18:30:56.780885918+01:00 [safe-authd/requests/log_in.rs:47] Error occurred when trying to log in: [Error] AuthError - Failed to log in: no SAFE account found with the passphrase provided
ERROR 2020-04-14T18:30:56.780984581+01:00 [safe-authd/requests/mod.rs:82] Failed processing incoming request 1288008650: [Error] AuthError - Failed to log in: no SAFE account found with the passphrase provided
INFO 2020-04-14T18:31:30.263052776+01:00 [safe-api/src/api/authenticator/auth.rs:93] Disconnected from network
INFO 2020-04-14T18:31:30.263096203+01:00 [safe-authd/requests/log_in.rs:43] Logged in successfully!
INFO 2020-04-14T18:31:30.263618863+01:00 [safe-authd/authd.rs:154] Response sent, request complete
INFO 2020-04-14T18:31:30.287430531+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:31:30.287570705+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (1507656850): 'subscribe'
INFO 2020-04-14T18:31:30.287617285+01:00 [safe-authd/requests/subscribe.rs:38] Subscribing to authorisation requests notifications...
INFO 2020-04-14T18:31:30.287664427+01:00 [safe-authd/requests/subscribe.rs:77] Subscription successful. Endpoint 'https://localhost:33002' will receive authorisation requests notifications (cert base path: "/home/mrh/.config/safe-authd-client/net.maidsafe.cli")
INFO 2020-04-14T18:31:30.288317993+01:00 [safe-authd/authd.rs:154] Response sent, request complete
WARN 2020-04-14T18:31:30.288508978+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-14T18:31:30.296221322+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:31:30.296350369+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (3905569313): 'authorise'
INFO 2020-04-14T18:31:30.296405629+01:00 [safe-authd/requests/authorise.rs:56] Authorising application...
INFO 2020-04-14T18:31:30.296629495+01:00 [safe-authd/requests/authorise.rs:64] The following application authorisation request (2244060075) was received:
INFO 2020-04-14T18:31:30.296696182+01:00 [safe-authd/requests/authorise.rs:68] AuthReq { app: AppExchangeInfo { id: "net.maidsafe.cli", scope: None, name: "SAFE CLI", vendor: "MaidSafe.net Ltd" }, app_container: false, app_permissions: AppPermissions { transfer_coins: true, perform_mutations: true, get_balance: true }, containers: {} }
INFO 2020-04-14T18:31:31.139452845+01:00 [safe-authd/notifs.rs:141] Notifying subscriber: https://localhost:33002
INFO 2020-04-14T18:31:31.145434701+01:00 [safe-authd/notifs.rs:159] Subscriber's response: Auth req notification from app id 'net.maidsafe.cli' sent to user
INFO 2020-04-14T18:31:31.145523026+01:00 [safe-authd/notifs.rs:104] Decision obtained for auth req id: 2244060075 - from app id: net.maidsafe.cli: None
INFO 2020-04-14T18:31:31.152377918+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:31:31.152527811+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (2924826254): 'allow'
INFO 2020-04-14T18:31:31.152589490+01:00 [safe-authd/requests/allow.rs:19] Allowing authorisation request...
INFO 2020-04-14T18:31:31.152647533+01:00 [safe-authd/requests/allow.rs:33] Authorisation request (2244060075) allowed successfully
INFO 2020-04-14T18:31:31.152819582+01:00 [safe-authd/requests/authorise.rs:161] Let's request the authenticator lib to authorise the request '2244060075'...
INFO 2020-04-14T18:31:31.153279164+01:00 [safe-authd/authd.rs:154] Response sent, request complete
INFO 2020-04-14T18:31:31.153393505+01:00 [safe-api/src/api/authenticator/auth.rs:312] Request was recognised as a general app auth request
WARN 2020-04-14T18:31:31.153524628+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-14T18:31:32.366050568+01:00 [safe-authd/requests/authorise.rs:168] Authorisation request (2244060075) was allowed and response sent back to the application
WARN 2020-04-14T18:31:32.366489203+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-14T18:31:32.366506764+01:00 [safe-authd/authd.rs:154] Response sent, request complete
INFO 2020-04-14T18:31:32.387169867+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T18:31:32.387232631+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (2845634995): 'unsubscribe'
INFO 2020-04-14T18:31:32.387279855+01:00 [safe-authd/requests/unsubscribe.rs:19] Unsubscribing from authorisation requests notifications...
INFO 2020-04-14T18:31:32.387293556+01:00 [safe-authd/requests/unsubscribe.rs:27] Unsubscription successful. Endpoint 'https://localhost:33002' will no longer receive authorisation requests notifications
INFO 2020-04-14T18:31:32.387502182+01:00 [safe-authd/authd.rs:154] Response sent, request complete
WARN 2020-04-14T18:31:32.387582461+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
ERROR 2020-04-14T18:32:56.782303846+01:00 [safe-authd/authd.rs:121] [Error] GeneralError - Failed to shutdown stream: [Error] GeneralError - Failed to shutdown the response stream gracefully: connection closed: timed out
WARN 2020-04-14T18:32:56.782314984+01:00 [jsonrpc-quic/server_endpoint.rs:149] Failed to read incoming request: timed out
WARN 2020-04-14T18:33:30.264738014+01:00 [jsonrpc-quic/server_endpoint.rs:149] Failed to read incoming request: timed out
INFO 2020-04-14T19:01:43.382720737+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-14T19:01:43.382887236+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (4112294694): 'status'
INFO 2020-04-14T19:01:43.382927826+01:00 [safe-authd/requests/status.rs:29] Preparing authd status report...
INFO 2020-04-14T19:01:43.382965412+01:00 [safe-authd/requests/status.rs:55] Status report sent: AuthdStatus { logged_in: true, num_auth_reqs: 0, num_notif_subs: 0, authd_version: "0.0.8" }
INFO 2020-04-14T19:01:43.383448494+01:00 [safe-authd/authd.rs:154] Response sent, request complete
WARN 2020-04-14T19:01:43.383547268+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-15T11:55:14.841397852+01:00 [safe-authd/operations.rs:146] authd instance starting (PID: 21986)...
INFO 2020-04-15T11:55:14.841524265+01:00 [safe-authd/operations.rs:174] Initialising SAFE Authenticator services...
INFO 2020-04-15T11:55:14.842112298+01:00 [safe-authd/authd.rs:80] Listening on 127.0.0.1:33000
INFO 2020-04-15T11:57:37.614996104+01:00 [jsonrpc-quic/server_endpoint.rs:160] Got new request's bytes
INFO 2020-04-15T11:57:37.615138597+01:00 [safe-authd/requests/mod.rs:39] Processing new incoming request (1934776970): 'login'
INFO 2020-04-15T11:57:37.615178090+01:00 [safe-authd/requests/log_in.rs:25] Logging in to SAFE account...
ERROR 2020-04-15T11:59:07.798942864+01:00 [safe-authd/requests/log_in.rs:47] Error occurred when trying to log in: [Error] AuthError - Failed to log in: Core error: Unexpected: Connection timed out when bootstrapping to the network
ERROR 2020-04-15T11:59:07.798999094+01:00 [safe-authd/requests/mod.rs:82] Failed processing incoming request 1934776970: [Error] AuthError - Failed to log in: Core error: Unexpected: Connection timed out when bootstrapping to the network
WARN 2020-04-15T11:59:07.799357414+01:00 [jsonrpc-quic/server_endpoint.rs:145] Connection terminated
INFO 2020-04-15T11:59:07.799429931+01:00 [safe-authd/authd.rs:154] Response sent, request complete
Looks like weāll need to increase the log level for the authd to get more info. While I sort that out could you please confirm that the contents of ~/.safe/config/safe_vault/vault_connection_info.config are: "167.71.140.27:443"
Whenever we start a local section these contents are overwritten and sometimes I forget to revert back to the info of the shared section. So just confirming that this is not the case.