Skip to content

Conversation

@GabrielxDuO
Copy link

本 PR 修复了下述问题并在个人生产环境使用暂未发现引入其他问题。

问题描述

访问 Shiroi 时,博主正在进行的动态信息(此前上报的动态)未被展示,直到 ProcessReporter 上报新动态后才会显示。

复现环境

  • innei-dev/Shiroi@0e53db6(docker 环境中运行)
  • innei/mx-server:8.4.1(docker 环境中运行)
  • 948d3db/shiro/functions/ps.ts
  • Innei/ProcessReporter [email protected]

复现方式

  1. 确保 Shiroi 前端、mx-space 后端正常运行、云函数 /fn/ps/update 与 ProcessReporter 正常工作
  2. 保证 ProcessReporter 上报了一个可被识别的 process(report-assets 中有定义的)
  3. 访问 Shiroi 前端,发现头像右侧 activity 区并未显示(预期:右侧 activity 区此时就应该正常显示
  • 此时查看网络日志:

    Request URL: https://example.com/api/v2/fn/ps/update
    Request Method: POST
    Status Code: 500 Internal Server Error
    ...
    Response Body:
    {
        "ok": 0,
        "code": 80000,
        "message": "Function 执行报错: Cannot read properties of undefined (reading 'process')"
    }
  • 此时查看 docker mx-server 日志:

    mx-server  |  ERROR   [fx:ps/update]  Cannot read properties of undefined (reading 'process')
    mx-server  |
    mx-server  |   at POST (vm.js:45:31)
    mx-server  |   at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    mx-server  |
    mx-server  |
    mx-server  |  WARN   [AllExceptionsFilter]  IP: x.x.x.x 错误信息:(500) Function 执行报错: Cannot read properties of undefined (reading 'process') Path: /api/v2/fn/ps/update
    
  1. 切换前台 process,保证 ProcessReporter 上报成功

  2. 再次查看 Shiroi 前端,发现头像右侧 activity 区正常改变

@safedep
Copy link

safedep bot commented Nov 27, 2025

SafeDep Report Summary

Green Malicious Packages Badge Green Vulnerable Packages Badge Green Risky License Badge

No dependency changes detected. Nothing to scan.

This report is generated by SafeDep Github App

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 this pull request may close these issues.

1 participant