NapNeko / NapCatQQ

现代化的基于 NTQQ 的 Bot 协议端实现
https://napcat.napneko.icu
Other
2.62k stars 190 forks source link

[BUG] 在 Ubuntu 下启动时报错 #5

Closed liggest closed 7 months ago

liggest commented 7 months ago

系统版本

Ubuntu 18.04.4 LTS

QQNT 版本

linuxqq 3.2.7-22741

NapCat 版本

1.1.1

OneBot 客户端

还没开起来

发生了什么?

bash napcat.sh 后程序启动出错:

TypeError: Cannot read properties of undefined (reading 'replace')
    at new ev (/home/ubuntu/stuff/QQNT/NapCat.linux.x64/napcat.cjs:20:103050)
    at Object.<anonymous> (/home/ubuntu/stuff/QQNT/NapCat.linux.x64/napcat.cjs:20:105084)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at u._load (node:electron/js2c/asar_bundle:2:14589)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:101:12)
    at node:internal/main/run_main_module:23:47

如何复现

配置文件(onebot11_QQ号.json):

{
  "enableHttp": false,
  "httpPort": 3000,
  "enableWs": true,
  "wsPort": 8080,
  "enableWsReverse": false,
  "wsReverseUrls": [],
  "enableHttpPost": false,
  "httpPostUrls": [],
  "enableHttpHeart": false,
  "httpSecret": "",
  "messagePostFormat": "array",
  "reportSelfMessage": false,
  "debug": false,
  "enableLocalFile2Url": true,
  "heartInterval": 30000,
  "token": "一个token"
}

然后 bash napcat.sh

期望的结果?

程序能够正常启动

NapCat 运行日志

No response

OneBot 客户端运行日志

No response

linyuchen commented 7 months ago

是不是有个 ~/.config/QQ/versions/config.json 文件,把它备份后删了试试

liggest commented 7 months ago

确实,删掉就跑起来了

这个 linuxqq 是从旧版本升级上来的,~/.config/QQ/versions/config.json 里面的版本号还是旧的