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

Bot can not start #3

Closed hzzzzzz closed 3 years ago

hzzzzzz commented 3 years ago

Error encountered after QRCode scanned (both when running demo and my own implement):

> wechaty-puppet-padlocal-demo@0.1.1 demo /Users/xxx/dev/padlocal-demo/wechaty-puppet-padlocal-demo
> ts-node main.ts

[Mon Nov 02 2020 20:42:13] [INFO]   20:42:13 INFO
      ============================================================
       Welcome to Wechaty PadLocal puppet!

       - wechaty-puppet-padlocal version: 0.1.3
       - padlocal-ts-client version: 0.1.25
      ============================================================

[Mon Nov 02 2020 20:42:13] [LOG]    TestBot started.
[Mon Nov 02 2020 20:42:15] [LOG]    TestBot onScan: Waiting(2) - https://api.qrserver.com/v1/create-qr-code/?data=http%3A%2F%2Fweixin.qq.com%2Fx%2Fg6FmnqtQkIcH2zo5A6WA
[Mon Nov 02 2020 20:42:52] [LOG]    TestBot onScan: Confirmed(4)
[Mon Nov 02 2020 20:42:53] [ERROR]  20:42:53 ERR [PuppetPadlocal] login failed
[Mon Nov 02 2020 20:42:53] [ERROR]  (node:63376) UnhandledPromiseRejectionWarning: Error: SubRequestCancelError: [tid:9317afa2] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:9317afa2] wechat bad request error
    at PuppetPadlocal.puppet.on.payload (/Users/xxx/dev/padlocal-demo/wechaty-puppet-padlocal-demo/node_modules/wechaty/src/wechaty.ts:440:32)
    at PuppetPadlocal.emit (events.js:198:13)
    at PuppetPadlocal.EventEmitter.emit (domain.js:448:20)
    at _client.api.login.then.catch (/Users/xxx/dev/padlocal-demo/wechaty-puppet-padlocal-demo/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:216:14)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[Mon Nov 02 2020 20:42:53] [ERROR]  (node:63376) 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(). (rejection id: 2)
[Mon Nov 02 2020 20:42:53] [ERROR]  (node:63376) [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.
padlocal commented 3 years ago

Is this issue still happens?

hzzzzzz commented 3 years ago

My mistake.

Problem solved after updated to node v12.