Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReactJS: net::ERR_HTTP2_PROTOCOL_ERROR 200 with .NetCore in HTTPS

I use ReactJS to develop my application, it was fine before, but suddenly this error happens:

GET https://localhost:44368/static/js/0.chunk.js net::ERR_HTTP2_PROTOCOL_ERROR 200

I do not know what is happening here, it was fine before. How can I fix this?

like image 338
Alvin Stefanus Avatar asked May 29 '21 02:05

Alvin Stefanus


3 Answers

I am using Visual Studio 2019 and experienced the same problem. This is what I did to resolve it:

Removed 'Microsoft.AspNetCore.SpaServices.Extentions' Nuget package from the project's Dependencies/Packages, and then installed the latest version (Installed 5.0.6)

enter image description here

Cleaned and rebuilt the solution and it started working again.

let me know if it works for you!

like image 182
emasnavi Avatar answered Nov 16 '22 08:11

emasnavi


Don't have enough rep to comment, but wanted to drop a note saying had the exact same experience as JTM and think that the Win10 update seems to be the likely suspect. .Net Core project that worked fine last night with no changes has stopped working post-update.

like image 12
TheQuail13 Avatar answered Nov 16 '22 06:11

TheQuail13


This solution does not work for dotnet core. I've tried updating SpaServices.Extensions to the latest version 3.1.16.

A temporarily solution is to disable SSL under Web Server Settings.

like image 6
peopleWatching Avatar answered Nov 16 '22 06:11

peopleWatching