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

Error reporting fails on undefined error index #5526

Closed
1 task
jasikpark opened this issue Dec 3, 2022 · 7 comments · Fixed by #5539
Closed
1 task

Error reporting fails on undefined error index #5526

jasikpark opened this issue Dec 3, 2022 · 7 comments · Fixed by #5539
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@jasikpark
Copy link
Contributor

jasikpark commented Dec 3, 2022

What version of astro are you using?

astro@0.0.0-error-overlay-20221130171441

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

Getting an undefined property access on errors[i].message

may be useful to enable "noUnindexedAccess" in the repo for typescript..

file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/core/errors/dev/utils.js:41
      err[i].message = text;
                     ^

TypeError: Cannot set properties of undefined (setting 'message')
    at file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/core/errors/dev/utils.js:41:22
    at Array.forEach (<anonymous>)
    at collectErrorMetadata (file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/core/errors/dev/utils.js:38:14)
    at onError (file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/vite-plugin-astro-server/request.js:59:33)
    at runWithErrorHandling (file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/vite-plugin-astro-server/controller.js:68:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async handleRequest (file:///Users/calebjasik/Git/aoc-astro/node_modules/.pnpm/astro@0.0.0-error-overlay-20221130171441/node_modules/astro/dist/vite-plugin-astro-server/request.js:39:3)
 ELIFECYCLE  Command failed with exit code 1.

aoc-astro on  main [!] via  v16.17.1 took 4s 
❯ 

Link to Minimal Reproducible Example

https://github.com/jasikpark/aoc-astro/blob/astro-dev-server-bug/src/pages/aoc/02/index.mdx
https://stackblitz.com/~/github.com/jasikpark/aoc-astro/blob/astro-dev-server-bug/src/pages/aoc/02/index.mdx

Participation

  • I am willing to submit a pull request for this issue.
@jasikpark
Copy link
Contributor Author

@Princesseuh helped me w/ this in discord, it's unrelated to #5495

@Princesseuh Princesseuh self-assigned this Dec 3, 2022
@Princesseuh Princesseuh added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Dec 3, 2022
@Princesseuh
Copy link
Member

Not marking as a p5 since it doesn't affect a lot of users, but this one is pretty important because it crash the dev server

@JerryWu1234
Copy link
Contributor

What link do I access can replicate this bug?

image
nothing happen in my client

@jasikpark
Copy link
Contributor Author

ah, i may have not uploaded the commit that triggers it

@jasikpark
Copy link
Contributor Author

I updated the branch linked, it should trigger now by running the dev server && loading http://localhost:3000/aoc/02/

@JerryWu1234
Copy link
Contributor

I updated the branch linked, it should trigger now by running the dev server && loading http://localhost:3000/aoc/02/

Thanks let me try late

@JerryWu1234
Copy link
Contributor

Yes, I got it. i'm trying to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants