ternjs / tern_for_sublime

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

sublime empty error message #55

Closed gertcuykens closed 9 years ago

gertcuykens commented 9 years ago

I get allot of this when editing scripts in html

screen shot 2014-12-30 at 00 26 16

marijnh commented 9 years ago

That is indeed a very, very useless error message. Most likely, an empty HTTP response came back from the Tern server (due to it crashing, possibly), since the response text is being used directly as error message.

I could put a string in front of the error (Request failed: or so), but that wouldn't help much in this case, since you still don't know why the request failed.

If you have experience with packet sniffers (ngrep, wireshark, whatever), maybe you can get more information about the issue here by looking at the HTTP traffic.

Alternatively, start a server manually (first kill all existing servers, then start the tern binary in your project directory, passing it --verbose for extra output), so that you can see what it is doing.

gertcuykens commented 9 years ago

hmm I don't see anything happening?

screen shot 2014-12-30 at 18 38 07

It think the plugin simple does not find tern at all?

gertcuykens commented 9 years ago

I narrowed it down too <script>...</script> if the script tag is not closed yet example <template><script>....</template> tern start crashing before you can type </script>

gertcuykens commented 9 years ago

Can you maybe just suppress the popup and only display it in the status bar like a normal message?

marijnh commented 9 years ago

hmm I don't see anything happening?

Did you kill existing Tern instances before running the server from the command line? And are you in the directory that the file you are editing is also in? For me, running the server does cause Sublime Text to connect to it, and I can see the --verbose output.

I still wasn't able to reproduce this, even when I create an html file with an unclosed script tag in it.

gertcuykens commented 9 years ago

ok i will close this for now until I have time for a more solid example.

herron9 commented 3 years ago

I saw the same issue today and it just begins to happen without any change. Any one has idea how to solve it? Tried disable Tern and reinstall, but that does not work.