wechaty/puppet-service

say() Error: 13 INTERNAL: TIMEOUT, can not get message callback response

Closed this issue · 4 comments

Issue Description

After migrating to Donut from PadPlus, the same once-working code sending a local .png picture file starts to get timeout error:
ERR Config unhandledRejection: Error: 13 INTERNAL: TIMEOUT, can not get message callback response

Some Details

I was using current production version "wechaty": "^0.50.7" and "wechaty-puppet-hostie": "^0.10.8", tried the @next version "wechaty": "^0.53.9" and "wechaty-puppet-hostie": "^0.13.1", but the issue persists.

Below are 2 cases of simple code to repeat the issue 1) one sending a local file and 2) one fromURL, together with the Verbose logs.
It could be my silly error, I will really appreciate if you have time and take a look.

Please let me know if I didn't describe the issue clearly, and we can discuss.
Thanks very much in advance!

Case #1 from local file

const { Message, Contact, log, UrlLink, FileBox } = require('wechaty') // FileBox is from Wechaty
const fileBox1 = FileBox.fromFile('./data_local_bot-qr-code.png')
await room.say(fileBox1)

14:02:10 VERB Room say(FileBox#File<data_local_bot-qr-code.png>, )
14:02:10 VERB PuppetHostie messageSend(26582305555@chatroom, FileBox#File<data_local_bot-qr-code.png>)
14:02:39 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
14:02:39 SILL Wechaty memoryCheck() free: 11870 MB, require: 4 MB
14:05:11 ERR Config ###########################
14:05:11 ERR Config unhandledRejection: Error: 13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255730658\\data_local_bot-qr-code.png","to_wxid":"26582305555@chatroom"}
    at Object.exports.createStatusError (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\common.js:91:15)
    at Object.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:1238:28)
    at InterceptingListener._callNext (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:618:8)
    at D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:925:18 [object Promise]
14:05:11 ERR Config ###########################
14:05:11 ERR Config process.on(unhandledRejection) promise.catch(13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255730658\\data_local_bot-qr-code.png","to_wxid":"26582305555@chatroom"})
Config { Error: 13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255730658\\data_local_bot-qr-code.png","to_wxid":"26582305555@chatroom"}
    at Object.exports.createStatusError (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\common.js:91:15)
    at Object.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:1238:28)
    at InterceptingListener._callNext (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:618:8)
    at D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:925:18
  code: 13,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details:
   'TIMEOUT, can not get message callback response, data: {"file":"C:\\\\users\\\\user\\\\Temp\\\\1611255730658\\\\data_local_bot-qr-code.png","to_wxid":"26582305555@chatroom"}' }
14:05:39 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
(node:43448) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
14:05:39 SILL Wechaty memoryCheck() free: 11632 MB, require: 4 MB
14:06:09 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
14:06:09 SILL Wechaty memoryCheck() free: 12004 MB, require: 4 MB

Case #2 from URL

const fileBox2 = FileBox.fromUrl('https://wechaty.github.io/wechaty/images/bot-qr-code.png')
await room.say(fileBox2)

13:50:45 VERB Room say(FileBox#Url<bot-qr-code.png>, )
13:50:45 VERB PuppetHostie messageSend(26582305555@chatroom, FileBox#Url<bot-qr-code.png>)
13:51:14 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
13:51:14 SILL Wechaty memoryCheck() free: 12173 MB, require: 4 MB
13:53:49 ERR Config ###########################
13:53:49 ERR Config unhandledRejection: Error: 13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255048358\\bot-qr-code.png","to_wxid":"26582305555@chatroom"}
at Object.exports.createStatusError (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\common.js:91:15)
at Object.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:1209:28)
at InterceptingListener._callNext (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:618:8)
at callback (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:847:24) [object Promise]
13:53:49 ERR Config ###########################
13:53:49 ERR Config process.on(unhandledRejection) promise.catch(13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255048358\\bot-qr-code.png","to_wxid":"26582305555@chatroom"})
Config { Error: 13 INTERNAL: TIMEOUT, can not get message callback response, data: {"file":"C:\\users\\user\\Temp\\1611255048358\\bot-qr-code.png","to_wxid":"26582305555@chatroom"}
at Object.exports.createStatusError (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\common.js:91:15)
at Object.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:1209:28)
at InterceptingListener._callNext (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:618:8)
at callback (D:\nodeJS\troubleshooting_filebox\node_modules\grpc\src\client_interceptors.js:847:24)
code: 13,
metadata: Metadata { _internal_repr: {}, flags: 0 },
details:
'TIMEOUT, can not get message callback response, data: {"file":"C:\\\\users\\\\user\\\\Temp\\\\1611255048358\\\\bot-qr-code.png","to_wxid":"26582305555@chatroom"}' }
13:54:14 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
13:54:14 SILL Wechaty memoryCheck() free: 11705 MB, require: 4 MB
(node:1200) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
13:54:44 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_HEARTBEAT(1), payload:"{"data":"[object Object]","timeout":240000}"})
13:54:44 SILL Wechaty memoryCheck() free: 11632 MB, require: 4 MB

SYSTEMS

  • What is your wechaty version? Answer: Tested with 0.50.7 and 0.53.9
  • Which puppet are you using for wechaty? Answer: wechaty-puppet-hostie
 0.13.1 and 0.10.8
  • What is your node version? (run node --version) Answer: v12.12
  • What os are you using Answer: [Heroku] Windows on local PC and Linux on Server

Just an update, today I found that -
[OK] .GIF file type still works
[BAD] .JPG and .PNG are not working

huan commented

I have two suggestions for your issue:

  1. Try to use another donut token to see if your problems can be solved. (might be a puppet-service token related problem)
  2. Try to upgrade to the latest wechaty@0.56 with wechaty-puppet-service module and see if the latest code update helps.

For some reason, the issue went away...

png and jpg pictures can be posted OK now, closing the issue...

image

huan commented

Congratulations!