Bug: When trying to start node with debug logging it fails at the passphrase.
Original Thread:https://radicle.zulipchat.com/#narrow/channel/369873-support/topic/failing.20with.20IO.20error.3A.20rad.20seed.20for.20specific.20repo/with/516496646
Related Issue: 7ea0011b5596f3fff6a839f8166bbbbb0040df61
Trying to debug the following command:
rad seed rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
In a new terminal:
rad node stop ; rad node start --foreground -- --log debug | tee -a node.log
✓ Node stopped
✗ Error: your radicle passphrase is required to start your node
Adding node passphrase as a startup argument is not successful, even though the passphrase is valid and works on manual startup:
rad node stop ; RAD_PASSPHRASE="<redacted-passphrase-here-remember-to-clear-history>" rad node start --foreground -- --log debug | tee -a node.log
✓ Node stopped
2025-05-05T20:28:11.870Z INFO node Starting node..
2025-05-05T20:28:11.870Z INFO node Version 1.1.0 (70f0cc35)
2025-05-05T20:28:11.870Z INFO node Unlocking node keystore..
2025-05-05T20:28:12.019Z ERROR node Fatal: couldn't load secret key: invalid passphrase
rad node stop ; RAD_PASSPHRASE="<redacted-passphrase-remember-to-clear-history>" rad node start --foreground -- --log debug | tee -a node.log
✗ Stopping node... error: node is not running
2025-05-05T20:28:49.220Z INFO node Starting node..
2025-05-05T20:28:49.220Z INFO node Version 1.1.0 (70f0cc35)
2025-05-05T20:28:49.220Z INFO node Unlocking node keystore..
2025-05-05T20:28:49.359Z ERROR node Fatal: couldn't load secret key: invalid passphrase
rad node start
? Passphrase: ~V [LogLevel QUIET]
✓ Passphrase: ********
✓ Node started (834669)
To stay in sync with the network, leave the node running in the background.
To learn more, run `rad node --help`.
Following variations of quoting have been tried to escape potential special characters in the passphrase. All with the same result as above.
rad node stop ; RAD_PASSPHRASE=$'<redacted-passphrase-here-remember-to-clear-history>' rad node start --foreground -- --log debug | tee -a node.log
rad node stop ; RAD_PASSPHRASE='<redacted-passphrase-here-remember-to-clear-history>' rad node start --foreground -- --log debug | tee -a node.log
rad node stop ; RAD_PASSPHRASE=$"<redacted-passphrase-here-remember-to-clear-history>" rad node start --foreground -- --log debug | tee -a node.log
rad node stop ; RAD_PASSPHRASE="<redacted-passphrase-here-remember-to-clear-history>" rad node start --foreground -- --log debug | tee -a node.log
Reproducing the logging method on another node with another generated passphrase revealed further escaping issues:
rad node stop ; RAD_PASSPHRASE=$'<redacted-passphrase-here-remember-to-clear-history>' rad node start --foreground -- --log debug | tee -a node.log
bash: !,': event not found
rad node stop ; RAD_PASSPHRASE="<redacted-passphrase-here-remember-to-clear-history>" rad node start --foreground -- --log debug | tee -a node.log
bash: !t9<redacted>: event not found
Note the differing locations within the passphrase that cause the command to fail.
I have put the passphrase into my keyring and use secret tool. The below works for me without problems:
RAD_PASSPHRASE=$(secret-tool lookup radicle client) rad node start