keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.87k stars 1.22k forks source link

Cannot browse follower's private folder from macOS Finder #21324

Open NetRelay opened 4 years ago

NetRelay commented 4 years ago

Keybase GUI Version: 5.0.0-20191114182642+f73f97dac6

Hello,

I have two singed in accounts in my app, say for example "work" and "personal". Keybase filesystem is mounted as a volume in the macOS Finder.

User "work" can see and browse /Volumes/keybase/private/work,personal from the Finder.

Switching to user "personal", /Volumes/keybase/private/work,personal is shown as an alias, and I cannot open the folder to see its contents. On the other hand I can easily access the folder from the terminal, from the desktop and mobile client apps.

macOS 10.14.6

Am I missing something?

Thanks in advance for any help you will offer.

Gabriele

strib commented 4 years ago

If you do a keybase log send after trying to look at the folder from "personal", and post the resulting ID here, I can take a look to see if anything stands out.

When you say you can access it from the terminal, do you mean with the keybase fs commands, or do you mean directly via the /Volumes/Keybase file system? If the latter, then it seems like it might be a Finder bug of some kind...

NetRelay commented 4 years ago

Thanks for the prompt reply!

The two Keybase accounts are named "nr1" and "musico" (although I wrote "personal" and "work"). From "nr1" I cannot access private/nr1,musico from the Finder. From "musico" I just works.

From the terminal I mean:

$ ls -lha /Volumes/Keybase\ \(gabriele\)/private/nr1\,musico/
total 336577
drwx------  1 gabriele  wheel   231B Dec  1 08:51 .
dr-x------  1 gabriele  wheel     0B Dec  2 07:19 ..
-rw-------  1 gabriele  wheel   164M Dec  1 08:51 report.pdf
------------
Success! Your log ID is:

  5ad89c8429999cabdd38db1c

Here's a URL to submit new bug reports containing this ID:

  https://github.com/keybase/client/issues/new?body=[write%20something%20useful%20and%20descriptive%20here]%0A%0Amy%20log%20id:%205ad89c8429999cabdd38db1c

Thanks!
------------
NetRelay commented 4 years ago

Sorry, I meant the opposite:

From "musico" I cannot access private/nr1,musico from the Finder. From "nr1" it just works.

strib commented 4 years ago

Thanks for providing more info. Super weird. Nothing is sticking out to me in the log -- can you post exactly what error you're seeing in the finder when you try to click through to the folder?

I'm also curious what happens when you click the "Show in Finder" icon in the upper right corner of the Keybase app when you have the folder open in there.

NetRelay commented 4 years ago

I prepared a small screencast, hope this helps… :-)

https://musico.keybase.pub/keybase.mp4

TIA Gabriele

strib commented 4 years ago

Thanks that's helpful. But it's pretty weird behavior. I guess maybe there is some kernel invalidation call we're missing on a user switch.

What happens if you are signed in as musico, then completely quit the Keybase app (including the file system), and then restart Keybase. Does it work as expected in that case, until the point where you sign in as nr1 and then back into musico?

strib commented 4 years ago

I was able to reproduce this myself. However, I have triple-checked that we're sending all the right calls up to the kernel as far as I can tell when the user changes. This seems to be a bug in Finder itself, where it caches the old link to a folder whose names has changed (in this case, from mr1,musico to musico,nr1) even though KBFS has invalidated it. Unfortunately I can't think of anything else we can do to force it to update.

The good news is you can still access it from the terminal and from the app -- I guess a (sad) workaround is that if you really need Finder access, you can restart Keybase after switching users and it should work again. Sorry for the bad experience!

NetRelay commented 4 years ago

I can confirm that quitting and relaunching the application from the "buggy profile" will workaround the problem… :-)

chindraba-work commented 4 years ago

My file manager, Dolphin Version 19.11.80, on openSUSE Leap 15.1, in KDE Frameworks 5.64.0, has a similar cache problem. When I log out of the client the /keybase directory remains. Forcing a refresh (F5) solves the issue for me. I suspect that a similar issue would exist if I used multiple accounts and tried to access linked directories. Possibly of help in developing a solution or workaround.