atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.87k stars 562 forks source link

[Bug]: Error: Permission denied (os error 13) #2438

Open HwapX opened 1 week ago

HwapX commented 1 week ago

What did you expect to happen?

The search panel open.

What happened?

Recently i started getting this error when running on zsh.

The following error happens when i try run it.

Error: Permission denied (os error 13)

Location:
    crates/atuin/src/command/client/search/interactive.rs:990:18

Atuin doctor output

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "24.04",
    "disks": [
      {
        "name": "/dev/sdc2",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/sdc2",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/sdc2",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/sdc1",
        "filesystem": "vfat"
      },
      {
        "name": "/dev/sda1",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sda1",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sdb1",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sdb2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sdb1",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sdb3",
        "filesystem": "ext4"
      }
    ]
  }
}

Code of Conduct

renatogalera commented 1 week ago

Same here

Atuin Doctor Checking for diagnostics Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": true,
      "records": true,
      "auto_sync": true,
      "last_sync": "2024-11-05 19:37:37.40501821 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "24.04",
    "disks": [
      {
        "name": "/dev/nvme1n1p2",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/nvme1n1p2",
        "filesystem": "btrfs"
      },
      {
        "name": "/dev/nvme1n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}
lukemv commented 1 week ago

Same here

This is the output from atuin doctor

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "24.04",
    "disks": [
      {
        "name": "/dev/mapper/ubuntu--vg-ubuntu--lv",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sda2",
        "filesystem": "ext4"
      }
    ]
  }
}

This is the output of ctrl+r

➜  Error: Permission denied (os error 13)

Location:
    crates/atuin/src/command/client/search/interactive.rs:990:18a
ellie commented 1 week ago

What terminals are you using?

https://github.com/atuinsh/atuin/blob/2e332c247d69719a3fd7182f6fdb7dbc117be1d5/crates/atuin/src/command/client/search/interactive.rs#L987-L991

is where the error is coming from

lukemv commented 1 week ago

I'm SSH'ing into a virtual machine

ellie commented 1 week ago

but with what terminal emulator?

lukemv commented 1 week ago

Is xterm-256color a terminal emulator? That's the output of echo $TERM

The same behaviour happens outside, and within tmux.

ellie commented 1 week ago

Just to rephrase - what application are you opening on your computer in order to run the ssh command?

Such as iterm2, alacritty, gnome terminal, etc

renatogalera commented 1 week ago

What terminals are you using?

https://github.com/atuinsh/atuin/blob/2e332c247d69719a3fd7182f6fdb7dbc117be1d5/crates/atuin/src/command/client/search/interactive.rs#L987-L991

is where the error is coming from

Alacritty

alacritty --version                                                                                                                                                                           │
lacritty 0.13.2
lukemv commented 1 week ago

iterm2 on MacOS.

lukemv commented 1 week ago

I just tested and noted the same behaviour if I SSH to the VM using Windows Terminal

HwapX commented 1 week ago

Is xterm-256color a terminal emulator? That's the output of echo $TERM

The same behaviour happens outside, and within tmux.

I don't know why, but just as the error came, it disappeared...

The only thing I can say is that while this was happening in zsh, on the same system with bash it worked fine.

echo $TERM
xterm-256color

This was on both zsh(broken) and bash(fine) using gnome terminal

For me its solved, for now....