JCMais / node-libcurl

libcurl bindings for Node.js
https://npmjs.org/package/node-libcurl
MIT License
666 stars 118 forks source link

curly: fails to add a request in the same event loop #332

Closed kapouer closed 8 months ago

kapouer commented 2 years ago

Nothing special (curly + streaming response):

JCMais commented 2 years ago

hi @kapouer, thanks for reporting this.

What is the Node.js version? If you could provide a Dockerfile / .js file that reproduces the issue that would be great.

kapouer commented 2 years ago

Node 12.22.9 on debian/bookworm, with node-libcurl compiled against libcurl4-gnutls-dev 7.81.0. I'll try to isolate the problem.

kapouer commented 1 year ago

Hi, using node-libcurl@3.0.0 in the same context, I get the same error.

Now my code looks like

await new Promise(resolve => setImmediate(resolve)); // without which it fails
const {
    headers: hlist,
    data,
    statusCode
} = await curly[method](urlObj.href, opts);

However that error had disappeared for some time, and now it's back :( Something has changed - maybe I switched from prebuilt version to --build-from-source.

kapouer commented 1 year ago

Of couse, reinstalling to 2.x still gives the same error - so it's not a regression.

kapouer commented 1 year ago

This is some sort of duplicate of https://github.com/JCMais/node-libcurl/issues/81 I had SSL_VERIFYPEER set to false, and reenabling it fixes the issue.

JCMais commented 8 months ago

To keep the maintainability of this project, I am closing old tickets. If the issue continues with the latest version of node-libcurl, please feel free to create a new ticket.