http2-wrapper: Proxy Error

I tried this example https://github.com/szmarczak/http2-wrapper/blob/master/examples/proxy/h2-over-h2.js and I got this error.

(node:77358) UnhandledPromiseRejectionWarning: Error: Session closed without receiving a SETTINGS frame
    at ClientHttp2Session.<anonymous> (/Users/devchris/Desktop/project/node_modules/http2-wrapper/source/agent.js:396:22)
    at Object.onceWrapper (events.js:420:28)
    at ClientHttp2Session.emit (events.js:314:20)
    at ClientHttp2Session.EventEmitter.emit (domain.js:486:12)
    at emitClose (internal/http2/core.js:999:8)
    at internal/http2/core.js:1036:7
    at TLSSocket.onfinish (_stream_writable.js:677:5)
    at TLSSocket.emit (events.js:314:20)
    at TLSSocket.EventEmitter.emit (domain.js:486:12)
    at finish (_stream_writable.js:645:10)

I thought it was the proxy that doesn’t support http2 but the provider tells me that the proxy actually supports it.

What do you think?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 33 (17 by maintainers)

Most upvoted comments

Oh sorry i didn’t want to rush you! thank you for all this amazing work!

Oh nice but I was speaking about h2 over h1 ^^

Oh I think about an important note here. I use this agent in got. I add http2: true, and agent: { http2: new ProxyAgent(…) }.

but yes i will try

return super.request(
      this._origin,
      sessionOptions,
      {
        ...headers,
        ":authority": url.host,
        "Proxy-Authorization": `Basic ${Buffer.from("username:password").toString(
          "base64"
        )}`
      },
      streamOptions
    );

(with real credentials of course)

and still the same but ty for that information too

https://buyproxies.org

I see this error for each request 😕

And no I really want to access the final server with http2 (because there are some cloudflare rules xD)