For the past two months, I have been receiving the following error on Chrome's developer console:
net::ERR_INCOMPLETE_CHUNKED_ENCODING
Symptoms:
- Pages not loading.
- Truncated CSS and JS files.
- Pages hanging.
Server environment:
- Apache 2.2.22
- PHP
- Ubuntu
This is happening to me on our in-house Apache server. It is not happening to anybody else - i.e. None of our users are experiencing this problem - nor is anybody else on our dev team.
Other people are accessing the exact same server with the exact same version of Chrome. I have also tried disabling all extensions and browsing in Incognito mode - to no effect.
I have used Firefox and the exact same thing is occurring. Truncated files and whatnot. The only thing is, Firefox doesn't raise any console errors so you need to inspect the HTTP request via Firebug to see the problem.
Response Headers from Apache:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Mon, 27 Apr 2015 10:52:52 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:Apache/2.2.22 (Ubuntu)
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.10-1ubuntu3.8
While testing, I was able to fix the issue by forcing HTTP 1.0 in my htaccess file:
SetEnv downgrade-1.0
This gets rid of the problem. However, forcing HTTP 1.0 over HTTP 1.1 is not a proper solution.
Update: Because I'm the only one experiencing this issue, I figured that I needed to spend more time investigating whether or not it was a client side issue. If I go into Chrome's settings and use the "Restore to Default" option, the problem will disappear for about 10-20 minutes. Then it returns.
Well. Not long ago I also met this question. And finally I get the solutions which really address this issue.
My problem symptoms are also the pages not loading and find the json data was be randomly truncated.
Here are the solutions which I summary could help to solve this problem
My fix is:
Hope this will help someone in future, and in my case its a Kaspersky issue but the fix above works great :)
In the context of a Controller in Drupal 8 (Symfony Framework) this solution worked for me:
Otherwise the response header 'Transfer-Encoding' got a value 'chunked'. This may be a problem for Chrome browser.
In my case it was issue of html. There was '\n' in json response causing the issue. So I removed that.
my guess is the server is not correctly handling the chunked transfer-encoding. It needs to terminal a chunked files with a terminal chunk to indicate the entire file has been transferred.So the code below maybe work:
Here the problem was my Avast AV. As soon I disabled it, the problem was gone.
But, I really would like to understand the cause of this behavior.