ERR_SSL_PROTOCOL_ERROR when testing locally
Answered
D Trombett posted this in #help-forum
Today I was working on my nextjs project and I wanted to test it on my mobile, as I normally do, so I opened up chrome on my phone and put the local ip address of the PC as always, but, to my surprise, it just loaded the first base html without loading any style, scripts or anything. So i tried doing the same on my PC and ran into the same problem. I tried inspecting the page and I found all of these
Last time I used it was some weeks ago, probably, and I had no problem. I tried starting a server with
I've attached the screenshots of the network and console logs if it helps.
Do you have any idea how can I fix this annoying error?
Thanks!
net::ERR_SSL_PROTOCOL_ERROR
.Last time I used it was some weeks ago, probably, and I had no problem. I tried starting a server with
npx serve
in a folder with only HTML & JS files and it worked normally so the problem is present only when using next dev
. If I open normally localhost:3000
it works but, of course, I cannot open it with other devices.I've attached the screenshots of the network and console logs if it helps.
Do you have any idea how can I fix this annoying error?
Thanks!
Answered by D Trombett
I managed to solve it. Recently I made some changes to the content security policy header and it seems that chrome doesn't like them! Removing the header in development fixed the issue
1 Reply
I managed to solve it. Recently I made some changes to the content security policy header and it seems that chrome doesn't like them! Removing the header in development fixed the issue
Answer