Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error unable to open database file #2504

Open
1 task done
Burnwood1911 opened this issue Dec 28, 2024 · 1 comment · May be fixed by #2589
Open
1 task done

[Bug]: Error unable to open database file #2504

Burnwood1911 opened this issue Dec 28, 2024 · 1 comment · May be fixed by #2589
Labels
bug Something isn't working

Comments

@Burnwood1911
Copy link

What did you expect to happen?

it should run correctly

What happened?

Im on m1 mac latest sequoia
after running the install script it finishes fine when i restart the terminal immediately when i type anything this error shows


Caused by:
    (code: 14) unable to open database file

Location:
    crates/atuin/src/command/client.rs:138:18```

### Atuin doctor output

```yaml
i cant even run doctor command

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Burnwood1911 Burnwood1911 added the bug Something isn't working label Dec 28, 2024
@jamestrew
Copy link

I also got this error.
It's actually quite jarring and hard to recover from. After rebooting, it couldn't even start Xorg (or something in the subsequent chain was triggering a crash related to this).

But after dropping into tty, I realized it's possible to run commands, it's just very difficult to read/write anything due to the constant spam of the error with each key press.

Running atuin doctor, I got this additional error:

thread: 'main' panicked at crates/atuin-client/src/settings.rs:600:14:
Could not write host ID to data dir: failed to create file `/home/jt/.local/share/atuin/host_id`

Caused by:
        No such file or directory (os error 2)

Location:
        crates/atuin-client/src/settings.rs:534:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I believe in my case this was caused by some bad symlinks. Atuin created user data files inside ~/.local/share that was actually a symlink, then later the symlink was broken. After deleting the broken symlinks, everything is back to working.

So I suppose it's user error. But the error handling could probably be improved.
I'll try to dig a little deeper into this and submit a PR to improve this error handling.

@jamestrew jamestrew linked a pull request Feb 17, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants