Skip to content

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

Closed

Description

@LeezQ

image

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

Activity

  1. ksmithut commented on Mar 30, 2015

    @ksmithut

    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.

  2. amasad commented on Mar 30, 2015

    @amasad
    Contributor

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

  3. LeezQ commented on Mar 31, 2015

    @LeezQ
    Author

    @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

  4. cxfeng1-zz commented on Apr 2, 2015

    @cxfeng1-zz
    Contributor

    same here

  5. chucai commented on Apr 2, 2015

    @chucai

    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"
    }
    
  6. amasad commented on Apr 2, 2015

    @amasad
    Contributor
  7. chucai commented on Apr 3, 2015

    @chucai

    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"
    }
    
  8. amasad commented on Apr 3, 2015

    @amasad
    Contributor

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

  9. chucai commented on Apr 3, 2015

    @chucai

    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
    {}
    
  10. chucai commented on Apr 3, 2015

    @chucai

    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 .

  11. holyspectral commented on Apr 5, 2015

    @holyspectral

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

  12. raichur commented on Apr 18, 2015

    @raichur

    Thanks, @chucai. That solved it for me.

  13. amasad commented on Apr 21, 2015

    @amasad
    Contributor

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

  14. locked as resolved and limited conversation to collaborators on May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions