lcjqyml / wechatbot

A chatbot for wechat.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] 发送图片一开始可以 突然失败 重启也不行

lsCoding666 opened this issue · comments

提交 issue 前,请先确认:

  • 我已看过 FAQ,此问题不在列表中
  • 我已看过其他 issue,他们不能解决我的问题
  • 我认为这不是 Mirai 或者 OpenAI 的 BUG

表现
wechatbot日志

2023-05-12T16:41:25.355355953Z [5/12/2023, 4:41:25 PM] 🎯 Got response data data length 667035 -> {"result":"DONE","message":[],"voice":[],"image":["data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD
2023-05-12T16:41:25.355906116Z [5/12/2023, 4:41:25 PM] Reply image.png -> data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/
2023-05-12T16:41:26.489906395Z uncaughtException AssertionError [ERR_ASSERTION]: 1205 == 0
2023-05-12T16:41:26.489945756Z     at Object.equal (/app/node_modules/wechat4u/src/util/global.js:53:14)
2023-05-12T16:41:26.489951156Z     at /app/node_modules/wechat4u/src/core.js:694:16
2023-05-12T16:41:26.489954476Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-05-12T16:41:26.489957516Z     at async PuppetWechat4u.messageSendFile (file:///app/node_modules/wechaty-puppet-wechat4u/src/puppet-wechat4u.ts:800:5)
2023-05-12T16:41:26.489960636Z     at async file:///app/node_modules/wechaty/src/sayable/deliver-sayable.ts:41:13
2023-05-12T16:41:26.489963556Z     at async WechatifiedUserClass.say (file:///app/node_modules/wechaty/src/user-modules/contact.ts:338:19)
2023-05-12T16:41:26.489966516Z     at async ChatBot.replyImage (file:///app/src/chatbot.ts:241:7)
2023-05-12T16:41:26.489970596Z     at async ChatBot.reply (file:///app/src/chatbot.ts:261:9)
2023-05-12T16:41:26.489973676Z     at async file:///app/src/chatbot.ts:272:7 {
2023-05-12T16:41:26.489976956Z   generatedMessage: true,
2023-05-12T16:41:26.489979596Z   code: 'ERR_ASSERTION',
2023-05-12T16:41:26.489982876Z   actual: 1205,
2023-05-12T16:41:26.489985876Z   expected: 0,
2023-05-12T16:41:26.489988556Z   operator: '==',
2023-05-12T16:41:26.489991156Z   response: [Object],
2023-05-12T16:41:26.489993796Z   tips: '发送图片失败'
2023-05-12T16:41:26.489996956Z }

chatgpt bot 日志

2023-05-12T16:34:48.575155864Z 2023-05-12 16:34:48.574 | DEBUG    | adapter.ms.bing:text_to_img:137 - [Bing Image] Response: ['https://tse1.mm.bing.net/th/id/OIG.05bM24y0vaF5pg_WznrI', 'https://tse4.mm.bing.net/th/id/OIG.7qNkDVL.9.3WmqUyniBs', 'https://tse1.mm.bing.net/th/id/OIG.ghFSHkqGAWDUSdCUIOMi', 'https://tse3.mm.bing.net/th/id/OIG.9YQTMwFgRNp05.fb0tks']
2023-05-12T16:34:48.575190184Z 2023-05-12 16:34:48.575 | DEBUG    | adapter.ms.bing:__download_image:150 - [Bing AI] 下载图片:https://tse1.mm.bing.net/th/id/OIG.05bM24y0vaF5pg_WznrI
2023-05-12T16:34:48.575658226Z 2023-05-12 16:34:48.575 | DEBUG    | adapter.ms.bing:__download_image:150 - [Bing AI] 下载图片:https://tse4.mm.bing.net/th/id/OIG.7qNkDVL.9.3WmqUyniBs
2023-05-12T16:34:48.575984268Z 2023-05-12 16:34:48.575 | DEBUG    | adapter.ms.bing:__download_image:150 - [Bing AI] 下载图片:https://tse1.mm.bing.net/th/id/OIG.ghFSHkqGAWDUSdCUIOMi
2023-05-12T16:34:48.576345870Z 2023-05-12 16:34:48.576 | DEBUG    | adapter.ms.bing:__download_image:150 - [Bing AI] 下载图片:https://tse3.mm.bing.net/th/id/OIG.9YQTMwFgRNp05.fb0tks
2023-05-12T16:34:48.777111402Z 2023-05-12 16:34:48.776 | DEBUG    | platforms.http_service:v2_chat_response:151 - Bot request 1683909270746 response -> 
2023-05-12T16:34:48.777134442Z {"result": "SUCCESS", "message": [], "voice": [], "image": []}
2023-05-12T16:34:48.777818565Z INFO:quart.serving:130.162.139.153:38248 GET /v2/chat/response 1.1 200 62 1431
2023-05-12T16:34:48.778102047Z ..[2023-05-12 16:34:48,777] 130.162.139.153:38248 GET /v2/chat/response 1.1 200 62 1431
2023-05-12T16:34:48.851566428Z 2023-05-12 16:34:48.851 | DEBUG    | adapter.ms.bing:__download_image:155 - [Bing AI] 下载完成:image/jpeg https://tse3.mm.bing.net/th/id/OIG.9YQTMwFgRNp05.fb0tks
2023-05-12T16:34:48.854779923Z 2023-05-12 16:34:48.854 | DEBUG    | adapter.ms.bing:__download_image:155 - [Bing AI] 下载完成:image/jpeg https://tse4.mm.bing.net/th/id/OIG.7qNkDVL.9.3WmqUyniBs
2023-05-12T16:34:48.865177171Z 2023-05-12 16:34:48.864 | DEBUG    | adapter.ms.bing:__download_image:155 - [Bing AI] 下载完成:image/jpeg https://tse1.mm.bing.net/th/id/OIG.05bM24y0vaF5pg_WznrI
2023-05-12T16:34:48.869561112Z 2023-05-12 16:34:48.869 | DEBUG    | adapter.ms.bing:__download_image:155 - [Bing AI] 下载完成:image/jpeg https://tse1.mm.bing.net/th/id/OIG.ghFSHkqGAWDUSdCUIOMi

结果就是没反应
最终我重启容器没效果
于是我手机上点退出登录 然后再扫码登录又可以了

经过后来发现,大部分时候重新登录也不行