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.
I'm sorry to say, I don't have a precise answer for you. But I did encounter this problem as well, and, at least in my case, found a way around it. So maybe it'll offer some clues to someone else who knows more about Php under the hood.
The scenario is, I have an array passed to a function. The content of this array is being used to produce an HTML string to be sent back to the browser, by placing it all inside a global variable that's later printed. (This function isn't actually returning anything. Sloppy, I know, but that's beside the point.) Inside this array, among other things, are a couple of elements carrying, by reference, nested associative arrays that were defined outside of this function. By process-of-elimination, I found that manipulation of any element inside this array within this function, referenced or not, including an attempt to unset those referenced elements, results in Chrome throwing a net::ERR_INCOMPLETE_CHUNKED_ENCODING error and displaying no content. This is despite the fact that the HTML string in the global variable is exactly what it should be.
Only by re-tooling the script to not apply references to the array elements in the first place did things start working normally again. I suspect this is actually a Php bug having something to do with the presence of the referenced elements throwing off the content-length headers, but I really don't know enough about this to say for sure.
I was getting
net::ERR_INCOMPLETE_CHUNKED_ENCODING
, upon closer inspection of the server error longs I found it was due to PHP script execution timeout.Adding this line on top of PHP script solved it for me:
Ref: Fatal error: Maximum execution time of 30 seconds exceeded
If there are any loop or item which is not existing then you face this issue.
When running the App on Chrome, the page is blank and become unresponsive.
Scenario Start:
Dev Environment: MAC, STS 3.7.3, tc Pivotal Server 3.1, Spring MVC Web,
in ${myObj.getfName()}
Scenario End:
Reason of issue: getfName() function is not defined on the myObj.
Hope it help you.
I had this problem (showing ERR_INCOMPLETE_CHUNKED_ENCODING in Chrome, nothing in other browsers). Turned out the problem was my hosting provider GoDaddy adding a monitoring script at the end of my output.
https://www.godaddy.com/community/cPanel-Hosting/how-to-remove-additional-quot-monitoring-quot-script-added/td-p/62592
In my case i was having
/usr/local/var/run/nginx/fastcgi_temp/3/07/0000000073" failed (13: Permission denied)
which was probably resulting the Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error.I had to remove
/usr/local/var/run/nginx/
and let nginx create it again.In my case it was broken config for mysqlnd_ms php extension on the server. Funny thing is that it was working fine on requests with short duration. There was a warning in server error log, so we have fixed it quick.