. Advertisement .
..3..
. Advertisement .
..4..
The error “Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR” for React app after updating to Visual Studio 2019 16.10.0 is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue.
How does it occur?
After updating to Visual Studio 2019 16.10.0, the home page is blank and the error below is shown in the Chrome (Version 91.0.4472.77 (Official Build) (64-bit) debugger console: “Failed to load resource: net::ERR HTTP2 PROTOCOL ERROR.”
We’ve already tried all of the solutions listed below, but nothing seems to be working:
- Clean and rebuild
- Visual Studio was uninstalled and reinstalled.
- We used npm run build, which worked flawlessly.
- Cleared the cache in your browser
- We updated Visual Studio from version 16.10.0 to version 16.10.1
Cause of error “Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR” for React app after updating to Visual Studio 2019 16.10.0?
If you are facing the above problem, it is most likely due to some of the following reasons: – the server’s disk space is likely full so a response could not be sent. – You are transferring a large amount of resources (exceeding 1MB) from the server to the client – you might also be getting a syntax error in the header generated by PHP
How to fix it?
Here are some solutions, take a look and choose the one that works for you.
Option 1
The straightforward solution of uninstalling KB5003637 worked immediately for us, and we no longer have any errors! There is no need to roll back Visual Studio code because the issue is caused by the operating system.
Option 2
We discovered that deactivating SSL (which, we believe, causes IIS Express to fall back to HTTP 1.1) is a simple fix.
Option 3
The Nginx generated an image of the files (css, JSS, …) compressed with Gzip and then with Chrome it looked the identical.
The issue was resolved after we realized that the node-js server also compressing the content using Gzip. This double-compressing is the cause of this issue. Removing node-js compression solved the problem.
Option 4
For using NGINX, uncompress gzip and adding proxy_max_temp_file_size 0;
server {
...
...
gzip off;
proxy_max_temp_file_size 0;
location / {
proxy_pass http://127.0.0.1:3000/;
....
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your “Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR” error for React app after updating to Visual Studio 2019 16.10.0 quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Leave a comment