Baby Fleming Public Shared Section

Thank you for looking!

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.

3 Likes

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.

2 Likes

Yes - everything is relative - as Einstein might once have said.

Actually not strictly true, you can have external links but they must be to another safe:// address

I had a couple of test sites on the old shared vault that used the same css file for instance - trivial but it proved the point for me.

1 Like

Ok cool, thanks to both of you!

I should be able to make most links in my website relative, so at least like 95% of links would work on safe for now.

Once the real network is up I can make all links work on safe and cancel my portfolio domain. Will be a good day. :smiley:

8 Likes

Hi Gabriel,

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.

Vesions:

  • safe-cli 0.12.0
  • safe-auth 0.12.0
2 Likes

hmmā€¦

$ safe auth update
Checking target-arch... x86_64-unknown-linux-gnu
Checking current version... v0.0.7
Checking latest released version... v0.0.8
New release found! v0.0.7 --> v0.0.8
New release is compatible

blah

Update status: `0.0.8`!

but I wanted 0.12 :confused:

$ safe auth -V
safe-auth 0.12.0

:smiley:
@bochaco

Except that doesnā€™t make senseā€¦ perhaps safe auth -V is catching the safe cli version??

1 Like

adding no value, it just worked for me as:

$ 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
2 Likes

It is confusingā€¦

The new safe is v0.12.0
the new safe-authd is v0.8.0

Note I had already run safe auth update by this time

Iā€™d go along with thatā€¦

Note the last two commands

safe_vault -V

and safe-authd -V

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)

1 Like

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)

3 Likes

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.

3 Likes

Yeh, the version flag is confusing. Weā€™ve an issue for that over here.

(edit: I see @bochaco replied and explained a bit already :+1: )

2 Likes

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 :slight_smile:

1 Like

When youā€™re done there @lionel.faber ā€¦ :slightly_smiling_face:

Is it odd that something installed separately, is not cast as safe-auth ?.. or should that be as one with cli and then correct as $ safe -V

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?

Not a lot more here from the looks of it, but here you go:

RUST_LOG=safe=trace safe auth login --self-auth
[2020-04-15T10:57:26Z DEBUG safe] Starting SAFE CLI...
[2020-04-15T10:57:26Z DEBUG safe::cli] Processing command: CmdArgs { cmd: Some(Auth { cmd: Some(Login { config_file_str: None, self_auth: true }) }), output_fmt: None, output_json: false, dry: false, xorurl_base: None, endpoint: None }
[2020-04-15T10:57:26Z DEBUG safe_api::api::authd_client::authd_client_api] Creating new authd client for endpoint https://localhost:33000
Passphrase: 
Password: 
Sending login action request to authd...
[2020-04-15T10:57:37Z DEBUG safe_api::api::authd_client::authd_client_api] Attempting to log in on remote authd...
[2020-04-15T10:57:37Z INFO  safe_api::api::authd_client::authd_client_api] Sending login action to SAFE Authenticator (https://localhost:33000)...
[2020-04-15T10:59:07Z TRACE safe_api::api::authd_client::authd_client_api] SafeAuthdClient instance being dropped...
[2020-04-15T10:59:07Z ERROR safe] safe-cli error: [Error] AuthdError - [Error] AuthError - Failed to log in: Core error: Unexpected: Connection timed out when bootstrapping to the network

BTW I ran safe auth stop && safe auth start prior to the above.

1 Like

Aah. Iā€™ll need the logs from the authd then. Could please you send over the authd logs from
C:/Users/<username>/.safe/authd/safe-auth.log

Note that these logs will be printed only if you are using the latest version of the auth daemon that was released yesterday.

1 Like

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

Thanks @happybeing. This helps :slight_smile:

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.

1 Like