wechaty / wechaty-puppet-padplus

DEPRECATED: One puppet based on iPad protocal for Wechaty
https://wechaty.js.org/docs/puppet-services/
317 stars 65 forks source link

puppet keeps logged out #301

Open treeguard opened 4 years ago

treeguard commented 4 years ago

Recently, the puppet is quite unstable and logged out frequently. when I logged in again, it said something like “你的微信尝试在新的Ipad上登录...." it's because the server which holds the puppet was restarted?

su-chang commented 4 years ago

Please make sure you have set the name for Wechaty, and it will generate ${name}.memory-card.json file in your local dirctory.

BTW, it's better to show the detail logs about this issue here.

Thank you.

treeguard commented 4 years ago

Thanks, I have two puppet running on the same host. they are using same names before, I renamed the puppet last night and saw two memory-card.json now, thanks!

it's logged out again on one of my puppet,

here is the log

11:31:22 INFO PuppetPadplus logout(true, 你的微信登录环境存在异常。为了帐号安全,本次登录已失效。)
treeguard commented 4 years ago

and after I scanned to login again I saw the following logs:

(node:6011) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sysmsgtemplate' of undefined
    at Object.<anonymous> (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:60:42)
    at Generator.next (<anonymous>)
    at fulfilled (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:5:58)
(node:6011) 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: 75)
(node:6011) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sysmsgtemplate' of undefined
    at Object.<anonymous> (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:60:42)
    at Generator.next (<anonymous>)
    at fulfilled (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:5:58)
(node:6011) 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: 76)
(node:6011) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sysmsgtemplate' of undefined
    at Object.<anonymous> (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:60:42)
    at Generator.next (<anonymous>)
    at fulfilled (/root/bot/node_modules/wechaty-puppet-padplus/dist/src/pure-function-helpers/room-event-leave-message-parser.js:5:58)
(node:6011) 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: 77)
(node:6011) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sysmsgtemplate' of undefined
    a
su-chang commented 4 years ago

11:31:22 INFO PuppetPadplus logout(true, 你的微信登录环境存在异常。为了帐号安全,本次登录已失效。)

It seems that the account has been logout by WeChat.

(node:6011) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sysmsgtemplate' of undefined

After you upgraded your wechaty-puppet-padplus, it will be resolved.

treeguard commented 4 years ago

@su-chang do you mean 0.6.5 or 0.7.39 https://www.npmjs.com/package/wechaty-puppet-padplus I am using 0.7.36 now

treeguard commented 4 years ago

It seems that the account has been logout by WeChat.

it happened every day these day around the same time, in the 3AM-5AM beijing time, however, I didn't see issue on donut, if I run two puppets on the same host, does it matter? they have different puppet names now

su-chang commented 4 years ago

@su-chang do you mean 0.6.5 or 0.7.39 https://www.npmjs.com/package/wechaty-puppet-padplus I am using 0.7.36 now

Yes, you are right.

su-chang commented 4 years ago

it happened every day these day around the same time, in the 3AM-5AM beijing time

Please try to change an account to have a test, and confirm it happened or not.

treeguard commented 4 years ago

Please try to change an account to have a test, and confirm it happened or not.

I have two accounts having the same issue.

treeguard commented 4 years ago

still have the issue:

13:35:10 INFO PuppetPadplus logout(true, 你的微信登录环境存在异常。为了帐号安全,本次登录已失效。)
su-chang commented 4 years ago

Can you make sure you have scanned the first QR code after your bot started?

The QR code will expired 3 minutes later.

treeguard commented 4 years ago

Can you make sure you have scanned the first QR code after your bot started?

I might not scan the first QR code, since it keeps generating the next one after the first one expires. Does it matter here? But I will make sure I scan first one today.