-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https.request is broken by agent-base included by https-proxy-agent #2085
Comments
Just hit this today myself. Looks like introduced by 58c9111 I think we can make the import optional based on a proxy being set or not to limit the damage. The ideal solution would be to patch and upgrade |
This part needs patching: https://github.com/TooTallNate/node-agent-base/blob/master/patch-core.js#L33-L37 |
Submitted TooTallNate/node-agent-base#27 |
Still has problem require('@sentry/node')
const https = require('https')
const req = https.request('https://www.example.com/', {}, res => {
console.log(res.statusCode)
})
req.end() Throws:
|
@jiangfengming this fix has not been released yet, so that's probably why you are still having this issue. |
@jiangfengming |
Upgraded to 5.4.2, still throws. From the error stack, I saw agent-base is v4.3.0. /Users/fenix/projects/tests/node_modules/.registry.npmjs.org/agent-base/4.3.0/node_modules/agent-base/patch-core.js:25:22 |
@jiangfengming can you share the new stack trace for us to investigate please? |
Doesn't appear that the patch TooTallNate/node-agent-base#27 addresses http.request (line 13). Only fixes http.get. http.request also supports a 3 param form as well now according to nodejs docs linked above. Additionally Object.assign will not copy any properties from a URL object because they are not own-properties so that part is a bug as well. |
|
@davidnikdel-epic @jiangfengming - thanks for the responses. My bad confusing the two methods. Will re-open this issue and try to fix it soon! |
PR pending TooTallNate/node-agent-base#28 |
Hi we are seeing this issue still. Is there any eta on releasing a possible fix? Specifically seeing new relic external calls breaking, as described here: #2155 |
Pinged the owner of the |
@kamilogorek no need to ping the owner as we also have access. I'll try to spend some time on this today and tomorrow. |
TIL 🙃 |
Any progress here? |
Now that this issue page is working again, this can be closed since #2355 was merged, right? |
Package + Version
@sentry/node
Version:
Description
Some time after 4.1.1 sentry started depending on https-proxy-agent. https-proxy-agent depends on agent-base which does a little nasty thing where it patches over node-core's https.request here
Problems are:
Docs on node's https.request
Unfortunately this means any app that depends on @sentry/node also receives this lovely bug.
The text was updated successfully, but these errors were encountered: