nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

Trackback for errors during SSR shows "Missing stack frames"

Open philipmountifield opened this issue 4 years ago • 20 comments

Version

v2.10.2

Reproduction link

https://codesandbox.io/s/ssr-error-uvu26

Steps to reproduce

Just open the reproduction link...

OR

  1. Cause an error in a component which means the SSR of a page will fail (see example)
  2. Navigate to the dev server URL fresh (i.e. not open already)
  3. 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
  4. Looking at the terminal too, the information emitted does not give any reference to a line number either

SSR Fail 2.png

Terminal.png

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.

This bug report is available on Nuxt community (#c9965)

philipmountifield avatar Oct 31 '19 09:10 philipmountifield

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:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

stale[bot] avatar Nov 30 '19 09:11 stale[bot]

Still awaiting response.

philipmountifield avatar Dec 02 '19 08:12 philipmountifield

I'm also interested in this. Line numbers for these errors would be mightily helpful.

mkstix6 avatar Dec 02 '19 19:12 mkstix6

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:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

stale[bot] avatar Jan 01 '20 19:01 stale[bot]

Still awaiting response.

philipmountifield avatar Jan 01 '20 20:01 philipmountifield

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.

philipmountifield avatar Jan 01 '20 20:01 philipmountifield

Any update on this?

absalan avatar Mar 08 '20 08:03 absalan

Very necessary, I'm very lost searching in all my files after a migration from Pure Vue to Nuxt.

jonalxh avatar Jun 06 '20 05:06 jonalxh

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.

9C0EB165-8115-484D-BCCF-100B631A5C4B

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

mkstix6 avatar Jun 06 '20 06:06 mkstix6

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 :)

pi0 avatar Jun 06 '20 18:06 pi0

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.

simplenotezy avatar Aug 05 '20 12:08 simplenotezy

Same here.

image

Now i'm searching which products is undefined exactly.

Warxcell avatar Sep 29 '20 06:09 Warxcell

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

msoler75 avatar Apr 01 '21 13:04 msoler75

我也遇到了这个问题,已经解决。建议:使用二分法进行排查,即注释或还原到正常的代码,然后逐步添加新代码;

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;

PLQin avatar Apr 22 '21 02:04 PLQin

Still frustrating in 2021

finfa avatar Apr 28 '21 14:04 finfa

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.

tekpanda avatar Apr 29 '21 10:04 tekpanda

Same. Very sad it's not implemented ((

tylik1 avatar Jun 15 '21 08:06 tylik1

Mid 2022 and I'm still experiencing this :shrug:

MacroMan avatar Jun 23 '22 09:06 MacroMan

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.

Ghustavh97 avatar Jul 01 '22 09:07 Ghustavh97

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

tennox avatar Jan 25 '24 17:01 tennox