camspiers/snap

ENOENT: no such file or directory error, whilst using the files picker

akinsho opened this issue · 9 comments

Occasionally whilst using the file picker, it errors saying that a particular directory couldn't be found. In the case in this example, the file used to exist but was deleted. I'm not sure why snap still has a reference to it.

Screen Shot 2021-06-24 at 14 25 40

Other instances of this issue involve snap having a reference to the incomplete file path e.g.
#6 (comment) where the file's extension is missing some characters and this error occurs

A little more information to potentially help debug this information
Screen Shot 2021-06-24 at 16 29 11

I found in a particular work project I was able to reproduce this issue consistently by just entering ., into the prompt. If you look closely the paths of the results have been truncated somehow and I'm guessing snap tries to open these files only to find that they don't exist

I have a similar issue where end of file extension gets cut off occasionally

image

Can you try shifting to the fzy consumer instead of fzf? this will help me determine if it is fzf that is causing it.

I could confirm this only happened with fzf only, found no issue with fzy so far

My bad, this bug also happened with fzy, but haven't found a way to reproduce it reliably

I've switched to fzy and will report back since for me the issue is sporadic, or whatever I'm doing to trigger it isn't clear to me, but so far so good.

I can reproduce this always using this example https://github.com/camspiers/snap#grep-with-fzf-as-optional-next-step which uses fzf I will try with fzy & see.

I've had a few episodes whilst also using fzy, in one example I can reproduce the issue seems to be that whilst using vim.buffer I have a log buffer which doesn't exist on my system i.e. it's a scratch buffer with a buftype of nofile. When I try and select it to open in snap, it throws the file doesn't exist error.

...re/nvim/site/pack/packer/opt/snap/lua/snap/common/io.lua:136: ENOENT: no such file or directory: /<my-dir>/a-project/DEV_LOG__

So far I only experience this when I'm using git.file as producer. Is it the same for anybody else?

Closed with ac6ad97