bob icon indicating copy to clipboard operation
bob copied to clipboard

[BUG] Previously solved bug has reappeared in `v4.1.3` (#278)

Open DrKJeff16 opened this issue 2 months ago • 28 comments

Description

I'm having the same issue as in #278 with bob v4.1.3. All bob/Neovim instances wereclosed, mind you.

$ bob use nightly
2025-10-11T19:15:26.888205Z  INFO Updating neovim proxy
2025-10-11T19:15:26.888342Z ERROR Error: The file /home/drjeff16/.cargo/bin/bob is busy. Please make sure to close any processes using it.
ps aux Screenshot

Image

Neither does it work when doing testing through GitHub Actions (https://github.com/stephansama/fzf-nerdfont.nvim/pull/16):

https://github.com/stephansama/fzf-nerdfont.nvim/blob/e696455e480b42515f0e1b08f3d4e014f3ab4365/Makefile#L26-L34


Solution

Downgrading to v4.1.2 worked for me.

DrKJeff16 avatar Oct 11 '25 21:10 DrKJeff16

Could you check maybe bob itself is running? when bob finds nvim process running it will give this message: Neovim is currently running. Please close it before switching versions. instead of the one it gave you.

MordechaiHadad avatar Oct 12 '25 12:10 MordechaiHadad

Same problem. It says /usr/bin/bob is busy, not neovim. I have no other neovim process or bob processes running.

folke avatar Oct 12 '25 15:10 folke

Was resolved in my case after deleting ~/.local/share/bob

folke avatar Oct 12 '25 15:10 folke

Could you check maybe bob itself is running? when bob finds nvim process running it will give this message: Neovim is currently running. Please close it before switching versions. instead of the one it gave you.

@MordechaiHadad Neither bob nor Neovim were running. I was thorough when checking for that.

@folke described it better.

DrKJeff16 avatar Oct 12 '25 17:10 DrKJeff16

Hmm this is a particularly odd issue, what reproduction steps can I take to get this error?

MordechaiHadad avatar Oct 13 '25 05:10 MordechaiHadad

Hang on, reproducing (I removed bob for testing).

DrKJeff16 avatar Oct 13 '25 05:10 DrKJeff16

In my case the busy exe was /usr/bin/bob, so it did not find the nvim exe path correctlty and of course this file (being the one updating) is busy.

I'm using the Arch installation bob 4.1.3-1.1

folke avatar Oct 13 '25 05:10 folke

In my case the busy exe was /usr/bin/bob, so it did not find the nvim exe path correctlty and of course this file (being the one updating) is busy.

I'm using the Arch installation bob 4.1.3-1.1

I'll try your setup, and see if I can reproduce.

MordechaiHadad avatar Oct 13 '25 06:10 MordechaiHadad

This error message you're seeing is likely coming up from here (or the sync handler, but likely not in your use-case).

I had a look into this when it first got posted, then saw your solution in the linked PR over in the fzf-nerdfont repo that you got it working. With the original one mentioned in the thread coming from here which is a little different and passes just fine after testing earlier. Might be difficult to fix up with how things are currently being handled.

Are you be able; at least for CI/CD pipelines able to use a preset config file or echo out into it this?: "ignore_running_instances": true if you can test with this - may resolve some of the issues

MrDwarf7 avatar Oct 13 '25 06:10 MrDwarf7

Are you be able; at least for CI/CD pipelines able to use a preset config file or echo out into it this?: "ignore_running_instances": true if you can test with this - may resolve some of the issues

@MrDwarf7 I'm currently experiencing no issue (back in v4.1.3, deleted $HOME/.local/share/bob^1). However, when I had issues I had no customized config. I then tried to add "ignore_running_instances": true but that did nothing.

Currently, while experiencing no issue, my config is the same I added when I was having issues:

{
  "enable_nightly_info": true,
  "enable_release_build": true,
  "downloads_location": "$HOME/.local/share/bob",
  "rollback_limit": 3,
  "github_mirror": "https://github.com",
  "add_neovim_binary_to_path": true,
  "ignore_running_instances": true
}

DrKJeff16 avatar Oct 13 '25 06:10 DrKJeff16

Schrodinger's bob

MordechaiHadad avatar Oct 13 '25 06:10 MordechaiHadad

In my case the busy exe was /usr/bin/bob, so it did not find the nvim exe path correctlty and of course this file (being the one updating) is busy.

I'm using the Arch installation bob 4.1.3-1.1

@folke Same thing, Arch installation (btw).


@MrDwarf7 I think something in the vicinity of this section might be acting funny (not a Rust dev, you'll know better):

https://github.com/MordechaiHadad/bob/blob/03f65d0700ff3e7c74c65e6348f4caf130fcf8e4/src/cli.rs#L184-L188

As my original issue can tell, switching from Arch package to cargo build --release type of install didn't solve it. Downgrading (without removing the aforementioned data directory) initially solved it for me.

DrKJeff16 avatar Oct 13 '25 06:10 DrKJeff16

Update

The oldest stuff I have in my shell history reveals something odd (history | grep bob). It could be nothing but just for the record:

 4739  bob rm nightly-56713ef

Note that I never ever installed that version. In fact, by then I was already suffering through that issue:

# TOP LINE
 4728  pkill -KILL bob      # Me attempting to kill any bob instance
 4735  bob use
 4736  bob use --help
 4738  bob rm --help
 4739  bob rm nightly-56713ef
 4740  pacman -Ss bob
 4741  pacman -Rn bob
 4742  pacman -Rns bob
 4745  cargo install bob
 4746  cargo install --git https://github.com/MordechaiHadad/bob.git
...

DrKJeff16 avatar Oct 13 '25 06:10 DrKJeff16

re: @DrKJeff16 -

@MrDwarf7 I think something in the vicinity of this section might be acting funny (not a Rust dev, you'll know better):

bob/src/cli.rs

Lines 184 to 188 in 03f65d0 if !config.config.ignore_running_instances.unwrap_or(true) && is_neovim_running() { return Err(anyhow::anyhow!( "Neovim is currently running. Please close it before switching versions." )); }

Close, your particular error message output is a little different - points to this area of the code: https://github.com/MordechaiHadad/bob/blob/03f65d0700ff3e7c74c65e6348f4caf130fcf8e4/src/handlers/use_handler.rs#L276

The error message in src/cli.rs you linked is "Please close it before switching versions." and doesn't have a place holder for the file path either. It's definitely coming up from the use_handler.rs file.

MrDwarf7 avatar Oct 13 '25 06:10 MrDwarf7

In my case the busy exe was /usr/bin/bob, so it did not find the nvim exe path correctlty and of course this file (being the one updating) is busy.

I'm using the Arch installation bob 4.1.3-1.1

Completely removed bob from my system, and reinstalled again from arch repos, ran 2 commands bob use stable and bob use nightly wasn't able to reproduce the error you both have.

MordechaiHadad avatar Oct 13 '25 08:10 MordechaiHadad

@MordechaiHadad the problem also disappeared for me after deleting ~/.local/share/bob, so there's no way to reproduce

folke avatar Oct 13 '25 08:10 folke

@MordechaiHadad the problem also disappeared for me after deleting ~/.local/share/bob, so there's no way to reproduce

What was the version that you tried to install and gave you this error? is it specifically nightly or any other version?

MordechaiHadad avatar Oct 13 '25 08:10 MordechaiHadad

I did bob use nightly, to update my nightly

folke avatar Oct 13 '25 08:10 folke

You can ignore my issue. Instead of using the patched nvim, I create a symlink from the nightly dir to ~/.local/share/bob-nvim (based on the used file).

It probably failed because that bob-nvim was a symlink.

After deleteing the directory, the symlink was gone, so worked again

folke avatar Oct 13 '25 09:10 folke

I did bob use nightly, to update my nightly

Hmm alright it might be reproducible then.

update: failed to reproduce.

MordechaiHadad avatar Oct 13 '25 09:10 MordechaiHadad

Ignore my last comment. I did not change nvim-bin. It was a totally different symlink not even under ~/.local/share/bob, so that wouldn't have caused issues :)

folke avatar Oct 13 '25 09:10 folke

Update: Unable to reproduce either. How did my system do that? You know it happened because of my screenshots^1...

Also, @stephansama stated an issue somehow, but unknown what version they were using.

DrKJeff16 avatar Oct 13 '25 17:10 DrKJeff16

I'm able to reproduce. Just had it again, and it was user error in my case. The problem was that due to an issue in my dots, /usr/bin was on my path before bob.

If that's the case and you want to update, it checks the path where nvim is located and assumes it's bob's version.

https://github.com/MordechaiHadad/bob/blob/1d8642ac713e16a5d06f7f970ba5c302747cbc6a/src/handlers/use_handler.rs#L227

Easy to reproduce by adding /usr/bin early on your PATH

folke avatar Oct 15 '25 18:10 folke

@folke Interestitng finding. In my case my dots don't behave like that, though I have nvim in /usr/local/bin (manual compilation).

I've attempted to reproduce it to no avail. Screenshot below (mind the forceful $PATH modifications):

  • bob ==> /usr/bin/bob (installed through pacman)

Test

Am I missing something, or doing something wrong?

DrKJeff16 avatar Oct 15 '25 19:10 DrKJeff16

Can you double check with which nvim? And do you have system neovim installed?

folke avatar Oct 15 '25 19:10 folke

Can you double check with which nvim?

Test_2

And do you have system neovim installed?

I have the Arch Linux package binary (/usr/bin/nvim, for archlinux.vim and other stuff).

DrKJeff16 avatar Oct 15 '25 19:10 DrKJeff16

Weird, I can 100% reproduce it this way

folke avatar Oct 15 '25 20:10 folke

¯\_(ツ)_/¯ I'll try to look into it more.

DrKJeff16 avatar Oct 15 '25 20:10 DrKJeff16