Client: Keybase Install Error - macOS Sierra 10.12.6

Created on 12 Oct 2017  ·  47Comments  ·  Source: keybase/client

My log ID is: 7c5c9f526a3659472f071d1c

screenshot 2017-10-12 at 15 38 04

screenshot 2017-10-12 at 15 38 22

ll ~/Library/LaunchAgents                                                                                                                                            
drwxr-xr-x  13 j42  staff   442B Oct 12 15:38 .
drwx------+ 88 j42  staff   2.9K Aug 22 00:05 ..

No .plist named keybase, and my .plist have -rw-r--r-- 1 j42 staff rights

Anything I could do to help you?

All 47 comments

Yeah, it looks like you do have the right permissions. Let me ask you another question: does your macOS want to reboot to upgrade, and maybe you canceled the reboot?

And a third annoying question I might ask is: does a reboot solve the problem?

Hi! @maxtaco So it's actually not the first time I try to install the Keybase app and it did the same thing last time.
I didn't cancel any upgrade :( and will not switch to HighSierra until mid next year ~.

Well it's an issue that has been reported to us that we can't repro. The causes are usually as stated above.

The problem is that launchctl pretends as if it worked, and then doesn't do anything. We are stumped.

Can you run: launchctl print-disabled system

As a developer myself I know it can be hard to debug some specific issues too 😇

disabled services = {
    "com.apple.ManagedClientAgent.enrollagent" => true
    "com.apple.screensharing" => true
    "com.apple.ftpd" => true
    "com.crashplan.engine" => false
    "com.openssh.sshd" => true
    "at.obdev.littlesnitchd" => false
    "com.apple.mdmclient.daemon.runatboot" => true
    "com.cleverfiles.cfbackd" => false
    "limit.maxproc" => false
    "com.microsoft.office.licensing.helper" => false
    "com.apple.mrt" => false
    "com.apple.stackshot" => false
    "com.apple.bootpd" => true
    "org.apache.httpd" => true
    "limit.maxfiles" => false
    "com.apple.mtmfs" => true
    "com.paragon.NTFS.launch" => false
    "com.bjango.istatmenus.daemon" => false
    "org.ntp.ntpd" => false
    "com.apple.pacemaker" => true
    "com.bjango.istatmenusdaemon" => false
    "com.apple.ftp-proxy" => true
    "org.macosforge.xquartz.privileged_startx" => false
    "com.citrix.ctxusbd" => false
}

ok, we came up empty there, thanks for your help. how about this?

grep launchd /var/log/system.log | grep keybase

Thank you!

Oct 12 15:33:57 Moon com.apple.xpc.launchd[1] (keybase.updater): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:34:27 Moon com.apple.xpc.launchd[1] (keybase.service): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:35:22 Moon com.apple.xpc.launchd[1] (keybase.updater): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:35:52 Moon com.apple.xpc.launchd[1] (keybase.service): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:36:22 Moon com.apple.xpc.launchd[1] (keybase.kbfs): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:36:28 Moon com.apple.xpc.launchd[1] (keybase.updater): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:36:58 Moon com.apple.xpc.launchd[1] (keybase.service): This service is defined to be constantly running and is inherently inefficient.
Oct 12 15:37:28 Moon com.apple.xpc.launchd[1] (keybase.kbfs): This service is defined to be constantly running and is inherently inefficient.

I am having the exact same problem (log ID 4d73ea3f68d28b91490fff1c). No hits at all in /var/log/system.log. Less disabled entries:

disabled services = {
    "org.pqrs.karabiner.karabiner_grabber" => false
    "com.cisco.anyconnect.vpnagentd" => false
    "com.apple.ftpd" => true
    "com.openssh.sshd" => false
    "com.apple.mtmfs" => false
    "org.ntp.ntpd" => false
    "com.apple.locate" => false
    "com.apple.backupd-auto" => false
    "org.macosforge.xquartz.privileged_startx" => false
}

Uptime only 24 days (sudden reboot IIRC); no reboot canceled. Also still on Sierra (10.12.6).

Hi @Jolg42 thanks for all your help with this. Still stumped. This might shed some light:

ps ax | grep -i keybase

to see if there are any processes hanging around and getting in the way.

And the permissions on ~/Library/Group Containers/keybase/Library/Caches and ~/Library/Group Containers/keybase/Library/Caches/Keybase

Thanks for all your help, we'd love to figure this out!!!

@hmeine for you, it looks like the permissions on ~/Library/LaunchAgents are probably set to root.

ps ax | grep -i keybase                                                                                                                                              
12370 s007  R+     0:00.00 grep -i keybase
ll ~/Library/Group\ Containers/keybase/Library/Caches                                                                                                                
total 0
drwx------  3 j42  staff   102B Sep 25 16:12 .
drwx------  3 j42  staff   102B Sep 25 16:12 ..
drwx------  2 j42  staff    68B Sep 25 16:12 Keybase
ll ~/Library/Group\ Containers/keybase/Library/Caches/Keybase                                                                                                        
total 0
drwx------  2 j42  staff    68B Sep 25 16:12 .
drwx------  3 j42  staff   102B Sep 25 16:12 ..

@Jolg42 thanks again...you're helping us check off some theories, but we still haven't figured it out.

If you are still willing to keep trying stuff, this is our next thought. To try to see if launchctl will work manually.

I made a keybase.service.plist file for j42 and put it here:

https://keybase.pub/patrick/keybase.service.plist

If you download that and put it in ~/Library/LaunchAgents then run

launchctl load ~/Library/LaunchAgents/keybase.service.plist

let's see what happens.

If it works, the keybase service will be running. Something like this will show up in ps:

/Applications/Keybase.app/Contents/SharedSupport/bin/keybase -d --log-file=/Users/j42/Library/Logs/keybase.service.log service

If it doesn't work, then it seems like launchd just isn't accepting anything new.

launchctl load ~/Library/LaunchAgents/keybase.service.plist                                                                                                          
/Users/j42/Library/LaunchAgents/keybase.service.plist: Path had bad ownership/permissions

Not working :(

ll /Users/j42/Library/LaunchAgents/keybase.service.plist                                                                                                            
-rw-r--r--  1 j42  staff   1.1K Oct 12 18:08 /Users/j42/Library/LaunchAgents/keybase.service.plist

Aha! This is something. Permissions! How about ll ~/Library/ ?

ll ~/Library/                                                                                                                                                        
total 5592
drwx------+  88 j42  staff   2.9K Aug 22 00:05 .
drwxr-xr-x+ 249 j42  staff   8.3K Oct 12 18:12 ..
-rw-r--r--@   1 j42  staff    22K Oct  3 15:55 .DS_Store
.....

@Jolg42 can you ls -l /Applications/Keybase.app/Contents/SharedSupport/bin please?

I think the permissions are about the binary it is trying to start.

ls -l /Applications/Keybase.app/Contents/SharedSupport/bin                                                                                                           
total 345152
-rwxr-xr-x@ 1 j42  admin    50M Oct  3 21:40 git-remote-keybase
-rwxr-xr-x@ 1 j42  admin    48M Oct  3 21:40 kbfs
-rwxr-xr-x@ 1 j42  admin   2.9M Oct  3 21:40 kbnm
-rwxr-xr-x@ 1 j42  admin    54M Oct  3 21:40 keybase
-rwxr-xr-x@ 1 j42  admin    14M Oct  3 21:40 updater

Ok a few more ls -l for you:

ls -l /tmp
ls -l /private/

I'm looking for the permissions on /tmp which is the working directory specified in the plist. On mac, it usually links to /private/tmp, so want to check the permissions on that directory as well.

I tried changing them on my computer and they caused launchctl to fail silently (like we see in the logs) so this might be the permission problem. When working, mine look like:

> ls -l /tmp
lrwxr-xr-x@ 1 root  wheel  11 Oct 12  2016 /tmp -> private/tmp
> ls -l /private/
total 0
drwxrwxrwt    7 root  wheel   238 Oct 12 10:14 tmp

Thanks again, you've been very helpful and patient!

Might as well include permissions on ~/Library/Logs as well...

Here it is

ls -l /tmp                                                                                                                                                           
lrwxr-xr-x@ 1 root  wheel    11B Jun  3 12:07 /tmp -> private/tmp
ll /private/                                                                                                                                                         
total 0
drwxr-xr-x@   6 root  wheel   204B Jun  3 12:08 .
drwxr-xr-x   33 root  wheel   1.2K Oct  9 14:53 ..
drwxr-xr-x  127 root  wheel   4.2K Oct 12 20:27 etc
drwxr-xr-x    2 root  wheel    68B Oct 15  2016 tftpboot
drwxrwxrwt   61 root  wheel   2.0K Oct 12 20:27 tmp
drwxr-xr-x   26 root  wheel   884B Jul 21 19:09 var



md5-978137e492cadf0d7766233464c04fca



ll ~/Library/Logs/                                                                                                                                                  
total 1851440
drwxrwxrwx+ 200 j42   staff   6.6K Oct 12 14:45 .
drwx------+  88 j42   staff   2.9K Aug 22 00:05 ..
......

Thanks, you're a trooper...still haven't found anything wrong with your permissions!

~/Library/Application Support

and

~/Library/Application Support/Keybase

do you own those as well?

Some permissions again 😃

ll ~/Library/Application\ Support                                                                                                                                    
total 248
drwx------@ 244 j42  staff   8.1K Oct 12 18:16 .
drwx------+  88 j42  staff   2.9K Aug 22 00:05 ..
....
ll ~/Library/Application\ Support/Keybase/                                                                                                                           
total 64
drwxr-xr-x   17 j42  staff   578B Oct 12 18:11 .
drwx------@ 244 j42  staff   8.1K Oct 12 18:16 ..
-rw-r--r--@   1 j42  staff   6.0K Jul 20 21:01 .DS_Store
drwx------    7 j42  staff   238B Sep  6 20:10 GPUCache
lrwxr-xr-x    1 j42  staff     8B Sep  6 20:11 Keybase -> /keybase
drwx------    2 j42  staff    68B Sep  6 20:10 Local Storage
-rw-------    1 j42  staff    69B Sep  6 20:10 Preferences
-rw-r--r--    1 j42  staff   212B Oct 12 18:11 app-state.json
-rw-------    1 j42  staff   281B Mar 13  2016 config.json
-rw-r--r--    1 j42  staff     2B Oct 12 18:11 finder_position.config
drwx------    4 j42  staff   136B Sep 25 16:12 kbfs_block_cache
drwx------    2 j42  staff    68B Sep 25 16:12 kbfs_journal
drwx------    4 j42  staff   136B Sep 25 16:12 kbfs_sync_cache
drwxr-xr-x    7 j42  staff   238B Sep 25 16:12 keybase.chat.leveldb
drwxr-xr-x   15 j42  staff   510B Sep 25 16:12 keybase.leveldb
-rw-------    1 j42  staff   692B Mar 13  2016 secretkeys.jolg42.mpack
drwxr-xr-x    7 j42  staff   238B Sep 25 16:12 synced_tlf_config

@Jolg42 forgot to ask, can you echo $USER?

and I have a theory! Maybe permissions are not too closed, but rather too open. How about:

chmod 0770 ~/Library/Logs

For me I have:

[max@piave ~/src/keybase/keybase ] ls -las ~/Library/Logs/ | head
total 2401888
     0 drwx------+ 74 max  staff       2516 Oct 12 14:34 .
     0 drwx------@ 64 max  staff       2176 Dec 30  2016 ..
echo $USER                                                                                                                                                           
j42

After chmod 0770 ~/Library/Logs

ls -las ~/Library/Logs/ | head                                                                                                                                       
total 1851480
    0 drwxrwx---+ 200 j42   staff   6.6K Oct 12 14:45 .
    0 drwx------+  88 j42   staff   2.9K Aug 22 00:05 ..

Launched the app but still stuck...!
screenshot 2017-10-12 at 21 01 24
screenshot 2017-10-12 at 21 01 55

Still shooting in the dark, but:

ls -l /usr/local/bin/keybase

maybe that's not a symlink to the one in the application bundle.

@patrickxb Wow, that was a quick correct diagnosis from very few information; I guess you have a lot of bad experience with that already. :-(
FWIW, in my case the culprit could be LastPass:

ll ~/Library/LaunchAgents
total 16
-rw-r--r--  1 root    staff  444 30 Mai 09:12 com.lastpass.LastPassHelper.plist
-rw-r--r--@ 1 hmeine  staff  677 26 Jul 10:13 org.virtualbox.vboxwebsrv.plist

@hmeine yes, we've seen it before. And LastPass has been the culprit before. Fortunately, this error shows up in the logs, so it's easy to diagnose...

@patrickxb

ls -l /usr/local/bin/keybase                                                                                                                                         
lrwxr-xr-x  1 j42  admin    60B Sep  6 20:10 /usr/local/bin/keybase -> /Applications/Keybase.app/Contents/SharedSupport/bin/keybase

Urgh.

Well, we could try this:

sudo fs_usage | grep -i keybase > ~/keybase_fs_usage

in another terminal window, try the launchctl load ~/Library/LaunchAgents/keybase.service.plist

should see every file it's trying to access...

Note the ^edit^ to the above

FWIW, I'm experiencing this trouble also. New computer, trying to install/setup keybase. I downloaded & installed (copied) the app, v1.0.33. My log ID is: 0fd432590a077e115d5eeb1c

I've tried your LaunchAgent plist (changing the username to my own, and Keybase.app path to where I've got it: in Utilities)… and after loading that, then had the background process running!

[mario:~] $ pgrep -fl keyb
1767 /Applications/Utilities/Keybase.app/Contents/SharedSupport/bin/keybase -d --log-file=/Users/mario/Library/Logs/keybase.service.log service

Once that was running, keybase CLI commands no longer were producing errors, and I was able to login… and then add the computer to my account.

However, I'm still unable to use the desktop app. It just gives the error that @Jolg42 first reported on this issue.

Brand new machine, same issue - my log id: 23fb3e7c31f1141e5f84a11c

I also have LastPass installed. Will be rebooting shortly to see if that changes anything. :)

@roens which error is that?

@abl, any update? CAn you check those permissions?

@Jolg42 there's one other thing that might help if this is indeed a permissions issue:

find ~/Library \! -user j42 -print

This should find all the files in ~/Library or below that you don't own. There are a few subdirectories that Keybase tries to write to (Logs, Application Support, Group Containers, Caches, LaunchAgents).

If that command has any output that you think might be related to the above directories or has keybase in it, that could be the issue.

@maxtaco, sorry, the error I was referring to as still seeing is the "Keybase Install Error" that @Jolg42 initially shared screenshot of.

@roens what are the permissions on your LaunchAgents directory?

ls -lsa ~/Library | grep LaunchAgents

Hi @patrickxb

find ~/Library \! -user j42 -print

Didn't output anything related to Keybase.

But more surprisingly, I just tried to open the Keybase app a few minutes ago and it works!🎉

The only change I noticed is that when it wasn't working my Mac Notifications were off, they seems to be on again... They annoy me a lot, I tried to put Do Not Disturb Mode on, it works for a while but every day it's going off magically..
It's weird because each time I set it like this
screenshot 2017-10-20 at 17 37 08
And normally it should not change, and everyday it goes back to the 22:00 to 07:00 default.

At least Keybase works now 😉

@Jolg42 I'm glad it's working...I wish we figured out why it wasn't.

I can't imagine it has anything to do with notifications, but at this point anything is possible.

Just for posterity, would you mind doing another keybase log send so maybe we can see what fixed it?

Thanks!!!

@patrickxb Indeed...!

Log ID 192ea988e22eede951f49d1c

And thanks again for your help 👍

@maxtaco…

[mario:~] $ ls -lsa ~/Library | grep LaunchAgents
0 drwxr-xr-x    4 root   staff    136 Oct 14 18:31 LaunchAgents/

@roens that is your problem. Some program like LastPass corrupted the permissions on your machine. You can do this to fix it:

sudo chown $USER:staff ~/Library/LaunchAgents

Assuming you're not root.. That should fix it...

@maxtaco…
🎉 Indeed, you are correct. Sorry for the hassle, and thanks for the help! I'm now able to use the Keybase gui app on this computer.

@maxtaco I was having this issue on macOS High Sierra (10.13) and this fix helped me. Thanks!

sudo chown $USER:staff ~/Library/LaunchAgents

ok thanks for the info @naturaln0va

our next installer with perform this fix if the user allows it (since it requires privilege escalation).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OJFord picture OJFord  ·  31Comments

maple3142 picture maple3142  ·  106Comments

sbromberger picture sbromberger  ·  47Comments

Binnette picture Binnette  ·  31Comments

Gastove picture Gastove  ·  33Comments