Closed ccgulan closed 1 year ago
可以尝试在启动wechaty实例时增加timeout参数,把超时时间调整为4分钟。
@su-chang
你好,在api说明里头没有找到timeout的参数说明,请问是否设置如下:
const bot = WechatyBuilder.build({
name: 'bot',
puppet: 'wechaty-puppet-service',
timeout:4,
puppetOptions: {
tls: {
disable: true
},
token: ${config.padlocal_key}
}
})
@su-chang 你好,在api说明里头没有找到timeout的参数说明,请问是否设置如下: const bot = WechatyBuilder.build({ name: 'bot', puppet: 'wechaty-puppet-service', timeout:4, puppetOptions: { tls: { disable: true }, token:
${config.padlocal_key}
} })
不是,puppetOptions 对象示例如下
{
token: 'puppet_workeasy_test',
timeoutSeconds: 4 * 60,
tls: {
disable: true
}
}
好的,谢谢了
已发生多次 错误如下: 22:27:59 WARN PuppetWatchdogAgent start() reset() reason: {"data":"regular heartbeat","timeoutMilliseconds":60000} node:events:491 throw er; // Unhandled 'error' event ^
GError: WatchdogAgent reset: lastFood: "{"data":"regular heartbeat","timeoutMilliseconds":60000}" at Watchdog.reset (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet/dist/esm/src/agents/watchdog-agent.js:45:39) at Watchdog.emit (node:events:513:28) at Timeout._onTimeout (file:///E:/wechat-robot-worpro/node_modules/watchdog/dist/esm/src/watchdog.js:81:18) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7) Emitted 'error' event on WechatyImpl instance at: at WechatyImpl.emit (file:///E:/wechat-robot-worpro/node_modules/wechaty/dist/esm/src/wechaty-mixins/gerror-mixin.js:45:26) at PuppetService. (file:///E:/wechat-robot-worpro/node_modules/wechaty/dist/esm/src/wechaty-mixins/puppet-mixin.js:155:34)
at PuppetService.emit (node:events:525:35)
at PuppetService.emit (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet/dist/esm/src/puppet/puppet-skeleton.js:107:22)
at Watchdog.reset (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet/dist/esm/src/agents/watchdog-agent.js:45:25)
at Watchdog.emit (node:events:513:28)
[... lines matching original stack trace ...]
at process.processTimers (node:internal/timers:512:7) {
code: 2,
details: 'Error: WatchdogAgent reset: lastFood: "{"data":"regular heartbeat","timeoutMilliseconds":60000}"\n' +
' at Watchdog.reset (file:///E:/wechat-robot-worpro/node_modules/wechaty-puppet/dist/esm/src/agents/watchdog-agent.js:45:39)\n' +
' at Watchdog.emit (node:events:513:28)\n' +
' at Timeout._onTimeout (file:///E:/wechat-robot-worpro/node_modules/watchdog/dist/esm/src/watchdog.js:81:18)\n' +
' at listOnTimeout (node:internal/timers:569:17)\n' +
' at process.processTimers (node:internal/timers:512:7)'
}
Node.js v18.14.0