{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/2241","repository_url":"https://api.github.com/repos/Valloric/YouCompleteMe","labels_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/2241/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/2241/comments","events_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/2241/events","html_url":"https://github.com/Valloric/YouCompleteMe/issues/2241","id":165353390,"number":2241,"title":"Time to time tern crashes when using it with YCM","user":{"login":"sassanh","id":1270688,"avatar_url":"https://avatars.githubusercontent.com/u/1270688?v=3","gravatar_id":"","url":"https://api.github.com/users/sassanh","html_url":"https://github.com/sassanh","followers_url":"https://api.github.com/users/sassanh/followers","following_url":"https://api.github.com/users/sassanh/following{/other_user}","gists_url":"https://api.github.com/users/sassanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sassanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sassanh/subscriptions","organizations_url":"https://api.github.com/users/sassanh/orgs","repos_url":"https://api.github.com/users/sassanh/repos","events_url":"https://api.github.com/users/sassanh/events{/privacy}","received_events_url":"https://api.github.com/users/sassanh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-13T15:40:34Z","updated_at":"2016-07-13T16:12:54Z","closed_at":null,"body":"# Issue Prelude\r\n\r\n**Please complete these steps and check these boxes (by putting an `x` inside\r\nthe brackets) _before_ filing your issue:**\r\n\r\n- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.\r\n- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.\r\n- [x] I have read and understood YCM's [README][readme], **especially the\r\n  [Frequently Asked Questions][faq] section.**\r\n- [x] I have searched YCM's issue tracker to find issues similar to the one I'm\r\n  about to report and couldn't find an answer to my problem. ([Example Google\r\n  search.][search])\r\n- [x] If filing a bug report, I have included the output of `vim --version`.\r\n- [x] If filing a bug report, I have included the output of `:YcmDebugInfo`.\r\n- [x] If filing a bug report, I have included the output of\r\n  `:YcmToggleLogs stderr`.\r\n- [x] If filing a bug report, I have included which OS (including specific OS\r\n  version) I am using.\r\n- [ ] If filing a bug report, I have included a minimal test case that reproduces\r\n  my issue.\r\n- [x] **I understand this is an open-source project staffed by volunteers and\r\n  that any help I receive is a selfless, heartfelt _gift_ of their free time. I\r\n  know I am not entitled to anything and will be polite and courteous.**\r\n- [x] **I understand my issue may be closed if it becomes obvious I didn't\r\n  actually perform all of these steps.**\r\n\r\nThank you for adhering to this process! It ensures your issue is resolved\r\nquickly and that neither your nor our time is needlessly wasted.\r\n\r\n# Issue Details\r\n\r\nOS Version: OS X - El Capitan\r\n\r\n```\r\nNVIM 0.1.4\r\nBuild type: RelWithDebInfo\r\nCompilation: /usr/local/Library/ENV/4.3/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/build/config -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/src -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include/luajit-2.0 -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/build/src/nvim/auto -I/tmp/neovim-20160524-70013-14wksgv/neovim-0.1.4/build/include\r\nCompiled by sassanharadji@MacBook-Pro\r\n\r\nOptional features included (+) or not (-): +acl   +iconv    +jemalloc\r\nFor differences from Vim, see :help vim-differences\r\n\r\n   system vimrc file: \"$VIM/sysinit.vim\"\r\n  fall-back for $VIM: \"/usr/local/Cellar/neovim/0.1.4/share/nvim\"\r\n```\r\n\r\n\r\n-------------------------------\r\n\r\n:YcmDebugInfo\r\n\r\n```\r\nPrinting YouCompleteMe debug information...\r\n-- Server has Clang support compiled in: False\r\n-- JavaScript completer debug information:\r\n--   Tern no longer running\r\n--   Tern executable: /Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/bin/tern\r\n--   Tern logfiles:\r\n--     /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/tern_56654_stdout.log\r\n--     /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/tern_56654_stderr.log\r\n--\r\n-- Server running at: http://127.0.0.1:56648\r\n-- Server process ID: 29138\r\n-- Server logfiles:\r\n--   /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/server_56648_stdout.log\r\n--   /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/server_56648_stderr.log\r\n```\r\n\r\n----------------------------------\r\n\r\n:YcmToggleLogs\r\n\r\n```\r\n2016-07-13 20:05:04,468 - INFO - Received event notification\r\n2016-07-13 20:05:04,472 - INFO - Using node binary from: /usr/local/bin/node\r\n2016-07-13 20:05:04,472 - INFO - Starting Tern server...\r\n2016-07-13 20:05:04,484 - INFO - Tern Server started with pid: 30063 listening on port 56975\r\n2016-07-13 20:05:04,485 - INFO - Tern Server log files are: /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/tern_56975_stdout.log and /var/folders/sx/995cq4316_57jgdyhwjvf9rw0000gn/T/ycm_temp/tern_56975_stderr.log\r\n2016-07-13 20:05:05,066 - INFO - Received event notification\r\n2016-07-13 20:05:05,067 - INFO - Adding ONE buffer identifier for file: /Users/sassanharadji/Projects/MHelli/mhelli/Frontend/scripts/actions.js\r\n2016-07-13 20:05:06,595 - INFO - Received event notification\r\n2016-07-13 20:05:13,931 - INFO - Received filetype completion available request\r\n2016-07-13 20:05:13,976 - INFO - Received filetype completion available request\r\n2016-07-13 20:05:20,366 - INFO - Received completion request\r\n2016-07-13 20:05:21,625 - INFO - Received completion request\r\n2016-07-13 20:05:22,831 - INFO - Received completion request\r\n2016-07-13 20:05:23,601 - INFO - Received completion request\r\n2016-07-13 20:05:24,176 - INFO - Received completion request\r\n2016-07-13 20:05:24,376 - INFO - Received completion request\r\n2016-07-13 20:05:24,736 - INFO - Received completion request\r\n2016-07-13 20:05:25,028 - INFO - Received completion request\r\n2016-07-13 20:05:25,482 - INFO - Received event notification\r\n2016-07-13 20:05:25,483 - INFO - Adding ONE buffer identifier for file: /Users/sassanharadji/Projects/MHelli/mhelli/Frontend/scripts/actions.js\r\n2016-07-13 20:05:25,511 - INFO - Received completion request\r\n2016-07-13 20:05:25,520 - INFO - Starting new HTTP connection (1): 127.0.0.1\r\n2016-07-13 20:05:27,119 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py\", line 98, in GetCompletions\r\n    .ComputeCandidates( request_data ) )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 218, in ComputeCandidates\r\n    candidates = self._GetCandidatesFromSubclass( request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 234, in _GetCandidatesFromSubclass\r\n    raw_completions = self.ComputeCandidatesInner( request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 180, in ComputeCandidatesInner\r\n    request_data ).get( 'completions', [] )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 360, in _GetResponse\r\n    return self._PostRequest( { 'query': full_query }, request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 325, in _PostRequest\r\n    json = full_request )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/api.py\", line 107, in post\r\n    return request('post', url, data=data, json=json, **kwargs)\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/api.py\", line 53, in request\r\n    return session.request(method=method, url=url, **kwargs)\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py\", line 468, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py\", line 576, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py\", line 426, in send\r\n    raise ConnectionError(err, request=request)\r\nConnectionError: ('Connection aborted.', BadStatusLine(\"''\",))\r\n\r\n2016-07-13 20:05:27,153 - INFO - Received completion request\r\n2016-07-13 20:05:27,155 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py\", line 98, in GetCompletions\r\n    .ComputeCandidates( request_data ) )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 218, in ComputeCandidates\r\n    candidates = self._GetCandidatesFromSubclass( request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py\", line 234, in _GetCandidatesFromSubclass\r\n    raw_completions = self.ComputeCandidatesInner( request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 180, in ComputeCandidatesInner\r\n    request_data ).get( 'completions', [] )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 360, in _GetResponse\r\n    return self._PostRequest( { 'query': full_query }, request_data )\r\n  File \"/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/javascript/tern_completer.py\", line 306, in _PostRequest\r\n    raise ValueError( 'Not connected to server' )\r\nValueError: Not connected to server\r\n```\r\n\r\n----------------------------\r\n\r\nThe Problem\r\n---------------------\r\n\r\nTern server crashes time to time, it may work or not for few seconds or minutes and then crashes. It happens with both tern 0.17 (default with ycm) and 0.19.\r\nI don't see any pattern in this and there's no specific way to reproduce it. I thought maybe you can find out the issue by looking at logs.\r\n\r\n----------------------------\r\nTern's stderr log:\r\n\r\n```\r\n/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/def.js:652\r\n    if (argNodes.length && argNodes[0].type == \"Literal\" && typeof argNodes[0].value == \"string\")\r\n                ^\r\n\r\nTypeError: Cannot read property 'length' of null\r\n    at /Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/def.js:652:17\r\n    at Object.exports.IsCallee.constraint.addType (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:381:18)\r\n    at extend.propagate (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:517:35)\r\n    at /Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/def.js:283:16\r\n    at fn.computeRet (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/def.js:256:21)\r\n    at Object.exports.IsCallee.constraint.addType (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:381:18)\r\n    at withWorklist (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:909:19)\r\n    at Object.extend.propagate (/Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:94:25)\r\n    at /Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:1540:14\r\n    at /Users/sassanharadji/.config/nvim/plugged/YouCompleteMe/third_party/ycmd/third_party/tern_runtime/node_modules/tern/lib/infer.js:1368:7\r\n```"},"comment":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/comments/232405730","html_url":"https://github.com/Valloric/YouCompleteMe/issues/2241#issuecomment-232405730","issue_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/2241","id":232405730,"user":{"login":"sassanh","id":1270688,"avatar_url":"https://avatars.githubusercontent.com/u/1270688?v=3","gravatar_id":"","url":"https://api.github.com/users/sassanh","html_url":"https://github.com/sassanh","followers_url":"https://api.github.com/users/sassanh/followers","following_url":"https://api.github.com/users/sassanh/following{/other_user}","gists_url":"https://api.github.com/users/sassanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sassanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sassanh/subscriptions","organizations_url":"https://api.github.com/users/sassanh/orgs","repos_url":"https://api.github.com/users/sassanh/repos","events_url":"https://api.github.com/users/sassanh/events{/privacy}","received_events_url":"https://api.github.com/users/sassanh/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T16:12:54Z","updated_at":"2016-07-13T16:12:54Z","body":"This is the ycmd's stderr with `g:ycm_server_log_level` set to `'debug'`.\r\nhttps://gist.github.com/sassanh/e7223a69be4e96676d64f6ff6f6671a4"}}
{"actor":{"display_login":"sassanh"}}