juzibot / wechaty-puppet-macpro

One puppet based on Mac WeChat for Wechaty.
Apache License 2.0
38 stars 10 forks source link

如果用户登出微信,'logout' 不会被触发,进程直接结束。 #42

Open aishiqi opened 4 years ago

aishiqi commented 4 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
npm install wechaty-puppet-padlus@next
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

wechaty-puppet-macpro@0.2.4 has another problem that, if I press log off from my mobile device, it neither trigger "logout" nor quit the process, if I restart the process, it does not show the QR code, instead, it says I am logged in, but actually it is not, and unable to receive messages.

2. Describe the bug

Give a clear and concise description of what the bug is.

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: (node:11564) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'code' of undefined at MacproContact. (E:\NodeJs\WeChatyTest\node_modules\wechaty-puppet-macpro\src\mac-api\contact.ts:100:13) at Generator.next () at fulfilled (E:\NodeJs\WeChatyTest\node_modules\wechaty-puppet-macpro\dist\src\mac-api\contact.js:5:58) (node:11564) 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: 1) (node:11564) [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. ```

7. Additional context

Add any other context about the problem here.

[bug]

su-chang commented 4 years ago

Version 0.2.6 has resolved this issue, let's re-check it.