-
-
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
@sentry/serverless "Cannot read properties of undefined (reading 'finish')" since 7.45.0 #7826
Comments
This issue arises when upgrading When inspecting the bundled lambda code and looking for position let m,
_ = s;
_.headers &&
ur.isString(_.headers["sentry-trace"]) &&
(m = ur.extractTraceparentData(_.headers["sentry-trace"]));
let b = _.headers && _.headers.baggage,
E = ur.baggageHeaderToDynamicSamplingContext(b),
N = St.getCurrentHub(),
q = N.startTransaction({
name: o.functionName,
op: "function.aws.lambda",
...m,
metadata: {
dynamicSamplingContext: m && !E ? {} : E,
source: "component",
},
}),
Y = N.pushScope(),
B;
try {
CA(Y, o, r),
Y.setSpan(q),
(B = await i(s, o)),
a.captureAllSettledReasons &&
Array.isArray(B) &&
NA(B) &&
RA(B).forEach((ee) => {
St.captureException(ee);
});
} catch (F) {
throw (St.captureException(F), F);
} finally {
clearTimeout(n),
q.finish(), // <--- ERROR OCCURS HERE
N.popScope(),
await St.flush(a.flushTimeout).catch((F) => {
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) &&
ur.logger.error(F);
});
} |
Hey! If you provide |
@AbhiPrasad Turned on This made me realize, we're running integration tests and purposely do not call So to me, it seems that the |
Yup! I see what is happening - we can fix this. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g.
bundle.tracing.min.js
) in your SDK setup.@sentry/serverless
SDK Version
7.45.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Wrap an AWS lambda handler using and throw an
Error
:Expected Result
Lambda does not fail
Actual Result
The text was updated successfully, but these errors were encountered: