Describe the bug
Here's a minimal repro.
package.json:
{
"dependencies": {
"aws-sdk": "^2.701.0",
"dd-trace": "^0.22.0"
}
}
index.ts:
require('dd-trace').init();
const AWS = require('aws-sdk');
new AWS.S3({ region: 'us-west-2' }).upload({
Bucket: '<replace me>',
Key: 'test',
Body: ''
}, () => {});
Replace <replace me> with an accessible S3 bucket. Execute index.ts an environment with the appropriate AWS credentials.
Expected behavior: No error.
Actual behavior:
TypeError: Cannot read property '_managedUpload' of undefined
at Request.finishSinglePart (/Users/john/figma/dd-trace-aws-sdk/node_modules/aws-sdk/lib/s3/managed_upload.js:671:31)
at scope.activate (/Users/john/figma/dd-trace-aws-sdk/node_modules/dd-trace/packages/dd-trace/src/scope/base.js:54:19)
at Scope._activate (/Users/john/figma/dd-trace-aws-sdk/node_modules/dd-trace/packages/dd-trace/src/scope/async_hooks.js:51:14)
at Scope.activate (/Users/john/figma/dd-trace-aws-sdk/node_modules/dd-trace/packages/dd-trace/src/scope/base.js:12:19)
at Request.bound (/Users/john/figma/dd-trace-aws-sdk/node_modules/dd-trace/packages/dd-trace/src/scope/base.js:53:20)
at Response.wrappedCb (/Users/john/figma/dd-trace-aws-sdk/node_modules/dd-trace/packages/datadog-plugin-aws-sdk/src/helpers.js:83:49)
at Request.<anonymous> (/Users/john/figma/dd-trace-aws-sdk/node_modules/aws-sdk/lib/request.js:369:18)
at Request.callListeners (/Users/john/figma/dd-trace-aws-sdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/Users/john/figma/dd-trace-aws-sdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/Users/john/figma/dd-trace-aws-sdk/node_modules/aws-sdk/lib/request.js:688:14)
Environment
I just got this error too.
@rochdev what's the 'community' tag for? Does this mean that DataDog isn't interested in fixing its own issues and leaving it to it's customers? As a potential customer evaluating your product this is concerning.
Has someone an idea what is going on here? This apparently causes production issues for us. Is there a quick fix for this?
Has someone an idea what is going on here? This apparently causes production issues for us. Is there a quick fix for this?
I have downgraded the dd-trace version to 0.21.0.
Has someone an idea what is going on here? This apparently causes production issues for us. Is there a quick fix for this?
I have downgraded the dd-trace version to
0.21.0.
Thanks! We downgraded too. Everything works fine now.
what's the 'community' tag for? Does this mean that DataDog isn't interested in fixing its own issues and leaving it to it's customers?
Sorry if the label was misleading. It's actually a way for us to know which issues were reported by customers VS issues reported by us to know if anyone is actually waiting on an issue to be resolved. Unless someone explicitly grabs the issue, we definitely don't expect anyone else than us to fix these.
I have downgraded the dd-trace version to 0.21.0.
That definitely helps narrowing down the issue to a change since that version, thanks for sharing that this worked for you!
I have downgraded the dd-trace version to 0.21.0.
Just to confirm, does that mean that 0.21.1 also has the issue? Why was the downgrade explicitly to 0.20.0?
Just to confirm, does that mean that 0.21.1 also has the issue? Why was the downgrade explicitly to 0.20.0?
No, 0.21.1 works as well and hasn't been affected. Bug happened between 0.21.1 and 0.22.0
To be clear the bug isn't just causing this error but it's actually breaking the s3 upload mechanism too. Anyone using aws-sdk needs to downgrade dd-trace.
Bug happened between 0.21.1 and 0.22.0
Probably caused by #963.
This was auto-closed by the merge. The fix is now on master, and will be in the next release.
Thank you for providing a fix!
Thanks for the fix. When will this be released?
@gstamac I will make a release tomorrow.
Most helpful comment
Thank you for providing a fix!