ember-cli / ember-cli

The Ember.js command line utility.

Home Page:https://cli.emberjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ember CLI hangs with watchman 4.7.0

timiyay opened this issue · comments

watchman 4.7.0 was recently released, and the Homebrew formula updated. Once I pulled down this update, the embercommand stopped working.

Running any ember command would hang indefinitely.

The workaround was to brew uninstall watchman.


Output from ember version --verbose && npm --version:

# note that this command would hang while watchman 4.7.0 was installed
# this is the output after uninstalling watchman

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.8.0
http_parser: 2.7.0
node: 4.5.0
v8: 4.5.103.37
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2h
os: darwin x64
3.10.6

@timiyay Unfortunately for you this works for me with a matching set of output. I'm going to suggest the stereotypical "have you tried rebooting?" I don't suspect that this is something we're going to be able to help you with. Try reverting to your last known good version of Watchman?

I'm closing this as this isn't likely going to be an Ember CLI issue and nothing we're able to do anything about. Please stop by #-help in the Ember Community Slack and see if maybe anybody else in the community has encountered something like this.

Feel encouraged to reopen it if upon further investigation on your side you discover that it may in fact be a bug. In the mean time we will still continue to receive notifications from any followup comments on this issue; being closed doesn't mean that we're ignoring the thread.

All good @nathanhammond. My assumption is that this is watchman's issue too. I was hoping that an ember-cli contributor might have a comment on how watchman could be causing this, so I could then open a useful ticket against watchman.

And yes, downgrading to watchman 4.6 fixes the issue. It's a PITA for a Homebrew user, which only tracks the latest version of everything, but not the worst thing ever.

I haven't any idea, and I suspect that it's not Ember CLI but some compounding configuration issue on your machine. We simply consume information from Watchman. Maybe @stefanpenner has better ideas?

Similar result here with 4.7.0 and I also had to backdown to 4.6.0. Recent installation of everything:

ember-cli: 2.6.2
node: 4.5.0
os: darwin x64

OS X Yosemite

likely best to open an issue on the watchman repo, not sure we can do much from our side.

Please open a separate watchman issue and be sure to include your watchman logs and to search the console.app logs for watchman related messages.

@wez et al, if it turns out we are doing something wrong. Don't hesitate to let us know, we will work to address :)

Follow-up from an informative comment the aforementioned watchman issue:

I solved it by deleting the <PREFIX>/var/run/watchman/<USER>-state folder (If you installed it with Homebrew, it should be /usr/local/var/run/watchman/).

You should not do that till you've saved a copy of the state directory, however, as that includes data that may be helpful as they're debugging this.

@chriskrycho nice, thanks for sharing.

OK, the workaround for this is:

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

which should output something like this:

/Users/YOURUSERNAMEHERE/Library/LaunchAgents/com.github.facebook.watchman.plist: Could not find specified service
{
    "version": "4.7.0"
}

and then things should be working again.

@wez thankyou for all the work, and sorry for not going straight to the watchman repo. The lack of console output mean I was a bit gun-shy, as I had nothing to show.

brew uninstall watchman --force && brew install watchman fixed this for me

Can we replace watchman with others? its full of errors/

@v3ss0n although it has issues, it tends to have less issues then the alternatives :(.

That being said, for some users who choose to want to override we do support passing --watcher flag with the following options:

  • polling
  • watchman
  • node
  • events

This allows the end user to choose what works best for them.