sentry-javascript
sentry-javascript copied to clipboard
RangeError - Maximum call stack size exceeded (Lamda Layer)
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.7.0
Framework Version
No response
Link to Sentry event
https://taxdown.sentry.io/issues/5427060785/
SDK Setup
Setup via Lambda Layer
Steps to Reproduce
- Add Lambda Layer
- Add relevant env vars (i.e. SENTRY_DSN)
Expected Result
Layer initialization manages multiple calls to the same lambda correctly.
Actual Result
Multiple calls to the same lambda provokes a RangeError - Maximum call stack size exceeded that results in a fatal error. Pointing the culprit to:
/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/index-py8Ov5SL.js in new cn at line 2:14801
/*! @sentry/aws-serverless 8.7.0 (41b8f79) | https://github.com/getsentry/sentry-javascript */
'{snip} .l=rn.PENDING,this.h=[];try{t(this.p,this.m)}catch(t){this.m(t)}}then(t,n){return new cn(((e,r)=>{this.h.push([!1,n=>{if(t)try{e(t(n))}catch {snip}
As noted here: https://github.com/getsentry/sentry-javascript/issues/5252
Issue is with multiple initializations. Since the layer is provided by Sentry, I would expect layer to be initialized considering this issue.