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

Improve login troubleshooting capability #84

Closed suntong closed 2 years ago

suntong commented 3 years ago

I suddenly cannot login any more:

10:25:58 INFO 
      ============================================================
       Welcome to Wechaty PadLocal puppet!

       - wechaty-puppet-padlocal version: 0.3.0
       - padlocal-ts-client version: 0.2.32
      ============================================================

^CSIGINT fired SIGINT
Goodbye
^C

Having upgraded to the latest wechaty-puppet-padlocal is still the same:

$ npm ls | grep wechaty
wechaty-puppet-padlocal-demo@0.1.2 /.../wechaty-puppet-padlocal-demo
├─┬ wechaty@0.60.12
│ ├─┬ wechaty-puppet@0.35.3
│ ├─┬ wechaty-puppet-service@0.19.4
│ │ └─┬ wechaty-grpc@0.23.12
└─┬ wechaty-puppet-padlocal@0.4.2

$ npm run demo

> wechaty-puppet-padlocal-demo@0.1.2 demo /.../wechaty-puppet-padlocal-demo
> ts-node main.ts

Error: 14 UNAVAILABLE: No connection established
. . .
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 14,
  details: 'No connection established',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
10:39:06 ERR Wechaty start() exception: 14 UNAVAILABLE: No connection established
10:39:06 ERR TestBot on error: 
10:39:06 WARN Wechaty stop() puppet.stop() exception: Cannot read property 'removeAllListeners' of undefined
10:39:06 INFO TestBot started.
^C10:39:08 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
^C10:39:09 WARN [PuppetPadlocal] stop() is called on a OFF puppet. await ready(off) and return.
Terminated
suntong commented 3 years ago

Error: 14 UNAVAILABLE: No connection established

这个可以改进一下 能不能提示的时候增加到底是具体连到的哪一个服务器? 这样真有问题的话,我可以自己ping一下先试试

suntong commented 3 years ago

BTW, the above problem in OP is from two of my entirely different machines.

both had such connection issues by then.

suntong commented 3 years ago

Error: 3 INVALID_ARGUMENT: [tid:a958a6db] token is illegal: YOUR_PADLOCAL_TOKEN

哦,token 不对 现在提示信息不一样了

padlocal commented 2 years ago

能不能提示的时候增加到底是具体连到的哪一个服务器?

已经在最新版优化了错误提示