keybase / client

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

Cannot access KBFS - MacOS (helper not installing?) #8905

Open jscheel opened 6 years ago

jscheel commented 6 years ago

I cannot access my folder on my osx device. I've completely removed every trace of keybase, including everything in Application Support, re-verified by laptop as a new device, restarted my computer, etc. Whenever I go to folders, it says that my "Keybase folders are not currently showing up in finder." Then I get a prompt to install the Keybase helper. Every time I enter my password, it just shows the install message again. I cannot get this to install.

jscheel commented 6 years ago

Here's the logs after entering my password to install the helper:

2017-10-07T14:27:06.351385-05:00 ▶ [DEBU keybase install_darwin.go:869] 734 Output ([--debug --run-mode=prod --app-path=/Applications/Keybase.app --timeout=10 --install-helper]): 10.07.2017 14:26:37.153 Installer:54[DEBG] Version: 1.1.59
10.07.2017 14:26:37.169 KBInstaller:27[DEBG] Installables: (
    "Privileged Helper"
)
10.07.2017 14:26:37.169 KBInstaller:32[DEBG] Install: Privileged Helper
10.07.2017 14:26:37.169 KBHelperTool:73[INFO] Connecting to keybase.Helper (privileged=1)
10.07.2017 14:26:37.169 KBHelperTool:73[INFO] Connected
10.07.2017 14:26:37.169 KBHelperTool:73[INFO] Connection invalid, clearing connection
10.07.2017 14:26:37.170 KBHelperTool:73[INFO] Cleared connection
10.07.2017 14:26:37.170 KBHelperTool:73[INFO] Retrying (attempt=1, requestId=0) after XPC error: Error Domain=MPMessagePack Code=-10 "XPC Error: Connection invalid" UserInfo={NSLocalizedDescription=XPC Error: Connection invalid, NSLocalizedRecoveryOptions=(
    OK
)}
10.07.2017 14:26:37.670 KBHelperTool:73[INFO] Connecting to keybase.Helper (privileged=1)
10.07.2017 14:26:37.670 KBHelperTool:73[INFO] Connected
10.07.2017 14:26:37.670 KBHelperTool:73[INFO] Connection invalid, clearing connection
10.07.2017 14:26:37.670 KBHelperTool:73[INFO] Retrying (attempt=2, requestId=0) after XPC error: Error Domain=MPMessagePack Code=-10 "XPC Error: Connection invalid" UserInfo={NSLocalizedDescription=XPC Error: Connection invalid, NSLocalizedRecoveryOptions=(
    OK
)}
10.07.2017 14:26:37.670 KBHelperTool:73[INFO] Cleared connection
10.07.2017 14:26:38.232 KBHelperTool:73[INFO] Connecting to keybase.Helper (privileged=1)
10.07.2017 14:26:38.232 KBHelperTool:73[INFO] Connected
10.07.2017 14:26:38.232 KBHelperTool:73[INFO] Connection invalid, clearing connection
10.07.2017 14:26:38.232 KBHelperTool:73[INFO] Retrying (attempt=3, requestId=0) after XPC error: Error Domain=MPMessagePack Code=-10 "XPC Error: Connection invalid" UserInfo={NSLocalizedDescription=XPC Error: Connection invalid, NSLocalizedRecoveryOptions=(
    OK
)}
10.07.2017 14:26:38.232 KBHelperTool:73[INFO] Cleared connection
10.07.2017 14:26:38.806 KBHelperTool:73[INFO] Connecting to keybase.Helper (privileged=1)
10.07.2017 14:26:38.806 KBHelperTool:73[INFO] Connected
10.07.2017 14:26:38.806 KBHelperTool:73[INFO] Max attempts reached (4 >= 4)
10.07.2017 14:26:38.806 KBHelperTool:73[INFO] Connection invalid, clearing connection
10.07.2017 14:27:06.287 KBHelperTool:159[DEBG] Removing /Library/PrivilegedHelperTools/keybase.Helper
10.07.2017 14:27:06.302 KBHelperTool:168[DEBG] Installing helper tool via SMJobBless
10.07.2017 14:27:06.325 KBHelperTool:173[DEBG] Failed, retrying
10.07.2017 14:27:06.343 KBInstaller:45[INFO] Install complete
10.07.2017 14:27:06.344 KBInstaller:49[INFO] Privileged Helper: Install Error: The operation couldn’t be completed. (CFErrorDomainLaunchd error 9.)
Error: XPC Error: Connection invalid
Error, Bundle Version: 1.0.29
10.07.2017 14:27:06.346 KBHelperTool:73[INFO] Cleared connection
10.07.2017 14:27:06.346 Installer:94[INFO] Exit(1)
2017-10-07T14:27:06.351501-05:00 ▶ [ERRO keybase standard.go:232] 735 Error installing Helper: exit status 1
2017-10-07T14:27:06.351573-05:00 ▶ [INFO keybase install_darwin.go:836] 736 Installing KBFuse
jscheel commented 6 years ago

Ok, tried manually creating /keybase and restarted client. Got an error saying that installing kbfs failed (which is odd, because before it said that kbfs was running when I checked keybase status).

Log: 68eba715b862316e0294141c

jscheel commented 6 years ago

So, I'm thinking this is happening because I was debugging a kernel panic a while ago. I unloaded the keybase helper launchdaemon with the -w flag, which disabled subsequent loads of the helper. I think this is now preventing the helper from running properly. I've tries loading the helper again, with -w, but launchctl seems to be fighting me on this.

jscheel commented 6 years ago

Yep, this solved my problem. Here are the steps:

  1. launchctl print-disabled system
  2. keybase listed as permanently disabled (though this type of disabling lets launchctl pretend that it is loaded
  3. sudo launchctl load -w /Library/LaunchDaemons/keybase.Helper.plist
  4. sudo rm /Library/PrivilegedHelperTools/keybase.Helper
  5. sudo rm /Library/LaunchDaemons/keybase.Helper.plist
  6. keybase install --components=helper or keybase install --components=helper,fuse,mountdir,kbfs if you need everything

For reference: this is what gave it away CFErrorDomainLaunchd error 9. That error means that the agent is disabled by launchctl. Maybe Keybase could look for this error in the stdout/stderr during install and tell users how to fix. It's a pretty random edge-case though.