Skip to content
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

Nodejs Trace is cut off. #130

Closed
Froelund opened this issue Sep 24, 2023 · 0 comments · Fixed by #131
Closed

Nodejs Trace is cut off. #130

Froelund opened this issue Sep 24, 2023 · 0 comments · Fixed by #131

Comments

@Froelund
Copy link
Contributor

First of all - thanks for building and maintaining Sidecar 🙏

Past few days I've been digging to figure out where this issue came from

Lambda Execution Exception for App\Services\Sidecar\SSRFunction: "Cannot read properties of undefined (reading 'welcome.search'). [TRACE] TypeError: Cannot read properties of undefined (reading 'welcome.search') at new f (/var/task/node_modules/ziggy-js/dist/index.js:1:4399) at route (/var/task/node_modules/ziggy-js/dist/index.js:1:7770)".

I've enabled source-maps, but with no luck. I could not find the source of the issue. In the end, I found that when SettleResult builds the error message, it only includes 3 elements from the stack.

https:/hammerstonedev/sidecar/blob/5d1e03bd023962287aab61870a152f9d150c83c0/src/Results/SettledResult.php#L199

After changing that line to $trace = $this->trace();, I easily found the bug.

Seems limiting to slice the trace and I suggest to just add the entire trace to the error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant