ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
801 stars 54 forks source link

timeout error #139

Open max-mykhailenko opened 8 years ago

max-mykhailenko commented 8 years ago

I found issue similar to my #32, maybe you already know how to fix it. Cursor at line 4 and I tried to write const

screen shot 2016-09-24 at 10 29 29 pm
PSeitz commented 7 years ago

I have the same issue, altough my project size is pretty small (10 files, 1000 lines total)

easyfrog commented 7 years ago

I think this issue maybe the server while shut down after idle 5 minutes. So if Send an empty request to server every 4 minutes while keep the connect alive and avoid this problem. Who can try it ?

marijnh commented 7 years ago

You want the server to time out and close itself, because otherwise it'll continue to waste memory as the file sits unused in your editor. The plugin should automatically restart the server when it needs it. If that's not working for you, you could try to debug it.

jeremytm commented 7 years ago

I've read all of the threads on or related to this issue. And it certainly doesn't seem resolved. The option disable tern in a popup is not a solution.

The purpose of tern_for_sublime is to provide intelligent code hinting/auto-complete as well as other features, and it should do that without issue.

If tern is "timing out", can we not just allow a little more time? At least make it settable. And if we really use more time than we want, then there should be an option to revert back to basic sublime auto-complete.

abepark01 commented 5 years ago

I agree with @jeremytm The problem seems to be happening very frequently on any decent sized JS project.

Tern on Sublime Text seems to time out on any decent size JS project, but Tern seems to work fine with deoplete-ternjs

Sublime Text 3 Build 3176

ViggoV commented 5 years ago

I get this message, seemingly at random, so often it completely undermines the value of Tern. It would be nice with at least some more info, so I can debug whatever causes the timeout.

easyfrog commented 3 years ago

I filter out the timed out error message. And I create a PR #189

tern.py


def report_error(message, project):
  # filter the timed out error message
  if message != "timed out":            # add this line to filter out the "timed out" error message
    if sublime.ok_cancel_dialog(message, "Disable Tern"):
      project.disabled = True