binsee / padchat-sdk

padchat项目,sdk开发包,提供直接对协议服务的对接。本项目已停止维护,请转向新方案 https://github.com/botorange/wechaty-puppet-padpro
260 stars 88 forks source link

padchat项目调用padchat.sendImage接口时发送图片时报超时 #62

Open zhangzheng521 opened 6 years ago

zhangzheng521 commented 6 years ago

我调用此接口发送图,不知道什么原因每次都没发成功 我发的图片格式为base64,我是向群里发图片的 image 发完后报超时,没法发送成功 image

hawkwithwind commented 5 years ago

我也遇到相同的问题,且同一个图片重复发送,有时成功,有时失败 目前发送图片失败概率过高,基本无法使用

hawkwithwind commented 5 years ago
[2018-12-21T22:31:57.329] [INFO] app - 图片缩略图数据base64尺寸:3272
[2018-12-21T22:31:57.922] [INFO] app - 获取消息原始图片结果:true, 获得图片base64尺寸:37140
[2018-12-21T22:31:57.922] [INFO] app - 图片数据base64尺寸:37140
[2018-12-21T22:31:57.922] [INFO] app - 写入图片文件 cache/wxid_d9usx32sb9wy22-ced3fd28-eab9-4c74-a65d-db6d5a766e4a
[2018-12-21T22:31:57.922] [INFO] app - rawFile 37140
[2018-12-21T22:31:57.922] [INFO] app - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYG
[2018-12-21T22:32:08.632] [INFO] rpc - send file 37140 returned { success: true,
  data: 
   { data: 0,
     message: '',
     size: 27853,
     status: 0,
     msgId: '7927241574113526967' } }
[2018-12-21T22:32:48.010] [INFO] rpc - send file 37140 returned { success: false,
  data: {},
  error: '发送图片超时',
  msg: '发送图片超时不一定代表发送失败' }

[2018-12-21T22:34:34.958] [INFO] app - 图片缩略图数据base64尺寸:2812
[2018-12-21T22:34:36.398] [INFO] app - 获取消息原始图片结果:true, 获得图片base64尺寸:26396
[2018-12-21T22:34:36.398] [INFO] app - 图片数据base64尺寸:26396
[2018-12-21T22:34:36.399] [INFO] app - 写入图片文件 cache/wxid_d9usx32sb9wy22-0e68db71-8e7a-4dda-bf6e-7d26cfff6c9a
[2018-12-21T22:34:36.399] [INFO] app - rawFile 26396
[2018-12-21T22:34:36.399] [INFO] app - /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDAsLDBgREg4THBgdHRsYGxof
[2018-12-21T22:35:16.521] [INFO] rpc - send file 26396 returned { success: false,
  data: {},
  error: '发送图片超时',
  msg: '发送图片超时不一定代表发送失败' }
[2018-12-21T22:35:26.443] [INFO] rpc - send file 26396 returned { success: false,
  data: {},
  error: '发送图片超时',
  msg: '发送图片超时不一定代表发送失败' }

以上日志是我使机器人收到图片消息后就转发到两个群中,分别收到两个文件,尺寸分别是 37140 和 26396 ,都比较小,可以看到4次发送只成功了一次,且更小的文件反而两次发送都不成功