Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 偶发性原样发送cq码 #2010

Closed
4 tasks done
forchannot opened this issue Mar 21, 2023 · 9 comments
Closed
4 tasks done

[Bug]: 偶发性原样发送cq码 #2010

forchannot opened this issue Mar 21, 2023 · 9 comments
Labels
bug? The issue author think this is a bug

Comments

@forchannot
Copy link

请确保您已阅读以上注意事项,并勾选下方的确认框。

  • 我已经仔细阅读上述教程和 "提问前需知"
  • 我已经使用 dev分支版本 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)

go-cqhttp 版本

最新dev和rc5

运行环境

Windows (64)

运行架构

AMD64

连接方式

WebSocket (反向)

使用协议

0 | iPad

重现步骤

rc5的apad协议
在正常使用nonebot端进行MessageSegment发送图片等时,偶发性经常由于网络超时(也许)导致发送结果为原cq码而非图片,重启gocq后大概率恢复正常。在之前的rc4和dev版本(rc5之前)使用的watch协议,rc3使用的ipad协议均没有出现过这个问题。已经排查过服务器网络没问题,且更换过github图片代理地址,暂未测试rc5的watch协议

期望的结果是什么?

能正常转化cq码

实际的结果是什么?

偶发性原样发送cq码

简单的复现代码/链接(可选)

No response

日志记录(可选)

'''
[2023-03-21 09:57:12] [WARNING]: 转换消息 [CQ:image,file=https://ghproxy.com/https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/四风原典,type=,cache=true,proxy=true,timeout=] 到MiraiGo Element时出现错误: Get "https://ghproxy.com/https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/%E5%9B%9B%E9%A3%8E%E5%8E%9F%E5%85%B8": context deadline exceeded (Client.Timeout exceeded while awaiting headers). 
'''

补充说明(可选)

No response

@forchannot forchannot added the bug? The issue author think this is a bug label Mar 21, 2023
@forchannot forchannot changed the title [Bug]: [Bug]: 偶发性原样发送cq码 Mar 21, 2023
@122809690
Copy link

同样遇到 偶发性发送原本的cq码 大概正常50次左右会遇到一次
[2023-03-24 14:21:07] [WARNING]: 转换消息 [CQ:image,file=https://i.pixiv.re/img-original/img/2022/03/29/22/45/35/97266053_p0.jpg] 到MiraiGo Element时出现错误: context deadline exceeded (Client.Timeout or context cancellation while reading body).

@BearD01001
Copy link

貌似图片请求失败会这样,可能是图片原站把你的服务器 ip 限频了

1 similar comment
@BearD01001
Copy link

貌似图片请求失败会这样,可能是图片原站把你的服务器 ip 限频了

@CMHopeSunshine
Copy link

确认网络正常,api也能正常访问,curl和python里都能稳定获取图片,但gocq这里就容易context deadline exceeded,rc5才出现这个问题,rc4是能稳定发的

@ElainaFanBoy
Copy link

确认网络正常,api也能正常访问,curl和python里都能稳定获取图片,但gocq这里就容易context deadline exceeded,rc5才出现这个问题,rc4是能稳定发的

我也遇到了这个问题,rc4从来没出现过

@Mrs4s
Copy link
Owner

Mrs4s commented Mar 25, 2023

这个问题是因为rc5为默认的http client添加了超时设置 默认五秒

@CMHopeSunshine
Copy link

超时时间能否提供配置选项呢,5秒的话大一点的图片就很容易超时

@Janet-Baker
Copy link
Contributor

Janet-Baker commented Mar 25, 2023

超时时间能否提供配置选项呢,5秒的话大一点的图片就很容易超时

我的也有,客户端服务器间网速很慢,就很容易超时。文字+图片的消息只发出了文字。

找了找,是在这里 174d99f 更改的。超时时间改一下再编译,就可以发出来了。

@2598142880
Copy link

超时时间能否提供配置选项呢,5秒的话大一点的图片就很容易超时

我的也有,客户端服务器间网速很慢,就很容易超时。文字+图片的消息只发出了文字。

找了找,是在这里 174d99f 更改的。超时时间改一下再编译,就可以发出来了。

大佬能否发我一下呢?我搞不懂什么编译。qq2598142880。求,不知道这样发符不符合规范

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? The issue author think this is a bug
Projects
None yet
Development

No branches or pull requests

8 participants