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

Projects
None yet
8 participants
@LeezQ

LeezQ commented Mar 30, 2015

image

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

@ksmithut

This comment has been minimized.

Show comment
Hide comment
@ksmithut

ksmithut 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.

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.

Show comment
Hide comment
@amasad

amasad Mar 30, 2015

Contributor

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

Contributor

amasad 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.

Show comment
Hide comment
@LeezQ

LeezQ 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

LeezQ 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.

Show comment
Hide comment
@cxfeng1

cxfeng1 Apr 2, 2015

same here

cxfeng1 commented Apr 2, 2015

same here

@chucai

This comment has been minimized.

Show comment
Hide comment
@chucai

chucai 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"
}

chucai 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.

Show comment
Hide comment
@chucai

This comment has been minimized.

Show comment
Hide comment
@chucai

chucai 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"
}

chucai 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.

Show comment
Hide comment
@amasad

amasad Apr 3, 2015

Contributor

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

Contributor

amasad 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.

Show comment
Hide comment
@chucai

chucai 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 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.

Show comment
Hide comment
@chucai

chucai 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 .

chucai 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.

Show comment
Hide comment
@holyspectral

holyspectral 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.

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.

Show comment
Hide comment
@raichur

raichur Apr 18, 2015

Thanks, @chucai. That solved it for me.

raichur commented Apr 18, 2015

Thanks, @chucai. That solved it for me.

@amasad

This comment has been minimized.

Show comment
Hide comment
@amasad

amasad Apr 21, 2015

Contributor

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

Contributor

amasad 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.