request / request

🏊🏾 Simplified HTTP request client.
Apache License 2.0
25.67k stars 3.14k forks source link

network issues with node 20+ #3458

Open simllll opened 10 months ago

simllll commented 10 months ago

Summary

we have major issues with the request library with node 20, I know this library is not maintained anymore, but would like to gather some feedback / inputs if there are any backgrounds to this or possible workarounds.

the strange thing is, we cannot reproduce this issue locally or even on the instance that causes troubles when running as a local script.

what is happening? requests are failing with strange results: 1.) either the requst ist not accepted (e.g. by aws S3), it returns with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>

2.) hubspot (v2) api uses request behind the scene as well, and there we suddenly get errors with "302 Found" and it seems either the redirect is not followed anymore, or some wrong request causing the redirect in first place.

Expected Behavior

not sure what's causing this, we are currently looking into --no-network-family-autoselection but it should work / behave like it did before.

Current Behavior

requests are failing, but with in a non reproduceable way.

Possible Solution

not sure

Your Environment

node v20.4.0 on linux (arm64)

possible related:

simllll commented 10 months ago

Update: it's related to Sentry. If sentry is set up on arm64, it starts behaving diffrently

Zhangdroid commented 9 months ago

I think the root cause is on nodejs side, see: https://github.com/nodejs/node/issues/48921