Sometimes I randomly see network requests from Chrome failing with Status = '(failed)' (status code 0 from the request object in JavaScript) and the response type as 'undefined' . I cannot isolate why, my internet connection seems to be up and the same endpoint on the server works if requested from say cURL.
Viewing the request details does not show any more response information, only the request info.
I thought it might be missing CORS headers, but I have verified they are there and anyway on a CORS permission problem Chrome reports the status as '(cancelled)'.
Any thoughts? Is it just that the host is unreachable? Why does it seem that all retries from the web app also fail until the browser is restarted?
I ran into this while working on an ad serving network. It ended up being the AdBlock Plus Chrome extension blocking any assets, probably the "ad" in the path. I whitelisted my domain and it worked.
This can occur when the size in Content-Length header is larger then the actual Content being submitted, chrome considers the request "failed" since it could not retrieve the entire document.
I began seeing these errors on a web page with a bad SSL certificate. I had already allowed the browser to proceed to the page, but after a while AJAX requests to the server would start failing. To fix the problem I would have to refresh the page in order to get back to the warning message so that I could accept it again and have my AJAX requests stop being blocked.
Unfortunately, in my case I haven't found the reason why Chrome forgets I want access to the domain. There is the Remember decisions to proceed through SSL errors for a specified length of time
setting in chrome://flags
, but it appears to have no affect.
I ran into this in an ASP.NET IHttpHandler because I was calling
context.Response.Close()
instead of context.Response.End()
. Wasn't quite closing the HTTP connection properly. It didn't cause a problem in any browsers but Chrome.
We had exactly this issue with an application reaching an API we control. It took a while for me to realize that slower clients were not seeing the issue, whereas faster clients (and pages with more requests) were.
It turned out that our HA Proxy was rate limiting requests on our frontend. Once we raised the limit from the value of 20 we had set up to something around 100, we no longer had the issue.
So it's possible you're getting blocked by something along the request pathway, potentially a proxy or load balancer or even a firewall.
In my case I have a Samsung laptop, and I unistalled Samsung Support Service, clear cache of Chrome and its works.