EPROTO
node
tls_error
ai_generated
true
Error: write EPROTO: SSL routines: wrong version number
ID: node/err-ossl-wrong-version-number
90%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
HTTPS request sent to HTTP port, or proxy not handling TLS correctly.
genericWorkarounds
-
95% success Check the URL protocol — using https:// on an HTTP-only port
// Wrong: https://localhost:3000 (if server is HTTP) // Right: http://localhost:3000
Sources: https://nodejs.org/api/https.html
-
85% success If using a proxy, configure it to handle TLS: HTTPS_PROXY env var
HTTPS_PROXY env var
Sources: https://nodejs.org/api/tls.html
Dead Ends
Common approaches that don't work:
-
Disable TLS verification: rejectUnauthorized: false
85% fail
Security risk and doesn't fix the port/protocol issue
-
Downgrade to HTTP
70% fail
May expose sensitive data in transit
Error Chain
Frequently confused with: