I\'m currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200
error on Google Chrome. I\'m not sure exactly what can provoke this erro
This happened to me when I registered a new domain name, e.g., "new" for example.com (new.example.com). The name could not be resolved temporarily in my location for a couple of hours, while it could be resolved abroad. So I used a proxy to test the website where I saw net::ERR_HTTP2_PROTOCOL_ERROR
in chrome console for some AJAX posts. Hours later, when the name could be resloved locally, those error just dissappeared.
I think the reason for that error is those AJAX requests were not redirected by my proxy, it just visit a website which had not been resolved by my local DNS resolver.
I encountered this because the http2 server closed the connection when sending a big response to the Chrome.
Why? Because it is just a setting of the http2 server, named WriteTimeout.
In my case I have a kubernetes cluster with nginx ingress controller and nginx+php-fpm to handle drupal instance.
I notice this issue on one of my page, where my pictures was not loaded in chrome. After investigation I discovered that modsecurity module enabled in my nginx ingress somehow produce this issue. Not fully know why, but after disabling it, all pages are loaded fine.
Best Regards.
I faced this error several times and, it was due to transferring large resources(larger than 3MB) from server to client.
This error is currently being fixed: https://chromium-review.googlesource.com/c/chromium/src/+/2001234
But it helped me, changing nginx settings:
In my case, Nginx acts as a reverse proxy for Node.js application.
For my situation this error was caused by having circular references in json sent from the server when using an ORM for parent/child relationships. So the quick and easy solution was
JsonConvert.SerializeObject(myObject, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore })
The better solution is to create DTOs that do not contain the references on both sides (parent/child).