keybase / client

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

KBFS file greyed out after moving to private folder #6848

Open davidmytton opened 7 years ago

davidmytton commented 7 years ago

OS X 10.12.4 (16E195) my log id: 5a3a6263959aa76340e8d61c

  1. Copy a file into /keybase/private/username/
  2. The file appears to be successfully copied
  3. Notification appears: encrypting and uploading
  4. After a few moments, the file becomes greyed out

Double clicking the file to open it has no effect within the keybase folder. Copying it to desktop does work, although there is a warning that the file is in use.

The file appears on other devices in the same greyed out state. screen shot 2017-05-03 at 09 03 28

strib commented 7 years ago

HI @dmytton, thanks for the report. That's super weird. I don't see much of interest in the log, except that the Apple metadata file (._david.mobileconfig) is deleted by something on your device shortly after the main file is created. To my knowledge that's not common, I thought it was supposed to be long-lived, but I might be wrong. It's possible we handle that quick removal a little badly (I have fixes for similar issues under review now, but not yet in a release).

Maybe you can try some of the tips listed here or here to see if they help? I'm specifically interested in what the extended attributes look like (xattr -l david.mobileconfig), and also the mtime/ctime from stat david.mobileconfig. Thanks!

davidmytton commented 7 years ago
dm-mbp:davidmytton david$ xattr -l david.mobileconfig
com.apple.FinderInfo:
00000000  62 72 6F 6B 4D 41 43 53 00 00 00 00 00 00 00 00  |brokMACS........|
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00000020
dm-mbp:davidmytton david$ stat david.mobileconfig
838860804 7067333765536193367 -rw------- 1 david wheel 0 9417 "May  3 11:36:43 2017" "May  3 08:57:34 2017" "May  3 08:58:16 2017" "May  3 11:36:43 2017" 16777216 19 0 david.mobileconfig
dm-mbp:davidmytton david$ GetFileInfo david.mobileconfig 
file: "/keybase/private/davidmytton/david.mobileconfig"
type: "brok"
creator: "MACS"
attributes: avbstclinmedz
created: 01/01/1904 00:00:00
modified: 05/03/2017 08:57:34

Trying to SetFile -d had no effect:

dm-mbp:davidmytton david$ SetFile -d 05/03/2017 david.mobileconfig 
dm-mbp:davidmytton david$ GetFileInfo david.mobileconfig 
file: "/keybase/private/davidmytton/david.mobileconfig"
type: "brok"
creator: "MACS"
attributes: avbstclinmedz
created: 01/01/1904 00:00:00
modified: 05/03/2017 08:57:34

However, using xattr did fix it:

dm-mbp:davidmytton david$ xattr -d com.apple.FinderInfo david.mobileconfig 
dm-mbp:davidmytton david$ GetFileInfo david.mobileconfig 
file: "/keybase/private/davidmytton/david.mobileconfig"
type: "\0\0\0\0"
creator: "\0\0\0\0"
attributes: avbstclinmedz
created: 01/01/1904 00:00:00
modified: 05/03/2017 08:57:34

I sent a new log file after making these changes above: c4b9e5f8b2f764781883d61c