facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

Error disables mercurial support, but actual error isn't shown #874

Closed bitranch closed 7 years ago

bitranch commented 7 years ago
  1. Install nuclide in atom
  2. Error on startup
  3. Mercurial (hg) support is disabled

The traceback has a "logAndThrowHgError" which implies it's logging an hg error, but I can't find any location where that error is written.

Atom Version: 1.12.0 Electron Version: 1.3.6 System: Mac OS X 10.11.6 Thrown From: nuclide package, v0.181.0

Stack Trace

Uncaught Error

At /Users/bill/.atom/packages/nuclide/node_modules/rxjs/bundles/Rx.min.js:145

Error
    at logAndThrowHgError (/Users/bill/.atom/packages/nuclide/pkg/nuclide-hg-rpc/lib/hg-utils.js:149:11)
    at /Users/bill/.atom/packages/nuclide/pkg/nuclide-hg-rpc/lib/hg-utils.js:37:7
    at next (<anonymous>)
    at step (/Users/bill/.atom/packages/nuclide/node_modules/async-to-generator/async-to-generator.js:11:30)
    at /Users/bill/.atom/packages/nuclide/node_modules/async-to-generator/async-to-generator.js:21:13
    at process._tickCallback (internal/process/next_tick.js:103:7)

Commands

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig",
        ".hgrc",
        ".config"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "destroyEmptyPanes": false,
    "disabledPackages": [
      "python-isort",
      "language-python",
      "tree-view"
    ],
    "telemetryConsent": "limited",
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "nuclide": {
    "nuclide-arcanist": {},
    "nuclide-buck": {
      "compileErrorDiagnostics": false
    },
    "nuclide-buck-files": {},
    "nuclide-console": {},
    "nuclide-datatip": {},
    "nuclide-distraction-free-mode": {
      "hideToolBar": true
    },
    "nuclide-flow": {},
    "nuclide-format-js": {},
    "nuclide-hack": {},
    "nuclide-health": {},
    "nuclide-home": {
      "showHome": false
    },
    "nuclide-ios-simulator-logs": {},
    "nuclide-ocaml": {},
    "nuclide-output": {},
    "nuclide-python": {
      "pathToPython": "/usr/local/bin/python2.7"
    },
    "nuclide-react-native": {},
    "nuclide-working-sets": {
      "workingSets": [
        {
          "name": "folio2",
          "active": false,
          "uris": [
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/afp-folio-siteload",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/apa-folio-siteload",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/apics-folio-siteload",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/application",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/collections",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/dates",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/folio-default-config",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/folio-plugins",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/folio-services",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/getmodule",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/hc-dstore",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/hc-ui",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/lpl",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/patches",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/permissions",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/rdi",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/site-init",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/socket",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/timesync",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/timing",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/typings",
            "/Volumes/jupiter/holmescorp/js-builds/typescript/folio2/uuid"
          ]
        },
        {
          "name": "epubjs",
          "active": true,
          "uris": [
            "/j2/holmescorp/js-builds/typescript/epubjs"
          ]
        },
        {
          "name": "lcs-python",
          "active": false,
          "uris": [
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.content.am",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.content.announcements",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.content.rubric",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.context",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.db.orm",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.formproc",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.imisproc",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.landingpage",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.lcctrak.base",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.learningpath.router",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.lpl.base",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.progression.base",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.progression.flashcard",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.progression.lockedexam",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.progression.questionfeedback",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.quiz.result",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.quiz.router",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.server.cdpbase",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.server.cdppush",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.server.foliobase",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.service.announcements",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.service.lcctrak",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.service.learningpath",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.service.quiz",
            "/Volumes/jupiter/holmescorp/packages/lcs/lcs.utils"
          ]
        }
      ]
    },
    "use": {
      "nuclide-arcanist": false,
      "nuclide-buck": false,
      "nuclide-debugger": false,
      "nuclide-debugger-php": false,
      "nuclide-hack": false,
      "nuclide-hhvm": false,
      "nuclide-home": false,
      "nuclide-objc": false,
      "nuclide-ocaml": false,
      "nuclide-react-inspector": false,
      "nuclide-react-native": false,
      "nuclide-react-native-inspector": false,
      "nuclide-remote-atom": false,
      "nuclide-remote-ctags": false,
      "nuclide-remote-projects": false,
      "nuclide-swift": false
    }
  }
}

Installed Packages

# User
.bin, vundefined (inactive)
atom-beautify, v0.29.13 (inactive)
atom-typescript, v10.1.12 (active)
docblockr, v0.8.7 (active)
editorconfig, v2.0.5 (active)
language-ini, v1.16.0 (active)
language-pegjs, v0.5.0 (active)
linter, v1.11.18 (active)
linter-python-pyflakes, v0.1.0 (active)
MagicPython, v0.5.17 (active)
nuclide, v0.181.0 (active)
pretty-json, v1.6.1 (active)
python-indent, v1.0.0 (active)
sorter, v0.1.2 (inactive)
Stylus, v3.1.0 (active)
tool-bar, v1.0.1 (active)
atom-dark-syntax, v0.27.0 (active)
atom-dark-ui, v0.52.0 (active)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.45.0 (inactive)
base16-tomorrow-dark-theme, v1.3.0 (inactive)
base16-tomorrow-light-theme, v1.3.0 (inactive)
one-dark-ui, v1.6.2 (inactive)
one-light-ui, v1.6.2 (inactive)
one-dark-syntax, v1.5.0 (inactive)
one-light-syntax, v1.5.0 (inactive)
solarized-dark-syntax, v1.0.5 (inactive)
solarized-light-syntax, v1.0.5 (inactive)
about, v1.7.0 (active)
archive-view, v0.62.0 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.13.1 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.4 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.42.0 (active)
bracket-matcher, v0.82.2 (active)
command-palette, v0.39.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.40.0 (active)
find-and-replace, v0.202.0 (inactive)
fuzzy-finder, v1.4.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.2 (active)
image-view, v0.60.0 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.2 (inactive)
markdown-preview, v0.158.8 (active)
metrics, v1.1.1 (active)
notifications, v0.65.1 (active)
open-on-github, v1.2.1 (inactive)
package-generator, v1.0.1 (inactive)
settings-view, v0.243.1 (active)
snippets, v1.0.3 (active)
spell-check, v0.68.4 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.2 (active)
symbols-view, v0.113.1 (inactive)
tabs, v0.103.0 (active)
timecop, v0.33.2 (active)
tree-view, v0.210.0 (inactive)
update-package-dependencies, v0.10.0 (active)
welcome, v0.35.1 (active)
whitespace, v0.35.0 (active)
wrap-guide, v0.38.2 (active)
language-c, v0.54.0 (active)
language-clojure, v0.22.1 (active)
language-coffee-script, v0.48.0 (active)
language-csharp, v0.12.1 (active)
language-css, v0.40.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.43.0 (active)
language-html, v0.46.1 (active)
language-hyperlink, v0.16.1 (active)
language-java, v0.24.0 (active)
language-javascript, v0.122.0 (active)
language-json, v0.18.3 (active)
language-less, v0.29.6 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.37.0 (active)
language-php, v0.37.3 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.1 (inactive)
language-ruby, v0.70.2 (active)
language-ruby-on-rails, v0.25.1 (active)
language-sass, v0.57.0 (active)
language-shellscript, v0.23.0 (active)
language-source, v0.9.0 (active)
language-sql, v0.25.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.29.1 (active)
language-toml, v0.18.1 (active)
language-xml, v0.34.12 (active)
language-yaml, v0.27.1 (active)

# Dev
No dev packages
johnislarry commented 7 years ago

@mostafaeweda can you take a look?

mostafaeweda commented 7 years ago

@bitranch could you check Atom console for a more detailed error message? Seems to be there's some hg call failure, could you have an old mercurial installed?

bitranch commented 7 years ago

Where do I find the Atom console? The Nuclide -> console just says "Uncaught Error".

Mercurial is:

% hg --version
Mercurial Distributed SCM (version 3.9.2)
mostafaeweda commented 7 years ago

CMD+ALT+I --> it will open the chrome dev tools

bitranch commented 7 years ago

Looks like it can't find hg:

[2016-11-10T21:11:25.672Z] [ERROR] nuclide - HgService cannot fetch statuses ProcessSystemError: "hg" failed with code ENOENT(…)

The path in its environment is wrong:

PATH: "/usr/bin:/bin:/usr/sbin:/sbin"

That should include "/usr/local/bin" (which is where hg along with almost everything else I use lives). Since it was working until recently, something must have changed either in Atom or in my system. (No major system updates in a while, so...)

zertosh commented 7 years ago

@bitranch, from the Atom console (in the devtools), does process.env.SHELL match the shell you have configured to setup the right PATH? If not, then that's your issue. Atom shells out to your default shell, reads the environment, and patches itself. So if for example, you use zsh and your PATH is set in a .zshrc, but the OS thinks your default is bash - then Atom won't start the right shell, and you won't have the right PATH.

bitranch commented 7 years ago

It's using the correct shell (/bin/tcsh). It seems to only be picking up the global .tcshrc and not the one in my user dir. And I'm starting Atom under my user, so it should be finding the right stuff.

zertosh commented 7 years ago

This is what Atom does to patch the environment https://github.com/atom/atom/blob/master/src/update-process-env.js. I tried /bin/tcsh -ilc command env - which is what Atom does - and that doesn't work. Seems like they don't support, tcsh. I recommend that you file an issue in the Atom repo.

mostafaeweda commented 7 years ago

Mercurial is usually installed in /usr/local/bin/ which I can't find in your PATH - hence causing this error.