Hi, I have suddenly started getting the following...
# help
f
Hi, I have suddenly started getting the following message:
Copy code
TypeError: Cannot read properties of undefined (reading 'logs')
    at /Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/cli/scripts/start.js:176:13
    at recipe (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:76:17)
    at Immer.produce (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/immer/src/core/immerClass.ts:94:14)
    at Immer.produceWithPatches (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/immer/src/core/immerClass.ts:141:23)
    at updateState (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:48:64)
    at Object.updateFunction (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:65:20)
    at /Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/cli/scripts/start.js:174:11
    at EventDelegate.trigger (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/runtime/server.js:29:13)
    at Socket.<anonymous> (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/runtime/server.js:233:31)
    at Socket.emit (node:events:527:28)
Any idea what could be causing this? Dependencies:
Copy code
"@serverless-stack/cli": "0.67.2",
"@serverless-stack/resources": "0.67.2",
"aws-cdk-lib": "2.15.0",
"@tsconfig/node14": "^1.0.1",
"@types/aws-lambda": "^8.10.93",
"@types/node": "^17.0.21"
t
let me take a look
m
Maybe due to cdk version?
We use 2.7.0 ig?
j
seen this yesterday as well, appeared when shutting down
sst start
t
@Fazi does restarting sst start make it go away?
I pushed a fix will release later
f
thanks @thdxr - I tried restarting a few times but it kept popping up for some reason.
t
can you try
Copy code
sst update 0.68.0-next.4
and tell me if it fixes it - I'm not able to reproduce
f
@thdxr, I now get a different error after running that command:
Copy code
TypeError: Cannot set properties of undefined (setting 'response')
    at /Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/cli/scripts/start.js:345:27
    at recipe (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:76:17)
    at Immer.produce (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/immer/src/core/immerClass.ts:94:14)
    at Immer.produceWithPatches (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/immer/src/core/immerClass.ts:141:23)
    at updateState (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:48:64)
    at Object.updateFunction (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/local/server.js:65:20)
    at WS.handleRequest (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/cli/scripts/start.js:341:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at WS.handleMessage (/Users/user/Desktop/services-python-app-integration/app_integration/node_modules/@serverless-stack/core/dist/runtime/ws.js:90:26)
t
how are you triggering this function?
f
The function is triggered via SNS
I have a couple of functions triggered by SNS alongside this one
t
the other ones are fine?
f
Yep, they seem to be firing ok. This one fires ok once, then throws the error. This then causes SST to basically shutdown
t
yeah this is odd, something is coming up undefined that shouldn't ever be undefined. I'm adding checks for it but wondering what the root cause is
try
0.68.0-next.5
f
Thanks I will try that next. Everything seems to work fine when I don't publish to SNS for that specific function. I wonder if I am publishing too many times to SNS for the local live debugging to work correctly.
@thdxr adding
reservedConcurrentExecutions: 5,
seems to have fixed the issu
t
odd
f
Functions flow all the way through
t
oh you know what might be happening, we only keep 25 invocations around
f
Ah I was definitely going above 25 in my testing. I think it works ok now, but I will let you know. Perhaps something else was the issue and it was unwittingly fixed. Thanks a lot for the help!
t
Yeah the issue is an invocation might start, and then get removed by the time the response comes in hence the undefined error
f
@thdxr, Is there any way to increase the invocation limit? I.e. if I want to keep 50 invocations around etc?
f
Leaving a note here that this 50 invocation limit issue has been fixed 👍