wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

自动登录报错 #41

Closed hcolde closed 3 years ago

hcolde commented 3 years ago


09:45:18 INFO [PuppetPadlocal] start login with type: AutoLogin
(node:81141) UnhandledPromiseRejectionWarning: Error: unsupported type: 35
    at Object.convertMessageType (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/message-parser/helpers/message.ts:57:13)
    at Object.padLocalMessageToWechaty (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/schema-mapper/index.ts:22:16)
    at PuppetPadlocal.messageRawPayloadParser (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:1139:12)
    at PuppetPadlocal.<anonymous> (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/src/puppet.ts:855:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/dist/src/puppet.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:81141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:81141) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:81141) UnhandledPromiseRejectionWarning: Error: unsupported type: 35
    at Object.convertMessageType (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/message-parser/helpers/message.ts:57:13)
    at Object.padLocalMessageToWechaty (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/schema-mapper/index.ts:22:16)
    at PuppetPadlocal.messageRawPayloadParser (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:1139:12)
    at PuppetPadlocal.<anonymous> (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/src/puppet.ts:855:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/dist/src/puppet.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:81141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:81141) UnhandledPromiseRejectionWarning: Error: unsupported type: 35
    at Object.convertMessageType (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/message-parser/helpers/message.ts:57:13)
    at Object.padLocalMessageToWechaty (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/schema-mapper/index.ts:22:16)
    at PuppetPadlocal.messageRawPayloadParser (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:1139:12)
    at PuppetPadlocal.<anonymous> (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/src/puppet.ts:855:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/dist/src/puppet.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:81141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:81141) UnhandledPromiseRejectionWarning: Error: unsupported type: 35
    at Object.convertMessageType (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/message-parser/helpers/message.ts:57:13)
    at Object.padLocalMessageToWechaty (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/schema-mapper/index.ts:22:16)
    at PuppetPadlocal.messageRawPayloadParser (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:1139:12)
    at PuppetPadlocal.<anonymous> (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/src/puppet.ts:855:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/dist/src/puppet.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:81141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
(node:81141) UnhandledPromiseRejectionWarning: Error: unsupported type: 35
    at Object.convertMessageType (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/message-parser/helpers/message.ts:57:13)
    at Object.padLocalMessageToWechaty (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/padlocal/schema-mapper/index.ts:22:16)
    at PuppetPadlocal.messageRawPayloadParser (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:1139:12)
    at PuppetPadlocal.<anonymous> (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/src/puppet.ts:855:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/colde/Develop/reviewer/node_modules/wechaty-puppet/dist/src/puppet.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:81141) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10)```
padlocal commented 3 years ago

看起来是因为无法处理 35 类型消息导致的错误。 @hcolde 有办法复现这个问题,并提供一下完整的消息体么?

hcolde commented 3 years ago

看起来是因为无法处理 35 类型消息导致的错误。 @hcolde 有办法复现这个问题,并提供一下完整的消息体么?

我两天前通过扫码登录,然后手机关机了。今天运行程序自动登录就出现这个错误,然后我再把手机开机联网,就没有这个错误了,我不知道是不是因为登录了这个微信的手机断网了会引发这个错误,我想复现一下但现在貌似登录不了:

(node:82535) UnhandledPromiseRejectionWarning: VError: [tid:07d071bf] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:07d071bf] wechat bad request error
padlocal commented 3 years ago

这个不是登录错误,应该是尝试添加某个不存在的账号(或者账号异常)为好友。 从日志上看,这个号登录没有问题。