Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error: Watcher took too long to load] #490

Closed
LeezQ opened this issue Mar 30, 2015 · 13 comments

Comments

@LeezQ
Copy link

commented Mar 30, 2015

image

this error often happen in my computer, how can I avoid this ?

@ksmithut

This comment has been minimized.

Copy link

commented Mar 30, 2015

From the docs try step 5:

brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.

note that brew is a Mac package. If you don't have that already and you're on a mac, see installation instructions here. If you're not on a mac, you'll need to find another way of getting ruby and watchman installed on your computer.

@amasad

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2015

Does it happen only some of the time?
I'll increase the timeout

@amasad amasad added the packager label Mar 30, 2015

@LeezQ

This comment has been minimized.

Copy link
Author

commented Mar 31, 2015

@amasad , yes , some of time ... and I think it's watchman's problem. because when I have no process to run watchman, it also tell me please shut down any existing instances that are already running

@cxfeng1

This comment has been minimized.

Copy link

commented Apr 2, 2015

same here

@chucai

This comment has been minimized.

Copy link

commented Apr 2, 2015

I got the same error on my macbook. Is there any solution to fix it?

I had install watchman in my book.

After I run watchman in my terminal, I got

{
    "error": "invalid command (expected an array with some elements!)",
    "cli_validated": true,
    "version": "3.0.0"
}
@amasad

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2015

@chucai

This comment has been minimized.

Copy link

commented Apr 3, 2015

Hi @amasad,

The solution didn't fix my issue ... 😭

[Error: Watcher took too long to load
Try running `watchman` from your terminal
https://facebook.github.io/watchman/docs/troubleshooting.html]
Error: Watcher took too long to load
Try running `watchman` from your terminal
https://facebook.github.io/watchman/docs/troubleshooting.html
    at null._onTimeout (/Users/xdhe/Documents/projects/react/react-native/HackerNews-React-Native/node_modules/react-native/packager/react-packager/src/FileWatcher/index.js:71:16)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  >>> ERROR: could not create packager - please shut down any existing instances that are already running.

I got the message after I run the command watchman in my terminal.

$ watchman
{
    "error": "invalid command (expected an array with some elements!)",
    "cli_validated": true,
    "version": "3.1.0"
}
@amasad

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2015

@chucai There are some steps here to help you debug facebook/watchman#90 (comment)
cc @wez

@chucai

This comment has been minimized.

Copy link

commented Apr 3, 2015

Hi @amasad & @wez ,

Thanks for you comments. This is my debug log.

1428027461: tid=2142380816 Using watcher mechanism fsevents
1428027461: tid=2142380816 file limit is 256 kern.maxfilesperproc=10240
1428027461: tid=2142380816 raised file limit to 10240
1428027461: tid=2142380816 Using socket from launchd as listening socket
1428027461: tid=2142380816 failed to parse json from /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: unable to open /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: No such file or directory
1428046836: tid=2142380816 Using watcher mechanism fsevents
1428046836: tid=2142380816 file limit is 256 kern.maxfilesperproc=10240
1428046836: tid=2142380816 raised file limit to 10240
1428046836: tid=2142380816 Using socket from launchd as listening socket
1428046836: tid=2142380816 failed to parse json from /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: unable to open /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: No such file or directory
1428047359: tid=2142380816 Using watcher mechanism fsevents
1428047359: tid=2142380816 file limit is 256 kern.maxfilesperproc=20480
1428047359: tid=2142380816 raised file limit to 20480
1428047359: tid=2142380816 Using socket from launchd as listening socket
1428047359: tid=2142380816 failed to parse json from /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: unable to open /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: No such file or directory
1428047413: tid=2142380816 Using watcher mechanism fsevents
1428047413: tid=2142380816 file limit is 256 kern.maxfilesperproc=20480
1428047413: tid=2142380816 raised file limit to 20480
1428047413: tid=2142380816 Using socket from launchd as listening socket
1428047413: tid=2142380816 failed to parse json from /usr/local/Cellar/watchman/HEAD/var/run/watchman/xdhe.state: '[' or '{' expected near end of file
1428047495: tid=2142380816 Using watcher mechanism fsevents
1428047495: tid=2142380816 file limit is 256 kern.maxfilesperproc=20480
1428047495: tid=2142380816 raised file limit to 20480
1428047495: tid=2142380816 Using socket from launchd as listening socket
1428047536: tid=2142380816 Using watcher mechanism fsevents
1428047536: tid=2142380816 file limit is 256 kern.maxfilesperproc=20480
1428047536: tid=2142380816 raised file limit to 20480
1428047536: tid=2142380816 Using socket from launchd as listening socket

The xdhe.state file is created by myself. Its content is very simple:

#xdhe.state
{}
@chucai

This comment has been minimized.

Copy link

commented Apr 3, 2015

I fixed my issue with the following commands.

brew uninstall watchman

brew install --HEAD watchman 

watchman watch-list 

sudo chmod +x /usr/local/Cellar/watchman/HEAD/bin/watchman

Thanks @amasad .

@holyspectral

This comment has been minimized.

Copy link

commented Apr 5, 2015

I had the same issue, but later I found somehow /Users/XXX/Library/LaunchAgents/ is belonged to root.
After chown, everything works.

@raichur

This comment has been minimized.

Copy link

commented Apr 18, 2015

Thanks, @chucai. That solved it for me.

@amasad

This comment has been minimized.

Copy link
Contributor

commented Apr 21, 2015

Seems to be resolved, closing for now. Feel free to reopen if you're still seeing the issue.

@amasad amasad closed this Apr 21, 2015

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants
You can’t perform that action at this time.