Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Bug: 【偶发现象】ERROR [h3] [unhandled] Cannot read properties of null (reading 'stack') #4434

Closed
5 tasks done
M69W opened this issue Sep 19, 2024 · 3 comments
Closed
5 tasks done
Labels

Comments

@M69W
Copy link

M69W commented Sep 19, 2024

Version

Vben Admin V5

Describe the bug?

输入 pnpm dev
偶发出现 以下描述,
需要稍等一会,本地 api (backend-mock)的服务才正常,影响程度极低
只是偶发现象

[nitro] rollup:before: 0.185ms
[nitro] types:extend: 0.027ms

[14:36:00] ✔ Nitro Mock Server started.

 ERROR  [h3] [unhandled] Cannot read properties
 of null (reading 'stack')

  at errorHandler (F:/xxx/apps/backend-mock/error.ts:4:47)
  at Object.handler (F:/xxx/node_modules/.pnpm/nitropack@2.9.7_encoding@0.1.13/node_modules/nitropack/dist/chunks/server.mjs:365:16)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async Object.handler (F:\xxx\node_modules\.pnpm\h3@1.12.0\node_modules\h3\dist\index.cjs:1982:19)
  at async Server.toNodeHandle (F:\xxx\node_modules\.pnpm\h3@1.12.0\node_modules\h3\dist\index.cjs:2273:7)

[nitro 14:36:07] ✔ Nitro Server built in 10151 ms
[nitro] compiled: 1.059ms
[nitro] dev:reload: 280.618ms

偶发现象

Reproduction

偶发现象,并不一定能重现

System Info

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i5
  Binaries:
    Node: 20.16.0
    Yarn: 1.22.22
    npm: 10.8.1
    pnpm: 9.6.0

Relevant log output

No response

Validations

@mynetfan
Copy link
Collaborator

mynetfan commented Sep 19, 2024

这是mock server报的错。在mock server启动过程中遇到需要处理的请求时就大概率会出现这个错误。等mock server完全启动之后再发起请求就不会有这种错误了。
重现方法:运行 pnpm dev:play启动开发服务,浏览器打开登陆过期测试页面。此时关闭开发服务重新运行pnpm dev:play,在启动过程中快速去之前浏览器打开的页面里点击”点击触发“按钮以便向mock server发起一个请求。此时就会因为mock server已经开始启动但尚未准备就绪抛出你所截图的错误。

@mynetfan
Copy link
Collaborator

在控制台出现Nitro Server built in xxxx ms这条消息之后就这个错误就不会出现了

@M69W
Copy link
Author

M69W commented Sep 19, 2024

这是mock server报的错。在mock server启动过程中遇到需要处理的请求时就大概率会出现这个错误。等mock server完全启动之后再发起请求就不会有这种错误了。 重现方法:运行 pnpm dev:play启动开发服务,浏览器打开登陆过期测试页面。此时关闭开发服务重新运行pnpm dev:play,在启动过程中快速去之前浏览器打开的页面里点击”点击触发“按钮以便向mock server发起一个请求。此时就会因为mock server已经开始启动但尚未准备就绪抛出你所截图的错误。

重现过程有印象,确定如此。
之前在微信群反馈过,
thumb_172673775760933 png
就当做一个记录吧

@vbenjs vbenjs locked and limited conversation to collaborators Sep 21, 2024
@anncwb anncwb converted this issue into discussion #4460 Sep 21, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants