Giter Site home page Giter Site logo

mx-space / core Goto Github PK

View Code? Open in Web Editor NEW
229.0 4.0 76.0 10.42 MB

😎 The next generation of RESTful API service and more feature for Mix Space, powered by @nestjs.

License: Other

JavaScript 2.07% TypeScript 97.20% Shell 0.48% HTML 0.25%
nodejs node nestjs blog mx-space restful-api cron mongoose typegoose typescript

core's Introduction

Mix Space Core

本项目使用 Monorepo 进行管理。

许可

此项目在 apps/ 目录下的所有文件均使用 GNU Affero General Public License v3.0 (AGPLv3) with Additional Terms (ADDITIONAL_TERMS) 许可。

其他部分使用 MIT License 许可。

详情请查看 LICENSEADDITIONAL_TERMS

core's People

Contributors

blxcwg666 avatar chingcdesu avatar cielneko avatar dependabot[bot] avatar innei avatar renovate-bot avatar renovate[bot] avatar solomon-cc avatar tinsfox avatar ttimochan avatar vxrain avatar wibus-wee avatar wuhang2003 avatar xbisland avatar zsbai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

core's Issues

关于api-client接口select字段的疑问

我在开发一个 mx-space 的前端主题,对 api-client 接口里面 select 选项有点疑问和建议,希望大佬可以解惑。

疑问:

  1. select中 +xxx 和 -xxx 是什么作用?我测试post接口无论使用 + 还是 - ,接口返回都只有id字段。不使用 + 或者 - ,返回的是正确的已选择字段,不清楚是不是bug。

建议:

  1. 接口返回值可以根据 select 内选择的字段自动 Pick 内字段,类似 primsa select 那样。

建议增强垃圾评论过滤功能

Clear and concise description of the problem

当前的垃圾评论过滤只有关键词过滤 尚存不足

Suggested solution

建议添加以下功能

  • 限定/拉黑邮箱后缀(多个)
  • 同一IP在博主已读一条评论之前最多只能发${int}条
  • 同一IP速度限制
  • 字数限制至少${int}字

Alternative

No response

Additional context

No response

Validations

博文阅读数量计算不准确

Describe the bug

如题,目前定位的猜测原因是:
客户端访问了前端 Shiro 博文 URL,如 https://arthals.ink/posts/experience/attack-lab 的同时没有和后端沟通,是服务器上的 Next.js 同后端进行的沟通(服务端渲染),即反向代理前端的服务端 2323 端口会请求反向代理后端 API 地址的服务器 2333 端口的 https://api.arthals.ink/api/v2/posts/experience/attack-lab 。这导致后端访问日志中一直只能看到服务器自己的 IP 在请求 API ,也就导致了阅读量的计算不准确。经过尝试,我发现此问题和前后端是否设置 XFF/XRP 头部没有任何关系。

我希望能够直接将阅读量改为按照请求次数计数,这样就能解决这个问题了(否则前端 Shiro 更改渲染模式我估计会更加难以实现)

同时,我注意到,在 mx-admin 页面的数据-访问路径这个列表并不会随着切换页码而刷新,必须切换页码后再次刷新页面才能更新(即使URL参数已经改变至 https://api.arthals.ink/proxy/qaqdmin#/analyze?page=2 ,但是显示的依旧是https://api.arthals.ink/proxy/qaqdmin#/analyze?page=1 的内容)

Reproduction

打开控制台和后台刷新试试即可复现

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (2) x64 Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
    Memory: 5.75 GB / 7.25 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v18.18.0/bin/npm
    pnpm: 8.8.0 - ~/.nvm/versions/node/v18.18.0/bin/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

更新后无法查看评论了

Describe the bug

上次更新是年前,今天上班的时候看了一下后台发现看不了评论了,然后我更新了一下。还是像图片中显示的这样,其他功能正常。

使用 docker 部署

image
image
image

Reproduction

System Info

错误日志
17:56:28  ERROR   [AuthService]  clerk jwt valid error: invalid algorithm
17:56:28  ERROR   [AuthService]  clerk jwt valid error: invalid algorithm
17:56:28  WARN   [AllExceptionsFilter]  IP: 43.207.68.61 错误信息:(401) 身份过期 Path: /api/v2/aggregate/stat?t=1708509376108
17:56:28  ERROR   [AuthService]  clerk jwt valid error: invalid algorithm
17:56:28  WARN   [AllExceptionsFilter]  IP: 43.207.68.61 错误信息:(404) Cannot GET /api/v2/init?t=1708509376285 Path: /api/v2/init?t=1708509376285
17:56:33  ERROR   [AuthService]  clerk jwt valid error: invalid algorithm
17:56:33  WARN   [UserService]  主人已登录,IP: 43.207.68.61
17:56:35  ERROR   [Catch]  Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)

  Use mongoose.model(name, schema)
  at Connection.model (entrypoints.js:241:4323)
  at _getModelFromConn (entrypoints.js:596:1564)
  at addModelNamesToMap (entrypoints.js:596:345)
  at getModelsMapForPopulate (entrypoints.js:590:11812)
  at populate (entrypoints.js:710:581)
  at _populate (entrypoints.js:707:7939)
  at entrypoints.js:707:7780
  at new Promise (<anonymous>)
  at Function.populate (entrypoints.js:707:7757)
  at le.Query._find (entrypoints.js:783:1016)
[February 21, 2024 at 5:56:35 PM] /api/v2/comments?t=1708509382922&page=1&size=10&state=0: Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)
MissingSchemaError: Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)
    at Connection.model (/app/entrypoints.js:241:4323)
    at _getModelFromConn (/app/entrypoints.js:596:1564)
    at addModelNamesToMap (/app/entrypoints.js:596:345)
    at getModelsMapForPopulate (/app/entrypoints.js:590:11812)
    at populate (/app/entrypoints.js:710:581)
    at _populate (/app/entrypoints.js:707:7939)
    at /app/entrypoints.js:707:7780
    at new Promise (<anonymous>)
    at Function.populate (/app/entrypoints.js:707:7757)
    at le.Query._find (/app/entrypoints.js:783:1016)
17:56:41  ERROR   [Catch]  Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)

  Use mongoose.model(name, schema)
  at Connection.model (entrypoints.js:241:4323)
  at _getModelFromConn (entrypoints.js:596:1564)
  at addModelNamesToMap (entrypoints.js:596:345)
  at getModelsMapForPopulate (entrypoints.js:590:11812)
  at populate (entrypoints.js:710:581)
  at _populate (entrypoints.js:707:7939)
  at entrypoints.js:707:7780
  at new Promise (<anonymous>)
  at Function.populate (entrypoints.js:707:7757)
  at le.Query._find (entrypoints.js:783:1016)
[February 21, 2024 at 5:56:41 PM] /api/v2/comments?t=1708509388704&page=1&size=10&state=0: Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)
MissingSchemaError: Schema hasn't been registered for model "recentlies".
Use mongoose.model(name, schema)
    at Connection.model (/app/entrypoints.js:241:4323)
    at _getModelFromConn (/app/entrypoints.js:596:1564)
    at addModelNamesToMap (/app/entrypoints.js:596:345)
    at getModelsMapForPopulate (/app/entrypoints.js:590:11812)
    at populate (/app/entrypoints.js:710:581)
    at _populate (/app/entrypoints.js:707:7939)
    at /app/entrypoints.js:707:7780
    at new Promise (<anonymous>)
    at Function.populate (/app/entrypoints.js:707:7757)
    at le.Query._find (/app/entrypoints.js:783:1016)

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[P0] Docker Compose 3344 端口暴露可能导致数据库被黑

紧急事项:我们近期发现部分用户数据库遭到非法入侵。初步调查显示,此次安全事件可能与 Docker 容器中的 MongoDB 端口被公开暴露在互联网上有关。

问题描述:若您的 MongoDB 的端口在 Docker 容器中暴露在公网上,可能会增加被恶意攻击的风险。

解决方案

  1. 请立即检查您的 docker-compose 文件。如果您的配置与下面的类似:
  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./data/db:/data/db
    ports:
      - '3344:27017'
    networks:
      - app-network
    restart: always
  redis:
    image: redis
    container_name: redis

那么您需要重点关注 ports 项。

  1. 为了加强安全性,请将 ports 配置项中的 '3344:27017' 删除,从而防止外部访问。如果您仍然需要端口转发,请确保只在 127.0.0.1 上进行监听,这样可以确保只有本机可以访问,如:
    ports:
      - '127.0.0.1:3344:27017'
  1. 同样地,对于 Redis 服务,请也确保端口仅在 127.0.0.1 上监听。

最后,请定期检查并更新您的系统和服务,以确保其安全性。如果有任何疑问或需要进一步的帮助,请及时联系我们。

文章内单独链接无法显示

cor使用docker部署,最新版本
前端主题是shiro,,最新版本,使用的vercel部署

问题:

markdown文章中的单独参考链接,预览的时候正常,但是发布后部分不显示,我测试的2个链接只显示GitHub网站的链接。


复现:

测试内容
image

预览界面
image

网站界面只显示GitHub的链接
image

Version control bug

Describe the bug

Cleanshot-2023-12-24-at-23 04 27@2x

怎么感觉似曾相识(?

起因是发现 admin 更新 3.36 了 就重新拉了一下docker镜像,然后又跳出这个问题来了(

Reproduction

no need

System Info

no need.

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • innei/mx-server 5
dockerfile
dockerfile
  • node 20-alpine
  • node 20-alpine
github-actions
.github/workflows/api-client.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • pnpm/action-setup v3.0.0
.github/workflows/ci.yml
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/build-push-action v5
  • actions/checkout v4
  • actions/setup-node v4
  • pnpm/action-setup v3.0.0
  • actions/cache v4
  • supercharge/mongodb-github-action v1.10.0
  • supercharge/redis-github-action 1.8.0
  • actions/checkout v4
  • actions/setup-node v4
  • pnpm/action-setup v3
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-node v4
  • supercharge/mongodb-github-action v1.10.0
  • supercharge/redis-github-action 1.8.0
  • pnpm/action-setup v3.0.0
  • actions/cache v4
  • actions/create-release v1
  • actions/upload-release-asset v1
  • robinraju/release-downloader v1.10
  • appleboy/scp-action v0.1.7
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/setup-buildx-action v3
  • docker/build-push-action v5
  • docker/login-action v3
  • docker/build-push-action v5
  • ubuntu 22.04
npm
apps/core/external/pino/package.json
apps/core/external/request/package.json
apps/core/package.json
  • @algolia/client-search ^4.22.1
  • @aws-sdk/client-s3 3.556.0
  • @babel/core 7.24.4
  • @babel/plugin-transform-modules-commonjs 7.24.1
  • @babel/plugin-transform-typescript 7.24.4
  • @babel/types ^7.24.0
  • @clerk/clerk-sdk-node 5.0.2
  • @fastify/cookie 9.3.1
  • @fastify/multipart 8.2.0
  • @fastify/static 7.0.3
  • @innei/next-async 0.3.0
  • @nestjs/cache-manager 2.2.2
  • @nestjs/common 10.3.8
  • @nestjs/core 10.3.8
  • @nestjs/event-emitter 2.0.4
  • @nestjs/mapped-types ^2.0.5
  • @nestjs/platform-fastify 10.3.8
  • @nestjs/platform-socket.io 10.3.8
  • @nestjs/schedule 4.0.2
  • @nestjs/throttler 5.1.2
  • @nestjs/websockets 10.3.8
  • @simplewebauthn/server 9.0.3
  • @socket.io/redis-adapter 8.3.0
  • @socket.io/redis-emitter 5.1.0
  • @typegoose/auto-increment 4.3.0
  • @typegoose/typegoose 12.4.0
  • @types/jsonwebtoken 9.0.6
  • algoliasearch 4.23.3
  • axios ^1.6.7
  • axios-retry 4.1.0
  • bcryptjs ^2.4.3
  • cache-manager 5.5.1
  • cache-manager-ioredis-yet 2.0.3
  • class-validator-jsonschema 3.1.2
  • cls-hooked ^4.2.2
  • commander 12.0.0
  • dayjs 1.11.10
  • ejs 3.1.10
  • form-data 4.0.0
  • get-image-colors 4.0.1
  • image-size 1.1.1
  • inquirer ^9.2.15
  • isbot 5.1.5
  • js-yaml ^4.1.0
  • json5 2.2.3
  • jsonwebtoken 9.0.2
  • jszip 3.10.1
  • linkedom 0.16.11
  • lodash ^4.17.21
  • lru-cache 10.2.1
  • marked 12.0.2
  • mime-types ^2.1.35
  • mkdirp ^3.0.1
  • mongoose 8.3.2
  • mongoose-aggregate-paginate-v2 1.0.7
  • mongoose-autopopulate 1.1.0
  • mongoose-lean-getters 2.0.1
  • mongoose-lean-virtuals 0.9.1
  • mongoose-paginate-v2 1.8.0
  • nestjs-pretty-logger 0.2.2
  • node-machine-id 1.1.12
  • nodemailer 6.9.13
  • openai 4.38.5
  • pluralize ^8.0.0
  • qs 6.12.1
  • reflect-metadata 0.2.2
  • remove-markdown 0.5.0
  • remove-md-codeblock 0.0.4
  • rxjs 7.8.1
  • semver 7.6.0
  • slugify 1.6.6
  • source-map-support ^0.5.21
  • ua-parser-js 1.0.37
  • vm2 3.9.19
  • wildcard-match 5.1.3
  • xss 1.0.15
  • zx-cjs 7.0.7-0
  • @nestjs/cli 10.3.2
  • @nestjs/schematics 10.1.1
  • @nestjs/testing 10.3.8
  • @swc/core 1.5.2
  • @types/babel__core 7.20.5
  • @types/bcryptjs ^2.4.6
  • @types/cache-manager 4.0.6
  • @types/cls-hooked ^4.3.8
  • @types/ejs 3.1.5
  • @types/get-image-colors 4.0.5
  • @types/js-yaml 4.0.9
  • @types/lodash 4.17.0
  • @types/mime-types 2.1.4
  • @types/mongoose-aggregate-paginate-v2 1.0.12
  • @types/node 20.12.7
  • @types/nodemailer 6.4.14
  • @types/qs 6.9.15
  • @types/remove-markdown 0.3.4
  • @types/semver 7.5.8
  • @types/ua-parser-js 0.7.39
  • @types/validator 13.11.9
  • @vercel/ncc 0.38.1
  • cron ^3.1.6
  • husky 9.0.11
  • ioredis 5.4.1
  • socket.io ^4.7.4
  • unplugin-swc 1.4.5
  • vite-tsconfig-paths 4.3.2
  • mongodb-memory-server ^9.1.5
  • redis-memory-server ^0.10.0
external/pino/package.json
external/request/package.json
package.json
  • zx-cjs 7.0.7-0
  • @innei/eslint-config-ts 0.13.1
  • @innei/prettier 0.13.1
  • @types/node 20.12.7
  • cross-env 7.0.3
  • eslint-plugin-unused-imports 3.1.0
  • husky 9.0.11
  • lint-staged 15.2.2
  • prettier 3.2.5
  • rimraf 5.0.5
  • ts-node 10.9.2
  • tsconfig-paths 4.2.0
  • tsup 8.0.2
  • typescript 5.4.5
  • vite-tsconfig-paths 4.3.2
  • mongodb-memory-server 9.1.8
  • redis-memory-server 0.10.0
  • semver 7.6.0
  • typescript 5.4.5
  • pnpm 9.0.6
packages/api-client/package.json
  • @types/cors 2.8.17
  • @types/express 4.17.21
  • @types/lodash 4.17.0
  • abort-controller 3.0.0
  • axios ^1.6.7
  • camelcase-keys ^9.1.3
  • cors 2.8.5
  • express 4.19.2
  • form-data 4.0.0
  • lodash 4.17.21
  • tsup 8.0.2
  • umi-request 1.4.0
packages/external/package.json
  • nanoid 5.0.7
packages/webhook/package.json
  • express 4.19.2

  • Check this box to trigger a request for Renovate to run again on this repository

访问后端提示{"ok":0,"message":"Cannot GET /"}

Describe the bug

环境:debain11.8
版本:v4.3.12
安装方式为docker-compose
按照教程部署后端,访问反代域名和ip:2333会出现{"ok":0,"message":"Cannot GET /"}
日志为:

�[90m24:02:30�[39m �[32m[Nest] 1  - �[39m10/21/2023, 12:02:30 AM �[32m    LOG�[39m �[32m�[34m数据目录已经建好:/root/.mx-space�[39m�[39m
�[90m24:02:30�[39m �[32m[Nest] 1  - �[39m10/21/2023, 12:02:30 AM �[32m    LOG�[39m �[32m�[34m临时目录已经建好:/tmp/mx-space�[39m�[39m
�[90m24:02:30�[39m �[32m[Nest] 1  - �[39m10/21/2023, 12:02:30 AM �[32m    LOG�[39m �[32m�[34m日志目录已经建好:/root/.mx-space/log�[39m�[39m
�[90m24:02:30�[39m �[32m[Nest] 1  - �[39m10/21/2023, 12:02:30 AM �[32m    LOG�[39m �[32m�[34m资源目录已经建好:/root/.mx-space/assets�[39m�[39m
�[90m24:02:30�[39m �[32m[Nest] 1  - �[39m10/21/2023, 12:02:30 AM �[32m    LOG�[39m �[32m�[34m文件存放目录已经建好:/root/.mx-space/static�[39m�[39m
�[90m24:02:31�[39m cwd:  /app
�[90m24:02:31�[39m �[36mℹ�[39m [�[33mMongoDB�[39m] �[32mconnecting...�[39m
�[90m24:02:31�[39m �[36mℹ�[39m [�[33mMongoDB�[39m] �[32mreadied!�[39m
�[90m24:02:33�[39m �[36mℹ�[39m ENV: production
�[90m24:02:33�[39m �[32m✔�[39m [P1] Server listen on: http://127.0.0.1:2333
�[90m24:02:33�[39m �[32m✔�[39m [P1] Admin Dashboard: http://127.0.0.1:2333/qaqdmin
�[90m24:02:33�[39m �[32m✔�[39m [P1] Admin Local Dashboard: http://127.0.0.1:2333/proxy/qaqdmin
�[90m24:02:33�[39m �[36mℹ�[39m  [�[95mSystem�[39m]  �[32mServer is up. �[33m+5191ms�[39m�[32m�[39m
�[90m24:02:33�[39m �[43m�[30m WARN �[39m�[49m  [�[33mEmailService�[39m]  �[33m未启动邮件通知�[39m
�[90m24:02:36�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:02:38�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:02:57�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:02:59�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:03:00�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:03:02�[39m �[43m�[30m WARN �[39m�[49m  [�[33mAllExceptionsFilter�[39m]  �[33mIP: ***.101.144.50 错误信息:(404) Cannot GET / Path: /�[39m
�[90m24:05:00�[39m �[36mℹ�[39m  [�[33mCronService�[39m]  �[32m--> 清理日志文件成功�[39m

Reproduction

clog.timero.xyz

System Info

环境:debain11.8
版本:v4.3.12
浏览器:vivaldi

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

支持 M2 arm docker 部署

Clear and concise description of the problem

我想要在本地的 Apple M2 上部署 mx-sapce 🤪

Suggested solution

请提供一个 arm 的 docker image 🫡

Alternative

No response

Additional context

跟着文档

无法运行起来,貌似是现在的镜像不支持在 arm 上面运行

image

Validations

Passkey无法正常录入、后台地址无法自定义、教程文档内容需修正

Describe the bug

  1. Passkey无法正常录入

环境如图
image

Windows正常录入密钥
image

后台报错
image

2.后台地址无法自定义
系统初始化的时候可以输入后台地址路径,那为啥子没办法改后台地址
image
image

3.教程文档内容需修正
我是一个了解mx-space存在但是是没用过的人,照着教程弄了很久第一次打开后端依旧还是提示

{
    "ok": 0,
    "message": "Cannot GET /"
}

在我翻遍文档无果后Google了一番才发现原来有 /qwqadmin 这一个管理后台的入口,而我在教程文档里没有看到,再三阅览,我发现了这段话
c981e457f347c4fd16818b11e31cef6
我说你们。。。真的很歧视小白吗?
另外再建议当issue累积到一个程度后可以开一个报错专栏,方便萌新知道是哪出了问题
以上就是所有的内容。

Reproduction

有附图

System Info

Linux VM-8-17-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Used Package Manager

n/a

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[Bug] 在同一机器上开启多mx-space docker服务似乎会有冲突

Describe the bug

我在一台机器上试图使用docker开启两个mx-space服务,它们两个总会有一个不工作。
主要问题出现在,无论在docker_compose.yml中设置什么名称的redis及mongo,mx-space容器内总是会尝试访问原来名称的redis和mongo服务,但名称以及端口我都已经修改过了。

如以下示例:

正常流程的yml,它是正常工作的:

version: '3.8'

services:
  app:
    container_name: mx-server
    image: innei/mx-server:latest
    command: bash ./docker-run.sh
    environment:
      - TZ=Asia/Shanghai
      - NODE_ENV=production
      - ALLOWED_ORIGINS
      - JWT_SECRET
      - ENCRYPT_KEY
      - ENCRYPT_ENABLE

    volumes:
      - ./data/mx-space:/root/.mx-space
    ports:
      - '127.0.0.1:2333:2333'
    depends_on:
      - mongo
      - redis
    links:
      - mongo
      - redis
    networks:
      - app-network
    restart: always
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:2333/api/v2/ping']
      interval: 1m30s
      timeout: 30s
      retries: 5
      start_period: 30s

  mongo:
    container_name: mongo
    image: mongo
    volumes:
      - ./data/db:/data/db
    networks:
      - app-network
    restart: always
  redis:
    image: redis
    container_name: redis

    networks:
      - app-network
    restart: always

networks:
  app-network:
    driver: bridge

修改后的yml:

version: '3.8'

services:
  miao-app:
    container_name: miao-mx-server
    image: innei/mx-server:latest
    command: bash ./docker-run.sh
    environment:
      - TZ=Asia/Shanghai
      - NODE_ENV=production
      - ALLOWED_ORIGINS
      - JWT_SECRET
      - ENCRYPT_KEY
      - ENCRYPT_ENABLE

    volumes:
      - ./data/mx-space:/root/.mx-space
    ports:
      - '127.0.0.1:3332:2333'
    depends_on:
      - miao-mongo
      - miao-redis
    links:
      - miao-mongo
      - miao-redis
    networks:
      - miao-app-network
    restart: always
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:2333/api/v2/ping']
      interval: 1m30s
      timeout: 30s
      retries: 5
      start_period: 30s

  miao-mongo:
    container_name: miao-mongo
    image: mongo
    volumes:
      - ./data/db:/data/db
    networks:
      - miao-app-network
    restart: always
  miao-redis:
    image: redis
    container_name: miao-redis

    networks:
      - miao-app-network
    restart: always

networks:
  miao-app-network:
    driver: bridge

它会报错:

[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 数据目录已经建好:/root/.mx-space
[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 临时目录已经建好:/tmp/mx-space
[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 日志目录已经建好:/root/.mx-space/log
[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 资源目录已经建好:/root/.mx-space/assets
[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 文件存放目录已经建好:/root/.mx-space/static
[Nest] 1  - 02/18/2024, 12:02:25 PM     LOG 文件回收站目录已经建好:/tmp/mx-space/trash
cwd:  /app

 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)


 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)


 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)


 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)


 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)


 ERROR  [ioredis] Unhandled error event: Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)

Reproduction

above

System Info

Linux version 5.15.0-84-generic (buildd@lcy02-amd64-005) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023

Docker 
Client: Docker Engine - Community
 Version:           25.0.3

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

文章管理显示不正常

Describe the bug

更新了 v5.1.2,然后文章管理这成这样了
image

Reproduction

升级 v5.1.2,然后打开后台文章管理

System Info

System:

Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

  System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
    Memory: 824.09 MB / 1.80 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.19.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
    pnpm: 8.15.2 - /usr/local/bin/pnpm

API:

{"name":"@mx-space/core","author":"Innei <https://innei.ren>","version":"5.1.2","homepage":"https://github.com/mx-space/core#readme","issues":"https://github.com/mx-space/core/issues"}

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

未完全更新后,前台显示502 Bad Gateway

问题

昨天上后台好像显示有新的更新 ---- 面板版本: 3.24.2。
我在后台Output那边更新,但是半小时一直没反应,随后去mix space文档手动更新。
https://img.yuano.cc/upload/cankao01.png
参考的是这篇,安装依赖的时候 pnpm i 也一直未动,执行了后面的构建、启动前端。
最后前台崩了,https://yuano.cc/。显示502 Bad Gateway
请问怎么可以解决恢复一下呀......感谢!!后端显示是完好的。

对了,想起来我是国内的机器,可能拉取拉不到,所以一直更新不动....

系统环境

Ubuntu/20.04 LTS amd64(64 位)
国内百度云主机。

报错日志

11:11:44 WARN [AllExceptionsFilter] IP: 错误信息: (404) Cannot GET / Path: /
11:11:45 WARN [AllExceptionsFilter] IP: 错误信息: (404) Cannot GET / Path: /
11:23:23 WARN [AllExceptionsFilter] IP: 错误信息: (404) Cannot GET /api/v2/init?t=Path: /api/v2/init?t=
11:23:25 WARN [UserService] 主人已登录, IP:
11:23:25 WARN [UserService] 主人已登录, IP:
11:24:22 WARN [AllExceptionsFilter] IP:错误信息: (404) Cannot GET / Path: /
11:26:20 WARN [AllExceptionsFilter] IP:错误信息: (404) Cannot GET /api/v2/init?t=Path: /api/v2/init?t=
11:26:22 WARN [UserService] 主人已登录, IP:
11:26:22 WARN [UserService] 主人已登录, IP:
11:29:29 WARN [AllExceptionsFilter] IP: 错误信息: (404) Cannot GET /api/v2/init?t=Path: /api/v2/init?t=
11:29:30 WARN [UserService] 主人已登录, IP:
11:29:31 WARN [UserService] 主人已登录, IP:
11:29:38 WARN [UserService] 主人已登录, IP:
11:30:04 WARN [AllExceptionsFilter] IP: 错误信息: (404) Cannot GET /owa/auth/logon.aspx?url=https%3a%2f%2f1%2fecp%2f Path: /owa/auth/logon.aspx?url=

Unable to set up MX Space

Describe the bug

Followed the exact set up steps for docker, after launching the core, the following error message appears in the log file.

[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 数据目录已经建好:/root/.mx-space
[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 临时目录已经建好:/tmp/mx-space
[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 日志目录已经建好:/root/.mx-space/log
[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 资源目录已经建好:/root/.mx-space/assets
[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 文件存放目录已经建好:/root/.mx-space/static
[Nest] 1  - 03/19/2024, 8:37:25 AM     LOG 文件回收站目录已经建好:/tmp/mx-space/trash
cwd:  /app
[Nest] 1  - 03/19/2024, 8:37:26 AM   ERROR [ExceptionHandler] Invalid count value: -2
RangeError: Invalid count value: -2
    at String.repeat (<anonymous>)
    at JWTService.init (/app/entrypoints.js:2:524440)
    at new JWTService (/app/entrypoints.js:2:524121)
    at Injector.instantiateClass (/app/entrypoints.js:45:207438)
    at callback (/app/entrypoints.js:45:200650)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Injector.resolveConstructorParams (/app/entrypoints.js:45:202412)
    at async Injector.loadInstance (/app/entrypoints.js:45:200760)
    at async Injector.loadProvider (/app/entrypoints.js:45:201392)
    at async /app/entrypoints.js:45:212836

Reproduction

N/A

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC-Rome Processor
    Memory: 1.60 GB / 3.82 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.19.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

修改评论排序方式

问题

请问如何修改评论的排序方式

详细描述

手机端的排序方式是,最新评论在前
C80E9DAC-CE0A-4B3E-96CC-5BBAF3E6F4E3

可是电脑端的排序方式是,最老的评论在前。
6CFAD1A4-5DE1-42A7-A06B-88F209D976CB

我想让电脑端,最新的在前,请问可以怎么改嘛...

报错日志

你认为是什么样子

[Bug] Bark notifier not work

Describe the bug

如题,Bark 通知现在似乎是不可用状态。

设置了正确的 Device ID,尝试填写服务器 URL 为 https://api.day.app/ 或者 https://day.app/ ,测试评论,通知均不可用。

值得一提的是,这个 https://day.app/ 默认值似乎并不生效:

image

Reproduction

As desc.

System Info

No need.

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

使用docker一键部署脚本部署后,mx-admin界面会出现黑条,并且再setup-api中无法设置

Describe the bug

image
image
后台界面上出现黑条,因为我是mx-space的老用户,之前老版本(一年前?)部署的时候不存在这个问题,因为之前的云服务器到期了又换了一个重新部署最新的版本,遇到了这个问题。不知道是不是自己操作出了问题。
image
使用docker一键部署脚本

Reproduction

全新的服务器,先按照前置要求配置安装docker和nvm之后,使用一键部署脚本,初始化后台就会遇到这个问题,但是可以继续初始化个人信息

System Info

System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (2) x64 AMD EPYC 7K62 48-Core Processor
    Memory: 166.41 MB / 1.70 GB
    Container: Yes
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.14.2/bin/npm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

预制包本地运行时报错

Describe the bug

在尝试最新release中的包运行 index.js 时报错,初步分析是因为某个debug文件缺失。

日志:
https://pb.envs.net/?3c853ac794a27ed8#85i9LSkNvLmpbQo5cXJeMXsFp5r7meswHZdT5iAiXE2f

Reproduction

从release中下载release-linux.zip,解压后运行 node index.js

System Info

System:
    OS: Linux 6.4 Arch Linux
    CPU: (12) x64 AMD Ryzen 5 5600U with Radeon Graphics
    Memory: 1.94 GB / 13.51 GB
    Container: Yes
    Shell: 3.6.1 - /usr/bin/fish
  Binaries:
    Node: 16.20.1 - ~/.local/share/nvm/v16.20.1/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.4 - ~/.local/share/nvm/v16.20.1/bin/npm

Used Package Manager

n/a

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

建议支持自定义 Gravatar 源

Clear and concise description of the problem

如题
cravatar 有时候不是很好用(

Suggested solution

在设置里面加一个选项,让用户自定义 Gravatar 镜像源

Alternative

No response

Additional context

No response

Validations

删除文章后不会在xlog上删除

Describe the bug

如题
在 mx-admin 后台删除已经同步到 xlog 的文章,在 xlog 的这篇文章不会随着 mx space 的删除而删除

Reproduction

新建文章,发布,同步到 xlog,删除文章,查看 xlog

System Info

System:

root@Nya:/opt/mx-space/core# npx envinfo --system --binaries --browsers
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

  System:
    OS: Linux 6.7 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) x64 Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
    Memory: 2.28 GB / 3.83 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.19.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
    pnpm: 8.15.4 - /usr/local/bin/pnpm

root@Nya:/opt/mx-space/core#

API:

{"name":"@mx-space/core","author":"Innei <https://innei.ren>","version":"5.4.4","homepage":"https://github.com/mx-space/core#readme","issues":"https://github.com/mx-space/core/issues"}

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

升级出现了问题

操作信息:
操作系统 Ubuntu / 20.04 LTS amd64 (64bit)
面板版本: 3.27.1
系统版本:3.42.4
Linux version 5.4.0-109-generic (buildd@ubuntu) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) mx-space/kami#123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022

问题经过:

有推送【管理中台】新版本,然后去kami文件夹里面执行了一下pnpm i 。

日志信息显示:

root@yuano:~/mx-space/kami# pnpm i
Scope: all 2 workspace projects
 WARN  deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
packages/kami-design                     |  WARN  deprecated [email protected]
 WARN  GET https://registry.npmjs.org/@esbuild%2Flinux-riscv64 error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@esbuild%2Fandroid-x64 error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
 WARN  GET https://registry.npmjs.org/@esbuild%2Fdarwin-arm64 error (ECONNRESET). Will retry in 10 seconds. 2 retries left.
Packages: +50 -93
++++++++++++++++++++++++++++++++++------------------------------------------------------------------
Progress: resolved 760, reused 705, downloaded 22, added 50, done
node_modules/.pnpm/[email protected]/node_modules/esbuild: Running postinstall script, done in 91ms

dependencies:
- react-intersection-observer 9.4.2
+ react-intersection-observer 9.4.3
- swr 2.0.3
+ swr 2.1.0

devDependencies:
- @innei/eslint-config-react-ts 0.9.7
+ @innei/eslint-config-react-ts 0.9.8
- @innei/prettier 0.9.7
+ @innei/prettier 0.9.8
- @next/bundle-analyzer 13.1.6
+ @next/bundle-analyzer 13.2.4
- @trivago/prettier-plugin-sort-imports 4.1.0
+ @trivago/prettier-plugin-sort-imports 4.1.1
- @types/node 18.14.1
+ @types/node 18.14.6
- @types/validator 13.7.12
+ @types/validator 13.7.13
- eslint 8.34.0
+ eslint 8.35.0
- zx 7.1.1
+ zx 7.2.0

 WARN  Issues with peer dependencies found
.
├─┬ next 13.1.6
│ └─┬ styled-jsx 5.1.1
│   └── ✕ missing peer @babel/core@"*"
└─┬ react-countup 6.4.1
  └─┬ @rollup/plugin-babel 6.0.3
    └── ✕ missing peer @babel/core@^7.0.0
Peer dependencies that should be installed:
  @babel/core@">=7.0.0 <8.0.0"  

packages/kami-design
├─┬ @floating-ui/react-dom 1.1.0
│ └── ✕ missing peer react-dom@>=16.8.0
├─┬ react-transition-group 4.4.5
│ └── ✕ missing peer react-dom@>=16.6.0
└─┬ rollup-plugin-windicss 1.8.10
  └── ✕ unmet peer rollup@^2.0.0: found 3.18.0
Peer dependencies that should be installed:
  react-dom@>=16.8.0  

The integrity of 1670 files was checked. This might have caused installation to take longer.
Done in 1m 47.1s 

问了一下chatGPT 它让我

这个错误提示显示安装过程中出现了Git访问权限问题,具体是尝试使用SSH协议从GitHub获取一个依赖库时发生的错误。你可以尝试以下解决方法:

确认你已经配置好了Git和SSH key。如果你还没有生成SSH key,可以参考GitHub官方文档进行配置。

确认你有权限访问这个依赖库。你可以在命令行中使用 ssh -T [email protected] 来测试你的Git访问权限是否正常。

如果你已经配置好了SSH key,并且有访问权限,但是问题仍然存在,那么你可以尝试使用HTTPS协议进行Git操作,例如 https://github.com/Innei/react-smooth-number-counter.git。

如果你的依赖库确实是私有库,你需要确认你的SSH key是否已经添加到你的GitHub账户,并且你的依赖库是否已经添加你的SSH key到其访问列表中。

最后,如果你仍然无法解决问题,你可以尝试在浏览器中打开依赖库的地址,以确认是否存在任何问题。如果是这样,请联系库的维护者以解决问题。

根据做了之后,然后还是无法使用pnpm i 进行更新,然后后台也崩了。

123
Snipaste_2023-03-15_21-49-24

请问如何解决呀...裂开了..

无法查看已读的评论

Describe the bug

#1232 症状类似,但只有已读页报错。
image
image
版本为最新:
image

Reproduction

在管理面板中点击评论选项卡->点击已读

System Info

System:
    OS: Linux 5.4 Alpine Linux
    CPU: (2) x64 Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
    Memory: 128.89 MB / 919.82 MB
    Container: Yes
    Shell: 1.36.1 - /bin/ash
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

无法管理评论

Describe the bug

如题 管理面板无法管理评论
image
后端日志如下

mx-server  | 10:49:02  ERROR   [Catch]  Schema hasn't been registered for model "Post".
mx-server  | Use mongoose.model(name, schema)
mx-server  | 
mx-server  |   Use mongoose.model(name, schema)
mx-server  |   at NativeConnection.Connection.model (index.js:200:4337)
mx-server  |   at _getModelFromConn (index.js:555:1606)
mx-server  |   at addModelNamesToMap (index.js:555:344)
mx-server  |   at getModelsMapForPopulate (index.js:549:12088)
mx-server  |   at populate (index.js:669:601)
mx-server  |   at _populate (index.js:666:8356)
mx-server  |   at index.js:666:8179
mx-server  |   at new Promise (<anonymous>)
mx-server  |   at Function.populate (index.js:666:8156)
mx-server  |   at oe.Query._find (index.js:742:1047)
mx-server  |   at runMicrotasks (<anonymous>)
mx-server  |   at processTicksAndRejections (node:internal/process/task_queues:96:5)
mx-server  |   at async oe.Query.exec (index.js:758:5133)
mx-server  |   at async Promise.all (index 1)
mx-server  |   at async CommentService.getComments (index.js:2:157811)
mx-server  |   at async CommentController.getRecentlyComments (index.js:2:135455)

Reproduction

在管理面板中点击评论选项卡

System Info

System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (1) x64 DO-Premium-Intel
    Memory: 977.62 MB / 1.92 GB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 9.8.0 - /usr/bin/npm
    pnpm: 8.7.4 - ~/.local/share/pnpm/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

部署后端后前端无法验证主人身份

Describe the bug

如题,我按照这篇文章的方法通过 Docker 搭建了后端,随后我无论是在本地还是在 Vercel 上搭建前端(Kami 和 Shiro 都试过),前端无法验证我是主人的身份

image

我通过 DevTools 查看 Cookies,发现前端和后端都是存在 mx-token 这个 Cookie 的,并且值一模一样

image
image

我分别在 3 台服务器上重试过,但无论是使用 Docker 还是手动部署,都存在该问题
我认为这是一个 Bug,如果不是,我想求助是我在部署的过程中疏漏了哪一步吗
谢谢!

Reproduction

没看懂这一项

System Info

Server 1:

root@NekoServer:~# npx envinfo --system --binaries --browsers

  System:
    OS: Linux 6.5 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (2) x64 DO-Premium-Intel
    Memory: 886.35 MB / 1.92 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    pnpm: 8.7.4 - /usr/bin/pnpm

root@NekoServer:~#

Server 2:

root@RainYun-cAI2P5IC:/opt/mx-space/Shiro# npx envinfo --system --binaries --browsers
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

  System:
    OS: Linux 5.4 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
    Memory: 13.42 GB / 15.63 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 10.2.0 - /usr/bin/npm
    pnpm: 8.9.0 - /usr/bin/pnpm

root@RainYun-cAI2P5IC:/opt/mx-space/Shiro#

Server 3:

root@138:~# npx envinfo --system --binaries --browsers
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

  System:
    OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) arm64 Neoverse-N1
    Memory: 6.62 GB / 8.00 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 18.17.1 - /usr/bin/node
    npm: 10.1.0 - /usr/bin/npm

npm notice 
npm notice New minor version of npm available! 10.1.0 -> 10.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.0
npm notice Run npm install -g [email protected] to update!
npm notice 
root@138:~#

三台服务器 Docker 均使用 get.docker.com 的脚本安装,均使用的是该仓库中的 docker-compose.yml

Used Package Manager

n/a

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

后台备份设置bucket相关信息后,从前台编辑文章点击图片上传报错。

Describe the bug

image
配置后,点击保存。刷新页面后,SecretKey为空,估计后台没有保存上。、
shiro报错信息:
⨯ InvalidArgument: Invalid Argument: Credential access key has length 0, should be 32 at throwDefaultError (/app/node_modules/.pnpm/@[email protected]/node_modules/@smithy/smithy-client/dist-cjs/index.js:838:20) at /app/node_modules/.pnpm/@[email protected]/node_modules/@smithy/smithy-client/dist-cjs/index.js:847:5 at de_CommandError (/app/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:4756:14) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /app/node_modules/.pnpm/@[email protected]/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20 at async /app/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js:225:18 at async /app/node_modules/.pnpm/@[email protected]/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38 at async /app/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js:173:18 at async /app/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:97:20 at async /app/node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:120:14 {

Reproduction

admin后台点击文件上传,页面没有响应。文件也无法上传

System Info

面板版本: 4.2.7
系统版本:5.5.6

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[BUG] 连接到数据库时产生错误

如题,在尝试部署到 Zeabur 时,出现以下报错:
图片

尝试关闭Redis的强制要求密码后,结果如下:
图片

在本地(Arch Linux with Node.js 16.20.1)运行(连接到其数据库),出现了以下错误:
图片

这是我所使用的脚本,并且已经确保所引用的环境变量均存在且有效:
https://github.com/BlockG-ws/mxspace-z/blob/master/run.sh

使用 zeabur 部署时所使用的 Docker 镜像为 node:16-alpine。

和 zeabur 相关人员讨论后,发现可能涉及的issue:
redis/ioredis#553

能否将接口的返回类型补充完善

看了一下swagger,基本没有返回类型。想用swagger-typescript-api自动生成接口请求方法,结果只有请求参数能用,返回的类型基本上是any或void

[BUG]创建文章时无法自定义创建时间

Describe the bug

在创建文章时使用自定义创建时间
浏览器请求的载荷为

{"categoryId":"65a7b67cd84b6796bb76a6ce","slug":"test","text":"test","title":"test","copyright":true,"tags":[],"summary":null,"allowComment":true,"images":[],"pin":false,"pinOrder":1,"relatedId":[],"created":"2024-01-01T10:28:00.000Z"}

服务端响应为

{
    "id": "65b8cf36c4315ff3686098fd",
    "created": "2024-01-30T10:28:06.948Z",
    "comments_index": 0,
    "allow_comment": true,
    "title": "test",
    "text": "test",
    "images": [],
    "modified": null,
    "slug": "test",
    "summary": null,
    "category_id": "65a7b67cd84b6796bb76a6ce",
    "copyright": true,
    "tags": [],
    "count": {
        "read": 0,
        "like": 0
    },
    "pin": null,
    "pin_order": null,
    "related": [],
    "meta": null,
    "category": {
        "id": "65a7b67cd84b6796bb76a6ce",
        "name": "默认分类",
        "type": 0,
        "slug": "default",
        "created": "2024-01-17T11:14:04.179Z"
    }
}

两个 created 参数不一致 可见自定义创建时间并没有生效

Reproduction

在创建文章时使用自定义创建时间

System Info

System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
    Memory: 155.74 MB / 914.01 MB
    Container: Yes
    Shell: 5.8 - /usr/bin/zsh
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    npm: 9.8.0 - /usr/bin/npm
    pnpm: 8.6.12 - /usr/bin/pnpm
  Endpoint:
    https://mx-backend.rikko.moe/api/v2

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

按照官网 docker 部署完成,并完成 /qaqdmin#/setup 填写初始化信息,还是无法进入后台

Describe the bug

目前已经重新部署了两次,仍然是无法进入后台
image

Reproduction

按照官网 https://mx-space.js.org/docs/docker 部署并完成 /qaqdmin#/setup 初始化就会出现

System Info

System:
    OS: Linux 3.10 CentOS Linux 7 (Core)
    CPU: (2) x64 AMD EPYC 7K62 48-Core Processor
    Memory: 87.70 MB / 1.95 GB
    Container: Yes
    Shell: 4.2.46 - /bin/bash
  Binaries:
    Node: 16.9.0 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 7.21.1 - /usr/bin/npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

[BUG] 友链管理的不正确判断

Describe the bug

当友链被移动到 过时,拒绝 后,如果使用原来的信息重新申请友链,将会被提示重复。

Reproduction

申请友链,移动到拒绝,重新申请,即可复现

System Info

System:
    OS: Linux 6.1 Manjaro Linux
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 7.66 GB / 14.98 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.1/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm
  Browsers:
    Firefox: 108.0.1

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

邮件回复通知获取不到 IP 和 UserAgent

Describe the bug

如题,
升级了 v5.0.0 后端,访客在评论之后,发给博主的通知邮件中 IP 和 Agent 是空的
走cf和腾讯云edgeone都试了,结果都是一样
image
看后台 IP 是获取正常的
image
是我应该在模板编辑中修改什么吗 🤔

Reproduction

打开邮件评论,以访客的身份发一个评论

System Info

System:

Need to install the following packages:
  [email protected]
Ok to proceed? (y) y

  System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 Intel(R) Xeon(R) Platinum 8255C CPU @ 2.50GHz
    Memory: 824.09 MB / 1.80 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.19.0 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
    pnpm: 8.15.2 - /usr/local/bin/pnpm

API:

{"name":"@mx-space/core","author":"Innei <https://innei.ren>","version":"5.0.0","homepage":"https://github.com/mx-space/core#readme","issues":"https://github.com/mx-space/core/issues"}

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

检测 api 接口 IPv6 问题

Clear and concise description of the problem

当前后端查看 IPv6 问题(获取中)貌似是 api 接口不支持 IPv6 地址查询

/api/v2/tools/ip/240e:xxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx?t=1675938758400

请求方法: GET
状态代码: 504

Suggested solution

更换支持 IPv6 的查询接口

Alternative

No response

Additional context

No response

Validations

后台无法上传文件,选择文件后没有上传按钮,页面也没有响应

Describe the bug

后台无法上传文件,选择文件后没有上传按钮,页面也没有响应
image

Reproduction

后台无法上传文件,选择文件后没有上传按钮,页面也没有响应

System Info

面板版本: 4.2.5

系统版本:5.5.5

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.