Watchman: `watchman version` hangs (macOS, installed via brew)

Created on 26 Sep 2016  路  12Comments  路  Source: facebook/watchman

OS: macOS 10.12 (16A323)

$ watchman -v
4.7.0

$ brew -v
Homebrew 1.0.4-7-g6e57355
Homebrew/homebrew-core (git revision e741; last commit 2016-09-26)

When run watchman version - watchman hangs
screen shot 2016-09-26 at 14 06 26

Most helpful comment

All 12 comments

Same.

OS: El Capitan (10.11.6)
Watchman: 4.7.0
Brew: 1.0.4

Remove then install did not resolve.

amur@amur-mac:~$ launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
amur@amur-mac:~$ watchman version

Still hangs

I then uninstalled and reinstalled watchman using homebrew. Actually, I think watchman was uninstalled prior to unloading but it shouldn't matter.

Weird. Can you try adding the -F flag:

launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist

If it is still hanging after that, I'd like you to collect some diagnostics:

  • What does Console.app mention about watchman?
  • What watchman process(es) are running?
  • Please use Activity Monitor to "sample" any running watchman processes and attach the samples here

With -F flag still hangs

In Console when run watchman version add only this event:

screen shot 2016-09-28 at 21 53 48

ps ax | grep watchman:

~$ ps ax | grep watchman
 2978 s016  S+     0:00.02 /usr/local/Cellar/watchman/4.7.0/libexec/bin/watchman version
 3067 s017  S+     0:00.00 grep watchman
~$ 

Samples: watchman-samples.txt

Weird. Can you try adding the -F flag:

launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist

seems to address the hang for me, which started after the first restart of my system in a long time..

seems to address the hang for me, which started after the first restart of my system in a long time
This does not helps for me.

This happened to me when I upgraded watchman from 4.6.0 to 4.7.0 using Homebrew and ran brew clean.

I restarted the system many days later after upgrading to Safari 10 but the path in the plist was still /usr/local/Cellar/watchman/4.6.0/libexec/bin/watchman, which doesn't exist, instead of /usr/local/Cellar/watchman/4.7.0/libexec/bin/watchman.

Doing the launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist (outside of tmux) and then watchman version fixed the issue.

This is a duplicate of #358

Helps to me:

  1. Run launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist outside of tmux
  2. Run watchman version outside of tmux

Thank you, @ryankask!

For letting watchman version work within tmux, you can use a plugin like tmux-MacOSX-pasteboard.

Simply install with brew

$ brew install reattach-to-user-namespace

and then add something like this to your .tmux.conf

set-option -g default-command "reattach-to-user-namespace -l zsh"

then just restart your tmux sessions

$ tmux kill-server
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ideahitme picture ideahitme  路  5Comments

rongliangduan picture rongliangduan  路  3Comments

akabab picture akabab  路  5Comments

export-mike picture export-mike  路  4Comments

artem-solovev picture artem-solovev  路  4Comments