'net::ERR_INCOMPLETE_CHUNKED_ENCODING in Chrome only
I've been getting this error when loading certain pages:
net::ERR_INCOMPLETE_CHUNKED_ENCODING
These pages don't do anything special and everything seems to work in other browsers. The pages that this happens on display data in JSON. It only happens when the JSON page has to display a large amount of items. The rails console is not displaying any errors (200 response).
Solution 1:[1]
I encountered this problem yesterday. It's because the server didn't respond with some resources.
In my page, I have some large file links like <a href="/file_path">file_name</a>.
This happened only in Chrome.
After awhile, I recognized this may be caused by Chrome's 'Predict network actions to improve page load performance' feature. So, I turned off this feature in chrome://settings and tried it again. As expected, the error didn't occur again.
After that, I changed resource links to have full_url_path instead of relative_path. In Rails, use resource_url instead of resource_path. Then I didn't have to turn off Chrome's feature, and it looks good.
Solution 2:[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:[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:
This is using the Symfony HttpFoundation component.
<?php
$response->headers->add(array(
'Cache-Control' => 'no-cache'
));
Solution 4:[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>
Solution 5:[5]
If having problems with symfony4 apache2, take a look at this answer
as summary, you have to disable FallbackResource/index.php into your virtualhost configuration file, next, you may want to run composer install symfony/apache-bundle and fix your /etc/apache2/apache.conf changing AllowOverride none for AllowOverride All, in order to enable the .htaccess file created in the installation recipe run, at the end, by restarting apache2 service (sudo service apache2 restart) the site must load without /index.php at the end of the URI.
Hope this helps someone!
Solution 6:[6]
This error comes, if you have relationship among domain objects or model object which you are returning back to Jquery. Please annotate with @JsonBackReference, your issue will be resolved
@ManyToOne(fetch = FetchType.LAZY,cascade=CascadeType.ALL)
@JoinColumn(name = "parentId", nullable = false)
@JsonBackReference
public Parent getParent() {
return this.parent;
}
@OneToMany(cascade=CascadeType.ALLfetch =FetchType.LAZY,mappedBy=
"parent")
@JsonBackReference
public Set<Category> getChild() {
return this.child;
}
Solution 7:[7]
In my case I have "No space left on device". When I delete useless files on Server — error disappeared
Solution 8:[8]
We had net::ERR_INCOMPLETE_CHUNKED_ENCODING problem in case of HTML, which contained too much empty lines. Some browsers had difficulties with interpretation of long files.
Once we've made code cleaning in our templates by cleaning the code from empty lines, error disappeared.
Solution 9:[9]
At least for Java Web Application, and more specifically using JSPs, I have seen this happening when JSP are messed up. So, make sure your JSPs are correct.
Solution 10:[10]
Please check your radware load balancer configuration. The setting for “FastView” and “APM” features can cause this issue. In my case it will get fixed after disabling those.
Solution 11:[11]
If you have opened any streams for the response those must be closed. For example code if you have opened a ServletOutputStream to download the zip directory the stream need to be closed as follows.
ServletOutputStream sos = response.getOutputStream();
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment;filename=project.ZIP");
sos.write(zip);
sos.flush();
sos.close();
Solution 12:[12]
I've catched the same error on a local website. In logs I found this record:
"nginx failed (13: Permission denied) while reading upstream, client: 127.0.0.1".
My decision through restart of nginx and php-fpm from the right user:
Let's my_user – main user of website's directory.
First, go to nginx.conf: Change
user nginx; -> user my_user my_user_group;
or paste this
user my_user my_user_group;
on the top of file
2) Second, in php5/fpm/pool.d/www.conf
# Find and change this variables from old -> to new:
user -> my_user
group -> my_user
listen.owner -> my_user
listen.group -> my_user
3) And finally you need restart of nginx and php-fpm. Then make chown 0700 in handmode for /var/lib/nginx/tmp for my_user, like this:
chown -R my_user:my_user 0700 /var/lib/nginx/tmp
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
