Open Alt-iOS opened 7 months ago
I am dumb, the issue is because of the parsing of the password as mentioned in the readme and tmux automatically opens all session in the same folder as when the session was originally opened, aka a folder with a trusted .envrc
Hey thanks for reporting this. I think this is still a valid issue. Or at least, a feature request. The app should probably handle the situation where there are concurrent attempts to read from the vault. Sqlite does have functionality for handling this but I'm not employing it evidently. I'll look into this.
Is this only happening when you're resurrecting a tmux session and your rudric session token is expired?
Rudric will delete expired keys from the database when this happens and I think Sqlite will lock the DB in this event.
Can you paste the full error you're getting here?
Sorry, I already uninstalled it because it was getting annoying and I could not work (literally could not use the terminal), tomorrow I will reinstall and try to reproduce and give more details into the issue, but it was more or less as follows:
export RUDRIC_SESSION=$(rudric session)
and direnv loadedprefix+c
to open another another window or prefix+%
to divide my window in panes (happened on both cases), rudric ask for my master password, as tmux is opening the project_dir in another windowAlso about the sqlite, it has a WAL journal mode which AFAIK helps avoid this kind of db locked stuff, this example is from the sqlx
repo, but maybe if you could change your connection to something like the signature below, it would help
use sqlx::ConnectOptions;
use sqlx::sqlite::{SqliteConnectOptions, SqliteJournalMode};
use std::str::FromStr;
let conn = SqliteConnectOptions::from_str("sqlite://data.db")?
.journal_mode(SqliteJournalMode::Wal)
.read_only(true)
.connect().await?;
Cool thanks for the pointers.
Something isn't playing nice between rudric and direnv and if you get prompted for a password, your keystrokes aren't getting passed into rudric so the process hangs. Though you should be able to abort it with ctrl-C.
I'm on Fish so I'm able to set a universal variable for all terminal sessions once per day with this:
set -Ux RUDRIC_SESSION (rudric session)
From that point onward, I don't have to keep entering my password to interact with the vault until the key expires. I'm not sure if Zsh has a similar universal variable functionality.
Hmmm... weird. I'm only getting a hanging terminal with direnv
on fish. zsh, bash, and nu don't hang when prompted for a password with direnv
.
You're also experiencing much different behavior than I am. For one, your password chars should be hidden. I'm not sure why they're showing for you. And two, the fact that you can enter chars at all but it only hangs when you hit enter is different. I wonder if rudric itself is getting stuck trying to unlock your vault.
After you hit enter, when the terminal is frozen, can you open another pane and see if the rudric
process is running. pgrep rudric
or something along those lines should tell you.
Finally, what kind of system are you running on?
Hi, I am running macos 14 on arm, I actually discovered the hang I get is because of this at the end of my zshrc
source <(rudric env zsh)
before killing it with pgrep rudric
it shows my "password" and isnt bothered by the Ctrl+c
sigkills
after killing it, it works normal
Hope this helps a little bit more in trying to diagnose the issue, and thanks for the help
Hi, when trying to open more than one terminal, I get an error saying my database is locked. I am also using it with direnv and tmux to open multiple panels, I am not sure what extra info I can provide to help debug/recreate the issue
direnv config
[global]
load_dotenv = true
rudric config
default_shell = "zsh"
session_lifetime = "6h"