clansty / Q2TG

QQ 与 Telegram 群相互转发的 bot
https://t.me/Q2TGbot
GNU Affero General Public License v3.0
755 stars 77 forks source link

群语音必转发失败 #82

Closed ccmuyuu closed 1 year ago

ccmuyuu commented 1 year ago

发语音时的报错如下 私聊语音正常转发

main_q2tg        | [2023-01-14T04:07:05.058] [ERROR] ForwardService - 0 - 从 QQ 到 TG 的消息转发失败 Error: Cannot read properties of null (reading 'replace')
main_q2tg        |     at dispatchHttpRequest (/app/node_modules/axios/lib/adapters/http.js:161:23)
main_q2tg        |     at new Promise (<anonymous>)
main_q2tg        |     at httpAdapter (/app/node_modules/axios/lib/adapters/http.js:49:10)
main_q2tg        |     at dispatchRequest (/app/node_modules/axios/lib/core/dispatchRequest.js:58:10)
main_q2tg        |     at Axios.request (/app/node_modules/axios/lib/core/Axios.js:109:15)
main_q2tg        |     at Axios.<computed> [as get] (/app/node_modules/axios/lib/core/Axios.js:131:17)
main_q2tg        |     at Function.wrap [as get] (/app/node_modules/axios/lib/helpers/bind.js:9:15)
main_q2tg        |     at fetchFile (/app/build/utils/urls.js:32:39)
main_q2tg        |     at ForwardService.forwardFromQq (/app/build/services/ForwardService.js:153:80)
main_q2tg        |     at async onQqMessage (/app/build/controllers/ForwardController.js:46:31) {
main_q2tg        |   config: {
main_q2tg        |     transitional: {
main_q2tg        |       silentJSONParsing: true,
main_q2tg        |       forcedJSONParsing: true,
main_q2tg        |       clarifyTimeoutError: false
main_q2tg        |     },
main_q2tg        |     adapter: [Function: httpAdapter],
main_q2tg        |     transformRequest: [ [Function: transformRequest] ],
main_q2tg        |     transformResponse: [ [Function: transformResponse] ],
main_q2tg        |     timeout: 0,
main_q2tg        |     xsrfCookieName: 'XSRF-TOKEN',
main_q2tg        |     xsrfHeaderName: 'X-XSRF-TOKEN',
main_q2tg        |     maxContentLength: -1,
main_q2tg        |     maxBodyLength: -1,
main_q2tg        |     env: { FormData: [Function] },
main_q2tg        |     validateStatus: [Function: validateStatus],
main_q2tg        |     headers: {
main_q2tg        |       Accept: 'application/json, text/plain, */*',
main_q2tg        |       'User-Agent': 'axios/0.27.2'
main_q2tg        |     },
main_q2tg        |     responseType: 'arraybuffer',
main_q2tg        |     method: 'get',
main_q2tg        |     url: '',
main_q2tg        |     data: undefined
main_q2tg        |   },
main_q2tg        |   url: '',
main_q2tg        |   exists: true
main_q2tg        | }
clansty commented 1 year ago

协议中更改了获取语音 URL 的方式,rainbowcat 分支的最新代码已经适配了这个更改。

不过 rainbowcat 是一个 break change,直接升级会破坏数据库结构。建议备份数据库,更新后进行手动调整或者删除数据库重新安装。

ccmuyuu commented 1 year ago

协议中更改了获取语音 URL 的方式,rainbowcat 分支的最新代码已经适配了这个更改。

不过 rainbowcat 是一个 break change,直接升级会破坏数据库结构。建议备份数据库,更新后进行手动调整或者删除数据库重新安装。

更新后,使用代理的机器在登陆输入密码后会报错,如下:

main_q2tg        | [2023-01-15T13:21:34.974] [ERROR] Main - UnhandledException:  <ref *1> Error: spawnSync /bin/sh ENOENT
main_q2tg        |     at Object.spawnSync (node:internal/child_process:1110:20)
main_q2tg        |     at spawnSync (node:child_process:857:24)
main_q2tg        |     at execSync (node:child_process:938:15)
main_q2tg        |     at /nix/store/sl1izd3fsb6cwfz5i9xb3mzf8fddr3ml-q2tg/libexec/q2tg/build/client/OicqClient.js:73:67 {
main_q2tg        |   errno: -2,
main_q2tg        |   code: 'ENOENT',
main_q2tg        |   syscall: 'spawnSync /bin/sh',
main_q2tg        |   path: '/bin/sh',
main_q2tg        |   spawnargs: [ '-c', 'uname -s' ],
main_q2tg        |   error: [Circular *1],
main_q2tg        |   status: null,
main_q2tg        |   signal: null,
main_q2tg        |   output: null,
main_q2tg        |   pid: 0,
main_q2tg        |   stdout: null,
main_q2tg        |   stderr: null
main_q2tg        | }

不使用代理的机器问题为 #84

clansty commented 1 year ago

已修复