Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting net::ERR_SSL_PROTOCOL_ERROR in axios reactJs

I've get request in reactJs to Node.js server given below

const response =
            await axios.get("http://xx.xx.xx.x:3002/api/products/allTimers/",
                {
                    headers: { 'Authorization': 'Bearer ' + this.state.authorization_token }
                }
            )

and the console is given by

xhr.js:178 GET https://xx.xx.xx.x:3002/api/products/allTimers net::ERR_SSL_PROTOCOL_ERROR
dispatchXhrRequest @ xhr.js:178

createError.js:16 Uncaught (in promise) Error: Network Error
    at createError (createError.js:16)
    at XMLHttpRequest.handleError (xhr.js:83)

how to solve this issue.

like image 319
Sohail Ahmad Avatar asked May 08 '26 11:05

Sohail Ahmad


1 Answers

net::err_ssl_protocol_error may be due to the fact that you are starting a request to the URL starting with https:// Test with http://

like image 121
Pep3 Márquez Avatar answered May 10 '26 23:05

Pep3 Márquez