[WARNING]: Protocol -> warning: decode image error: <nil>. this image will be displayed by wrong size in pc guild client
[INFO]: 发送频道 测试频道(114514) 子频道 测试(114514) 的消息: [{"type": ... (16310-2706822233)
[ERROR]: 处置WS命令时发生无法恢复的异常:runtime error: invalid memory address or nil pointer dereference
goroutine 5619 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x65
github.com/ProtocolScience/AstralGocq/server.(*wsConn).handleRequest.func1()
github.com/ProtocolScience/AstralGocq/server/websocket.go:472 +0x46
panic({0xa686a0, 0xfd0190})
runtime/panic.go:884 +0x213
github.com/ProtocolScience/AstralGo/client.(*GuildService).SendGuildChannelMessage(0xc00051c8c0, 0x65cb37725e88ac, 0x17f54388, 0xc000173700)
github.com/ProtocolScience/[email protected]/client/guild_msg.go:68 +0x47d
github.com/ProtocolScience/AstralGocq/coolq.(*CQBot).SendGuildChannelMessage(0xc00057f580, 0x1?, 0xd0?, 0xc000173700)
github.com/ProtocolScience/AstralGocq/coolq/bot.go:447 +0x371
github.com/ProtocolScience/AstralGocq/coolq.(*CQBot).CQSendGuildChannelMessage(0xc00057f580, 0x65cb37725e88ac, 0x17f54388, {0x5, {0xc00025a077, 0xd0}, {0x0, 0x0}, 0x0, 0x77, ....)
github.com/ProtocolScience/AstralGocq/coolq/api.go:827 +0x5ce
github.com/ProtocolScience/AstralGocq/modules/api.(*Caller).call(0xc000331120, {0xc00025a00c, 0x16?}, 0xfd1fe0, {0xc24aa0, 0xc0000a0aa0})
github.com/ProtocolScience/AstralGocq/modules/api/api.go:283 +0xb30d
github.com/ProtocolScience/AstralGocq/modules/api.(*Caller).Call(0xc000331120, {0xc00025a00c, 0x16}, 0xc00025a000?, {0xc24aa0, 0xc0000a0aa0})
github.com/ProtocolScience/AstralGocq/modules/api/caller.go:35 +0xc5
github.com/ProtocolScience/AstralGocq/server.(*wsConn).handleRequest(0xc0004c4270, 0xc27c28?, {0xc00025a000?, 0x0?, 0xc0000b0c80?})
github.com/ProtocolScience/AstralGocq/server/websocket.go:481 +0x41c
github.com/ProtocolScience/AstralGocq/server.(*websocketClient).listenAPI.func2(0xc0000c6580?)
github.com/ProtocolScience/AstralGocq/server/websocket.go:326 +0x95
created by github.com/ProtocolScience/AstralGocq/server.(*websocketClient).listenAPI
github.com/ProtocolScience/AstralGocq/server/websocket.go:324 +0x1b2
请确保您已阅读以上注意事项,并勾选下方的确认框。
go-cqhttp 版本
v1.3.1-pre-7
运行环境
Ubuntu
运行架构
AMD64
连接方式
WebSocket (反向)
使用协议
6 | aPad
重现步骤
将bot账号拉入频道,让bot随便发一张图片
比如这张:
期望的结果是什么?
正常发送图片,且客户端中显示的图片尺寸正常
实际的结果是什么?
部分图片发送失败
cqhttp日志中报错:
多次尝试发送该图片后会导致bot被踢下线:
[WARNING]: Bot已离线: 服务端强制下线.发送失败的图片是bytes类型的
示例图片(类型为BytesIO)可以正常发送,但是cqhttp日志中依旧报错:
decode image error。客户端上看见的效果:简单的复现代码/链接(可选)
日志记录(可选)
补充说明(可选)
之前使用的cqhttp是几个月前从这里中发布的链接下载的,当时下载的版本可以正常发送图片,且日志中从未出现过:
[WARNING]: Protocol -> warning: decode image error: <nil>. this image will be displayed by wrong size in pc guild client在尝试将cqhttp更换为这个仓库的最新版本后就立刻出现了这个问题