2

I am attempting to GET a URL. The URL works successfully in browsers. I know HTTPS in node often fails due to missing root CAs, however that error (CERT_UNTRUSTED) is not the error I am getting (GET_SERVER_HELLO:sslv3 alert handshake failure):

const superagent = require('superagent')
(async function(){var response = await superagent.get('https://uplinklabs.net')})()

Node fails with:

> (node:30960) UnhandledPromiseRejectionWarning: Error: write EPROTO 101057795:error:14077410:SSL routines:SSL23_
GET_SERVER_HELLO:sslv3 alert handshake failure:openssl\ssl\s23_clnt.c:802:

        at _errnoException (util.js:992:11)
        at WriteWrap.afterWrite [as oncomplete] (net.js:864:14)
(node:30960) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throw
ing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catc
h(). (rejection id: 2)

This isn't same thing as a cert being untrusted. Why am I getting this error and how may I prevent it?

mikemaccana
  • 110,530
  • 99
  • 389
  • 494

1 Answers1

0

node version 8 (the current LTS) doesn't support HTTP/2, the latest version of HTTP. Browsers, on the other hand, already do support HTTP/2.

node 10 includes a number of changes to HTTP/2 support. Upgrading to node 10 will ensure the error no longer occurs.

mikemaccana
  • 110,530
  • 99
  • 389
  • 494