Sudden problem with 'wallet get-faucet' on local testnet

@joshuef, or any devs using local testnets… help!

I have an alias set to start a testnet which was working until yesterday. I know I did a git pull on the safe_network repository yesterday but am not sure if I tried running a testnet after that, though I probably did (without problems).

But today it is failing as shown below, when it tries to safe wallet get-faucet.

I’m not sure if it is due to the pull. It seems unlikely because I probably ran a test afterwards. But to check that, today I first did git pull again, then I did git checkout stable but each time I get the same error.

I’ll try further checkouts to see if I can find a working version, but as that seems unlikely to solve this I’m posting this to see if what else that might cause this error. I can’t think of anything that has changed that could cause this since late yesterday.

This is on Ubuntu 24.

The commands run after starting the nodes are as follows (getting the wallet address ensures there’s a master key available because I always wipe ~/.local/share/safe to start):

cargo run --bin safe --features local-discovery -- wallet address && \
cargo run --bin safe --features local-discovery -- wallet get-faucet 127.0.0.1:8000'
   Running `target/debug/safe wallet get-faucet '127.0.0.1:8000'`
Logging to directory: "/home/mrh/.local/share/safe/client/logs/log_2024-05-20_11-38-37"
safe client built with git version: 6771a01c / stable / 6771a01c / 2024-05-20
Instantiating a SAFE client...
Connecting to the network with 0 peers
🔗 Connected to the Network                                                                                        Requesting token for wallet address: a15ab07dac6567c93b040cb5f46a63f58a0cdcb01f9ce3aa0f8c2c39bf7447d6d5b1024f3f5f0e2a11dd636841855a99
Error: 
   0: error sending request for url (http://127.0.0.1:8000/a15ab07dac6567c93b040cb5f46a63f58a0cdcb01f9ce3aa0f8c2c39bf7447d6d5b1024f3f5f0e2a11dd636841855a99)
   1: client error (Connect)
   2: tcp connect error: Connection refused (os error 111)
   3: Connection refused (os error 111)

Location:
   sn_cli/src/bin/subcommands/wallet/helpers.rs:62

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

After a delay (~1 minute) this appears:

mrh@Lunar:~/src/safe_network [stable]$ 
Error: Wallet Error Failed to send tokens due to The transfer was not successfully registered in the network: CouldNotSendMoney("Failed to send spend requests to the network:a8dc59568db6bc8656c56d9d1b38312a88cc86d85328987faa3a16e7e69861fd47c01debe09d6e1b866cde17bdbcc2b0: Network Error Record not stored by nodes, it could be invalid, else you should retry: NetworkAddress::RecordKey(153cdd - 28542e01c860f392444a2e424fa829cb5b83959cd1c4a0bd0f0b7d5f92123c94).").

Caused by:
    Failed to send tokens due to The transfer was not successfully registered in the network: CouldNotSendMoney("Failed to send spend requests to the network:a8dc59568db6bc8656c56d9d1b38312a88cc86d85328987faa3a16e7e69861fd47c01debe09d6e1b866cde17bdbcc2b0: Network Error Record not stored by nodes, it could be invalid, else you should retry: NetworkAddress::RecordKey(153cdd - 28542e01c860f392444a2e424fa829cb5b83959cd1c4a0bd0f0b7d5f92123c94).")

Location:
    sn_faucet/src/main.rs:94:5

I just tried the stable build with PunchBowl to see if I can use that instead for now:

cd ~/src/safe-browser/safe_network && cargo run --bin safe -- wallet get-faucet 165.232.45.224:8000

That fails too (see below), but presumably because of a problem with the faucet. So I’m stuck atm and can’t test my app.

    Running `target/debug/safe wallet get-faucet '165.232.45.224:8000'`
Logging to directory: "/home/mrh/.local/share/safe/client/logs/log_2024-05-20_12-06-31"
safe client built with git version: 6771a01c / stable / 6771a01c / 2024-05-20
Instantiating a SAFE client...
Connecting to the network with 1 peers
🔗 Connected to the Network                                                                  Requesting token for wallet address: a15ab07dac6567c93b040cb5f46a63f58a0cdcb01f9ce3aa0f8c2c39bf7447d6d5b1024f3f5f0e2a11dd636841855a99
Error: 
   0: error sending request for url (http://165.232.45.224:8000/a15ab07dac6567c93b040cb5f46a63f58a0cdcb01f9ce3aa0f8c2c39bf7447d6d5b1024f3f5f0e2a11dd636841855a99)
   1: client error (SendRequest)
   2: connection closed before message completed

Location:
   sn_cli/src/bin/subcommands/wallet/helpers.rs:62

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Solved by the replies here: Node Manager UX and Issues - #546 by happybeing - Safe-Node - Autonomi Forum (Safe)