ide-html icon indicating copy to clipboard operation
ide-html copied to clipboard

Uncaught Error: Header must provide a Content-Length property.

Open nasyxx opened this issue 7 years ago • 8 comments

[Enter steps to reproduce:]

  1. I was writing Python when this error happened...

Atom: 1.25.0 x64 Electron: 1.7.11 OS: Mac OS X 10.13.4 Thrown From: ide-html package 0.4.2

Stack Trace

Uncaught Error: Header must provide a Content-Length property.

At /Users/Nasy/.atom/packages/ide-html/node_modules/vscode-jsonrpc/lib/messageReader.js:200

Error: Header must provide a Content-Length property.
    at StreamMessageReader.onData (/packages/ide-html/node_modules/vscode-jsonrpc/lib/messageReader.js:200:27)
    at /packages/ide-html/node_modules/vscode-jsonrpc/lib/messageReader.js:185:19)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)

Commands

     -2:57.9.0 core:move-down (input.hidden-input)
     -2:57.6.0 core:save (input.hidden-input)
     -2:56 core:move-left (input.hidden-input)
     -2:49.6.0 core:copy (input.hidden-input)
     -2:12.3.0 autocomplete-plus:confirm (input.hidden-input)
     -2:08.9.0 core:cut (input.hidden-input)
  2x -2:08.4.0 core:move-right (input.hidden-input)
  2x -2:08.0 core:backspace (input.hidden-input)
     -2:05.8.0 core:copy (input.hidden-input)
  2x -2:03.2.0 core:paste (input.hidden-input)
     -2:01.2.0 core:save (input.hidden-input)
     -1:55.7.0 editor:select-to-first-character-of-line (input.hidden-input)
     -1:55.3.0 core:copy (input.hidden-input)
  6x -1:14.1.0 core:backspace (input.hidden-input)
     -1:07.1.0 editor:select-to-end-of-line (input.hidden-input)
     -1:04.8.0 core:move-left (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.2 
atom-clock 0.1.16 
atom-ide-ui 0.9.4 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
auto-update-packages 1.0.1 
autocomplete-html-entities 0.2.0 
autocomplete-modules 1.12.0 
autocomplete-paths 2.12.2 
busy-signal 1.4.3 
city-lights-ui 1.3.3 
compare-files 0.8.1 
ctags-status 1.3.7 
dash 1.7.1 
dash-ui 0.4.4 
elm-format 3.0.0 
elmjutsu 7.2.6 
emmet 2.4.3 
encourage 0.4.0 
fancy-bracket-matcher 2.1.0 
file-header 1.13.9 
file-icons 2.1.18 
flow-ide 1.11.0 
glowing-cursor 0.1.2 
grammar-token-limit 0.1.1 
hey-pane 1.1.0 
highlight-column 0.5.4 
highlight-line 0.12.0 
highlight-selected 0.13.1 
html-head-snippets 0.2.0 
html-to-elm 0.2.0 
hyperclick 0.0.0 
ide-html 0.4.2 
ide-json 0.2.1 
ide-python 0.9.2 
ide-typescript 0.7.6 
indent-guide-improved 1.4.13 
intentions 1.1.5 
keyboard-sounds 0.2.0 
language-csv 1.1.2 
language-elm 1.5.0 
line-count-status 0.0.3 
linter 2.2.0 
linter-elm-make 0.28.2 
linter-htmlhint 1.4.0 
linter-mypy 2.6.1 
linter-ui-default 1.7.1 
lisp-paredit 0.6.0 
livestyle-atom 0.2.10 
lunar-particle-ui 0.3.13 
MagicPython 1.0.12 
minimap 4.29.8 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-selection 4.5.0 
multi-wrap-guide 1.1.5 
neon-cursor 1.6.0 
one-vibrancy 0.2.0 
organized 0.8.1 
parinfer 1.22.0 
pigments 0.40.2 
pure-syntax 0.3.0 
python-debugger 0.2.0 
python-indent 1.1.5 
rainbow-csv 0.2.2 
regex-railroad-diagram 0.19.4 
seti-icons 1.5.4 
seti-ui 1.10.0 
swackets 0.35.0 
symbol-gen 1.3.1 
sync-settings 0.8.6 
tablr 1.8.3 
tree-view-copy-relative-path 1.2.0 
tree-view-git-status 1.4.0 
typewriter-sounds 3.0.1 
youtube-pane 2.0.0 

nasyxx avatar Apr 01 '18 09:04 nasyxx

@nasyxx For finding out the root cause please help with following questions:

  • Is it happening when you are opening python code or editing code?
  • Does your python code contains any html snippet or special markup?

liuderchi avatar Apr 01 '18 16:04 liuderchi

Hello, it's happening when I am editing code and here is my code: https://gist.github.com/nasyxx/ae410ec2b03f74fdf740c70bdeec3063 , a simple crawler.

I don't think my code includes any html snippet, but it may include some special markup.

nasyxx avatar Apr 01 '18 16:04 nasyxx

This error seems to have not appeared in this completed code, but this is not the first time I have encountered it. I think if it cannot be found a problem for the time being. I will record the complete situation when it next appears.

nasyxx avatar Apr 01 '18 16:04 nasyxx

Hi, unluckily, it had just happened again when I was editing the f-string.

here is the code: https://gist.github.com/nasyxx/7fe1a558f0d5410bb9aef9d285110431

and the screenshot:

screen shot 2018-04-02 at 10 44 44 pm screen shot 2018-04-02 at 10 45 53 pm

nasyxx avatar Apr 02 '18 14:04 nasyxx

Well, I guess I find out why it happened. I forget to reinstall the vscode-html-languageserver-bin when I completed reinstalled my nodejs.

After I reinstalled, it did not happen again in these two days.

nasyxx avatar Apr 04 '18 07:04 nasyxx

@nasyxx How you may change files in the ~/.atom/ide-html/* when you reinstalled nodejs?

liuderchi avatar Apr 04 '18 12:04 liuderchi

Oh, I thought this is related to the vscode-html-languageserver-bi package of nodejs.

And, unfortunately, it happened again just now.

It seems that it did not appear again before was just an accidental event. (>﹏<)

nasyxx avatar Apr 04 '18 18:04 nasyxx

For me it recently happens when I delete directories in Atom.

b3z avatar Dec 06 '19 06:12 b3z