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?]: 发送短视频消息报错Upload resources for VideoEntity failed #432

Open
4 tasks done
chuanSir123 opened this issue Jul 9, 2024 · 6 comments
Open
4 tasks done
Labels
bug? Maybe it's a bug

Comments

@chuanSir123
Copy link

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

  • 我已经仔细阅读上述内容
  • 我已经使用 最新构建 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(其它疑问请考虑加入TG群询问或在discussions中提问)

Lagrange项目

OneBot

所使用/依赖的Lagrange项目对应的commit

839c225

运行环境

Windows

运行架构

x64

连接方式

反向 WebSocket

重现步骤

bot发送短视频给用户时,会报错Upload resources for VideoEntity failed,message为{"type": "video", "data": { "file": "https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00fg10000cnc5mejc77u07dfmt3ug&ratio=1080p&line=0"}}

期望的结果是什么?

正确发送短视频

实际的结果是什么?

发送失败,报错Upload resources for VideoEntity failed

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

No response

Trace 级别日志记录(可选)

trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[3]
      [ReverseWSService] Receive(aa2276b4-f82b-4fef-999b-a90cee90fc74): {"action":"send_msg","params":{"message_type":"group","group_id":837816964,"user_id":416448943,"message":{"type":"video","data":{"file":"https:\/\/aweme.snssdk.com\/aweme\/v1\/play\/?video_id=v0d00fg10000cocg81bc77uat2hqj910&ratio=1080p&line=0"}}},"echo":{"seq":12}}
trce: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [ServiceContext] [DEBUG]: Outgoing SSOFrame: OidbSvcTrpcTcp.0x11ea_100
warn: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [BusinessContext] [WARNING]: Error when processing the event: Lagrange.Core.Internal.Event.Message.VideoGroupUploadEvent
warn: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [BusinessContext] [WARNING]: Object reference not set to an instance of an object.
warn: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [BusinessContext] [WARNING]:    at Lagrange.Core.Internal.Service.Message.VideoGroupUploadService.Parse(Span`1 input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, VideoGroupUploadEvent& output, List`1& extraEvents)
         at Lagrange.Core.Internal.Service.BaseService`1.Lagrange.Core.Internal.Service.IService.Parse(Span`1 input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, ProtocolEvent& output, List`1& extraEvents)
         at Lagrange.Core.Internal.Context.ServiceContext.ResolveEventByPacket(SsoPacket packet)
         at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event)
fail: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [HighwayContext] [FATAL]: Upload resources for VideoEntity failed
trce: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:47] [ServiceContext] [DEBUG]: Outgoing SSOFrame: MessageSvc.PbSendMsg
trce: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:48] [ServiceContext] [DEBUG]: Incoming SSOFrame: MessageSvc.PbSendMsg
trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[2]
      [ReverseWSService] Send(aa2276b4-f82b-4fef-999b-a90cee90fc74): {"status":"ok","retcode":0,"data":{"message_id":288383762},"echo":{"seq":12}}
trce: Lagrange.Core.BotContext[0]
      [2024-07-09 16:24:48] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.msg.olpush.OlPushService.MsgPush
trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[3]

补充说明(可选)

No response

@chuanSir123 chuanSir123 added the bug? Maybe it's a bug label Jul 9, 2024
@chuanSir123
Copy link
Author

这个问题的原因找到了,因为指定的url返回的302,需要forward才能获取base64,另外发现新的问题,发送的视频偶尔出现资源已过期,也没报错

@ZM-J
Copy link

ZM-J commented Aug 21, 2024

同样碰到这个问题,发送的消息为

[{"type":"video","data":{"file":"http://ap.hanhan.icu:4006?category=diaodai"}}]

直接访问api,就下载视频;但是将该消息推到 lagrange 这边没任何显示,QQ 客户端上查看为

image

@ZM-J
Copy link

ZM-J commented Aug 24, 2024

Lagrange后台日志会有

info: Lagrange.Core.BotContext[0]
      [2024-08-24 18:01:06] [MessagingLogic] [VERBOSE]: [MessageChain(xxx)(xxx)] [Video 1920x1080]: 1719655 https://multimedia.nt.qq.com.cn/download?appid=1415&format=origin&orgfmt=t264&spec=0&rkey=xxx

但是直接用浏览器访问地址,返回

{"retcode":-5502009,"retmsg":"file does not exist","retryflag":0}

@sisi0318
Copy link
Contributor

Lagrange后台日志会有


info: Lagrange.Core.BotContext[0]

      [2024-08-24 18:01:06] [MessagingLogic] [VERBOSE]: [MessageChain(xxx)(xxx)] [Video 1920x1080]: 1719655 https://multimedia.nt.qq.com.cn/download?appid=1415&format=origin&orgfmt=t264&spec=0&rkey=xxx

但是直接用浏览器访问地址,返回


{"retcode":-5502009,"retmsg":"file does not exist","retryflag":0}

请尝试更新最新版本

@wess09
Copy link

wess09 commented Sep 10, 2024

+1

@DarkRRb
Copy link
Contributor

DarkRRb commented Sep 18, 2024

目前 VideoEntity 只支持小于 1M 的视频(忘了 owner 修复了没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Maybe it's a bug
Projects
None yet
Development

No branches or pull requests

5 participants