https://serverless-stack.com/ logo
#help
Title
# help
h

Hans Song

03/15/2022, 9:30 AM
hey guys, got a bug, on sst
v0.67.0
1. deploy the stack 2. connect to a deployed stack with console 3. navigate to the functions view in the console encountered this error
Copy code
Uncaught TypeError: Cannot read properties of undefined (reading 'data')
which seems to correlate to these lines (
construct
is undefined?)
the function that it points to in the stacktrace
f

Frank

03/16/2022, 6:19 PM
Hey @Hans Song do you recall if this issue poped up after adding a specific construct to the app?
@thdxr do u see any way this can be undefined?
t

thdxr

03/16/2022, 6:51 PM
it shouldn't afaik
f

Frank

03/16/2022, 6:57 PM
Is there any things @Hans Song can print out in the console that’d help us debug this? Could it be that Han’s app has dangling stacks deployed using an older version of SST where
data
was undefined?
t

thdxr

03/16/2022, 7:19 PM
maybe a screenshot from the console of the metadata state to see if the function's data field is actually empty
it should already be printed, just need to drill down into the stack + find the function
f

Frank

03/16/2022, 9:35 PM
@Hans Song if you could open up the developer tools > Copy the metadata to a file > and share the file here.. like this
we can take a look at what’s going on
Let me know
h

Hans Song

03/16/2022, 10:50 PM
wow never knew you could do that with the browser console, thats handy to know, here you go edit - i might just run the contents by the security guy in case theres things i shouldn’t share in there
here it is
f

Frank

03/18/2022, 10:29 AM
@thdxr can u take a look at the metadata and see if you can spot anything?
t

thdxr

03/21/2022, 3:17 PM
I think I can fix the error but I'm not sure why it's happening. I'ts hard to tell from the metadata but I think something is pointing to a function that isn't in the metadata
are you using a non-sst function somewhere?
pushed a fix either way
lmk if it works now
f

Frank

03/22/2022, 5:03 AM
@Hans Song just checking in to see if you had a chance to try out @thdxr’s fix. Be sure to hard refresh the browser to pick up the latest changes.
h

Hans Song

03/22/2022, 5:53 AM
hey Frank, yep it’s not crashing anymore 🙂, thanks for that wondering if it could it be because of an orphaned stack? at one point i updated the name of the stack but the function names were the same
f

Frank

03/22/2022, 5:58 AM
Ah yup, that could be it.
3 Views