nuxt
nuxt copied to clipboard
Trackback for errors during SSR shows "Missing stack frames"
Version
Reproduction link
https://codesandbox.io/s/ssr-error-uvu26
Steps to reproduce
Just open the reproduction link...
OR
- Cause an error in a component which means the SSR of a page will fail (see example)
- Navigate to the dev server URL fresh (i.e. not open already)
- You see the following error page, but the stack trace says "Missing stack frames" and some of the file names and line numbers are not showing correctly either
- Looking at the terminal too, the information emitted does not give any reference to a line number either
What is expected ?
Accurate tracebacks with correct file names, line numbers and file contents.
What is actually happening?
Missing tracebacks, confusing file names and line numbers.
Additional comments?
I have experimented with various settings for build config.devtool and these do appear to affect what is shown in the traceback, but I couldn't find a value that actually made it work correctly.
If you happen to trigger the error while you have a live frontend open (of force it by setting mode: 'spa'), the browser dev tools are able to find the correct lines in the debugger.
Thanks for your contribution to Nuxt.js! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
- Verify that you can still reproduce the issue in the latest version of nuxt-edge
- Comment the steps to reproduce it
Issues that are labeled as pending
will not be automatically marked as stale.
Still awaiting response.
I'm also interested in this. Line numbers for these errors would be mightily helpful.
Thanks for your contribution to Nuxt.js! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
- Verify that you can still reproduce the issue in the latest version of nuxt-edge
- Comment the steps to reproduce it
Issues that are labeled as pending
will not be automatically marked as stale.
Still awaiting response.
Given the bug report is provided with full details, and a clean reproduction link, it's quite disappointing that there has been absolutely no comment from the developers whatsoever.
Any update on this?
Very necessary, I'm very lost searching in all my files after a migration from Pure Vue to Nuxt.
Yes, just yesterday I guided someone new to the project through an error in asyncData()
. They are an experienced developer but new to Nuxt.
It was a simple enough error, an axios XHR request had 404’d, but they only had:
NuxtServerError Request failed with status code 404. Missing stack frames
…and a trace that only references files and line numbers from Nuxt internal processes.
Without a file and line number next to “Request failed with status code 404” they were understandably lost and frustrated.
I love using Nuxt and what it gives me, thank you team, but it’s hard to defend it when developers run into this so early in their experience.
Using Nuxt v2.10.2
Hi all. I can understand how much frustration it sometimes brings when stack traces are not available. The first issue will be improved by #7463. @mkstix6 Axios HTTP request traces are unfortunately not traceable because of how it throws the error. I will try to find a solution for it meanwhile any contribution to improvement is more than welcome :)
I would love to see debugging a bit improved. Often I experience a bug, and get the "Missing stack frames" error. The trace in the console points to a minified file, so I have no idea where to start debugging.
Same here.
Now i'm searching which products is undefined exactly.
I'm in the same situation, and can't find the origin of the error... Nuxt need to be more informative in some error messages
我也遇到了这个问题,已经解决。建议:使用二分法进行排查,即注释或还原到正常的代码,然后逐步添加新代码;
I also encountered this problem, which has been solved. Suggestion: use dichotomy to check, that is, comment or restore to normal code, and then gradually add new code;
Still frustrating in 2021
Worth mentioning sometimes if you set mode: 'spa'
just temporarily you can get the error to fire on the frontend instead which can help track it down in normal debug tools.
Same. Very sad it's not implemented ((
Mid 2022 and I'm still experiencing this :shrug:
Trying to migrate one of our apps from spa
to ssr
and the errors are an absolute nightmare. You have to guess were something went wrong and if you don't know then tough luck. If it were not for the SEO benefits and fast loading speeds of ssr
we would have gladly stuck with using spa
mode.
Worth mentioning sometimes if you set mode: 'spa' just temporarily you can get the error to fire on the frontend instead which can help track it down in normal debug tools.
Nowadays this can be done via:
ssr: false