question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught exception: Header must contain a Content-Length property

See original GitHub issue

I’ve been a bit frustrated with this error since months at this point. I can’t find a proper way to reproduce and logs do not help: maybe someone here knows better than I do.

This causes the plugin to completely stop working, vim becomes slow and I get a ton of error messages:

image

CocInfo output:

undefined## versions

vim version: NVIM v0.5.0-828-g0a95549d6
node version: v15.2.1
coc.nvim version: 0.0.79-9eb7e5b2ae
coc.nvim directory: /home/eruizc/.config/nvim/plugged/coc.nvim
term: alacritty
platform: linux

## Log of coc.nvim

2020-12-10T18:16:26.003 INFO (pid:145067) [plugin] - coc.nvim 0.0.79-9eb7e5b2ae initialized with node: v15.2.1 after 354ms
2020-12-10T18:16:27.563 INFO (pid:145067) [language-client-index] - Language server "cs" started with 145137
2020-12-10T18:16:32.974 ERROR (pid:145067) [server] - uncaughtException Error: Header must provide a Content-Length property.
    at StreamMessageReader.onData (/home/eruizc/.config/nvim/plugged/coc.nvim/build/index.js:18138:27)
    at Socket.<anonymous> (/home/eruizc/.config/nvim/plugged/coc.nvim/build/index.js:18123:18)
    at Socket.emit (node:events:329:20)
    at addChunk (node:internal/streams/readable:304:12)
    at readableAddChunk (node:internal/streams/readable:279:9)
    at Socket.Readable.push (node:internal/streams/readable:218:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:192:23)
## From here the previous exception repeats

After 5 seconds of opening the solution I already have a log with +5000 lines of the previous exception with a difference of 1 to 200 milliseconds between each.

It works fine in some projects (specially small ones) and currently breaks in 2 of my company projects. It used to work originally in both of them but now it’s completely dead.

What do these projects share that others do not?

  • ASP.NET Core (2.1 and 3.1)
  • Private repo
  • Uses private nuget packages from github

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:14
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

23reactions
raymonddaviscommented, Mar 2, 2021

@ennmichael I just encountered this and fixed mine by running dotnet clean. Seems it is picking up the build dlls maybe?

2reactions
ProgrammingLifecommented, Aug 30, 2021

I’ve fixed this with some strange solution. As it happened with the Unity project I’ve done this: rm MyUnityProject/obj/Debug/* There are two project .cache-files. After that my coc-omnisharp seems to be working now but how much time it will work - I don’t know. VSCode had been loading that “broken” project without any problems. Maybe it’s not a broken project but some file format that coc-omnisharp can’t read properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught exception: Header must provide a Content-Length ...
When opening a Java file for editing I get the error: [coc.nvim]: Uncaught exception: Header must provide a Content-Length property.
Read more >
neoclide/coc.nvim - Gitter
"Uncaught exception: Error: Header must provide a Content-Length property. ... The log has only a single message from the server "window/logMessage
Read more >
Header must contain a Content-Length property - Bountysource
Uncaught exception : Header must contain a Content-Length property.
Read more >
lsp 2021-08-05 | Slack Archive
Good I have plans to improve somehow that part of clojure-lsp, but i'll not be an ... Uncaught exception: Header must provide a...
Read more >
How To Fix the “411 Length Required” Error (4 Methods) - Kinsta
Fortunately, you can easily fix the “411 Length Required” error. This HTTP status code happens when the server requires a content-length header, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found