net::ERR_INCOMPLETE_CHUNKED_ENCODING in Chrome only

Solution 1:

I have met this problem yesterday. It's because of the server didn't response some resources.

In my page, i have some large file links like<a href="/file_path">file_name</a>, and this happend only in chrome.

In a while ,I recognized this maybe caused by the chrome's 'Predict network actions to improve page load performance' feature.So I turned off this feature in chrome://settings and try it again. As expected, the error didn't occur again.

After that, I changed resource links with full_url_path instead of relative_path(in rails, use resource_url instead of resource_path), then I didn't have to turn off the chrome's feature. And it looks good.

Solution 2:

I had this with a Wordpress website, also only in Chrome.

Updating the website and its plugins to the latest version didn't help, and other people didn't seem to have the same problem when visiting the website, but then I saw this post, turned off my antivirus (avast) real-time shields, as suggested, and the problem went away.

NOTE: The Real-Time Protection on some of the various anti-virus programs (AVAST, Kapersky and ESET) seem to be a major cause of this error.

Solution 3:

In my case, the problem was cache-related and was happening when doing a CORS request.

As stated in comments above:

the error seemed to appear randomly

This is because of the Http cache system.

Forcing the response header Cache-Control to no-cache resolved my issue:

[ using Symfony HttpFoundation component ]

<?php
$response->headers->add(array(
   'Cache-Control' => 'no-cache'
));

Solution 4:

I had this in a symfony project (PHP).

Like you describe your issue I had some static page (html.twig) with simple HTML and CSS... so nothing special about it.

For me it was a mod_rewrite problem, after I enabled mod_rewrite and added FallbackResource /index.php to my vhost it all worked smoothly.

PS: if you have apache lower than 2.2.16 create a .htaccess file in your root folder and use this code:

Options -MultiViews

RewriteEngine On
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L] </IfModule>