Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wechaty failed to login after user logout #25

Open
linj121 opened this issue Nov 1, 2024 · 1 comment
Open

Wechaty failed to login after user logout #25

linj121 opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@linj121
Copy link
Owner

linj121 commented Nov 1, 2024

2024-11-01T22:16:04.389Z info: on(logout) user:Contact<jx>, reason:logout()
2024-11-01T22:16:04.390Z info: on(scan) Waiting, 2, https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FQYifQCqWsw%3D%3D
2024-11-01T22:16:04.404Z info: Scan QRCode to log in:
 ▄▄▄▄▄▄▄ ▄▄▄  ▄   ▄    ▄▄▄▄▄▄▄ 
 █ ▄▄▄ █ ▄██▄▄▄  █▄ ▄█ █ ▄▄▄ █ 
 █ ███ █  █▄ ▄▄▀▄ ▀▄ ▀ █ ███ █ 
 █▄▄▄▄▄█ █ █ █▀█ █▀█ ▄ █▄▄▄▄▄█ 
 ▄ ▄   ▄▄  ▄▀  ▀▄   ▀█  ▄  ▄ ▄ 
 ▄▀█▀█ ▄▀█▀█▄  █▄█ ▄█▄ ▀▀▄▄▄▀█ 
    █▀█▄▀█▀▄▀▄ ▀██ ▀▀█▄█▄▀▀  ▄ 
 █ ▄▄██▄   ▀█▄ ▀█▀▀ █▀ ▀▀   ▀█ 
 ▄▀█ ▀█▄▀▄▄▀ █ █ ▄ ▀ ▄ ██    ▄ 
 ▄█ ▄▄▀▄▄ ▀█ ▄█▀█▀█ ██▀█▀ ▄▀▀█ 
 ▄▄█ ▀▀▄█▄▀██  █   █ ▄████▄ ▄  
 ▄▄▄▄▄▄▄ █ █▀▄█▀▄▀▀ ▀█ ▄ █▀▀ █ 
 █ ▄▄▄ █  ▄   ▄█▄  ▀██▄▄▄█▄ ▄▀ 
 █ ███ █ ▄▄▀▄▄▀▄▄▀█ █ █  █▀▀▄█ 
 █▄▄▄▄▄█ ▄▀ ▄▄▀▀▀█ ▄ █▀▄  █  ▄ 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2024-11-01T22:16:07.321Z info: on(scan) Waiting, 2, https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FAfs3WJQofw%3D%3D
2024-11-01T22:16:07.325Z info: Scan QRCode to log in:
 ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄  ▄▄ ▄▄▄▄▄▄▄ 
 █ ▄▄▄ █ ▀▄ ▄▄▄█▄▄▀▄▄  █ ▄▄▄ █ 
 █ ███ █ ▀▀▄█ ██ ▄▀▀▄▀ █ ███ █ 
 █▄▄▄▄▄█ ▄ █▀▄ █ ▄▀█▀▄ █▄▄▄▄▄█ 
 ▄ ▄▄ ▄▄▄▀▄▀▄▄ ▄▀▀█▄▀  ▄  ▄ ▄▄ 
 ▄██▀ ▄▄ ▀█▀▀ ▄ ▀█ ▀▀▄██▀▀ ▄▄▀ 
 ▀▀  ▄▀▄▀▀█▀▄ █▄██▄▀▄▀▄  ▀▄▄ ▀ 
 ███▀▀▀▄▀▀▄    ▄▀ ▄▄█▄▄▀▄▄ ███ 
 ▄▄ ▀▄▀▄▄▄██▄█▄█ ▄ ▄▄▄█▀██▄ █  
 ▄▀  ██▄▀▄▀▀█▄ ██ ▀  ▀▀ █ ▀█▀  
  ▄▄▄█▄▄█▀▄▄▀▄  ▀██▀ ███▄█▄█   
 ▄▄▄▄▄▄▄ █▀ ▀█▀▀ █▀███ ▄ ██▀█▀ 
 █ ▄▄▄ █ ▀▄▄▄ ▀▀▄▀▄▀ █▄▄▄█▀▄▄▄ 
 █ ███ █ █▀▄▄▄▀▀ ▀ ▄██▀ █▀▀▄ █ 
 █▄▄▄▄▄█ ▄▄ ███▄▄▀ ▀▄█▄  █▀ █  
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2024-11-01T22:16:32.346Z info: on(scan) Timeout, 5, https://wechaty.js.org/qrcode/https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FAfs3WJQofw%3D%3D
2024-11-01T22:16:32.404Z info: Scan QRCode to log in:
 ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄  ▄▄ ▄▄▄▄▄▄▄ 
 █ ▄▄▄ █ ▀▄ ▄▄▄█▄▄▀▄▄  █ ▄▄▄ █ 
 █ ███ █ ▀▀▄█ ██ ▄▀▀▄▀ █ ███ █ 
 █▄▄▄▄▄█ ▄ █▀▄ █ ▄▀█▀▄ █▄▄▄▄▄█ 
 ▄ ▄▄ ▄▄▄▀▄▀▄▄ ▄▀▀█▄▀  ▄  ▄ ▄▄ 
 ▄██▀ ▄▄ ▀█▀▀ ▄ ▀█ ▀▀▄██▀▀ ▄▄▀ 
 ▀▀  ▄▀▄▀▀█▀▄ █▄██▄▀▄▀▄  ▀▄▄ ▀ 
 ███▀▀▀▄▀▀▄    ▄▀ ▄▄█▄▄▀▄▄ ███ 
 ▄▄ ▀▄▀▄▄▄██▄█▄█ ▄ ▄▄▄█▀██▄ █  
 ▄▀  ██▄▀▄▀▀█▄ ██ ▀  ▀▀ █ ▀█▀  
  ▄▄▄█▄▄█▀▄▄▀▄  ▀██▀ ███▄█▄█   
 ▄▄▄▄▄▄▄ █▀ ▀█▀▀ █▀███ ▄ ██▀█▀ 
 █ ▄▄▄ █ ▀▄▄▄ ▀▀▄▀▄▀ █▄▄▄█▀▄▄▄ 
 █ ███ █ █▀▄▄▄▀▀ ▀ ▄██▀ █▀▀▄ █ 
 █▄▄▄▄▄█ ▄▄ ███▄▄▀ ▀▄█▄  █▀ █  
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

2024-11-01T22:16:33.340Z info: on(scan) Scanned, 3
2024-11-01T22:16:47.347Z info: on(scan) Confirmed, 4
18:16:48 WARN PuppetWeChatBridge proxyWechaty() noWechaty exception: Error: Execution context was destroyed, most likely because of a navigation.
18:16:48 ERR PuppetWeChatBridge getUserName() exception: Execution context was destroyed, most likely because of a navigation.
18:16:48 ERR PuppetWeChatEvent onLogin() exception: Error: Execution context was destroyed, most likely because of a navigation.
2024-11-01T22:16:48.796Z error: on(error) Error: Execution context was destroyed, most likely because of a navigation.
    at rewriteError (/home/josh/projects/convo/node_modules/.pnpm/puppeteer@13.7.0/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:265:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext._evaluateInternal (/home/josh/projects/convo/node_modules/.pnpm/puppeteer@13.7.0/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:219:60)
    at async ExecutionContext.evaluate (/home/josh/projects/convo/node_modules/.pnpm/puppeteer@13.7.0/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async Bridge.proxyWechaty (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet-wechat@1.18.4_brolog@1.14.2_gerror@1.0.16_wechaty-puppet@1.20.2_rxjs@7.8.1_/node_modules/wechaty-puppet-wechat/dist/cjs/src/bridge.js:631:31)
    at async Bridge.getUserName (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet-wechat@1.18.4_brolog@1.14.2_gerror@1.0.16_wechaty-puppet@1.20.2_rxjs@7.8.1_/node_modules/wechaty-puppet-wechat/dist/cjs/src/bridge.js:326:30)
    at async PuppetWeChat.onLogin (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet-wechat@1.18.4_brolog@1.14.2_gerror@1.0.16_wechaty-puppet@1.20.2_rxjs@7.8.1_/node_modules/wechaty-puppet-wechat/dist/cjs/src/event.js:85:24)
18:16:48 ERR PuppetWeChatBridge onLoad() exception: Error: execute proxyWechaty(init) error: 503, init() without a ready angular env
2024-11-01T22:16:48.835Z error: on(error) Error: execute proxyWechaty(init) error: 503, init() without a ready angular env
    at Bridge.inject (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet-wechat@1.18.4_brolog@1.14.2_gerror@1.0.16_wechaty-puppet@1.20.2_rxjs@7.8.1_/node_modules/wechaty-puppet-wechat/dist/cjs/src/bridge.js:272:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Bridge.onLoad (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet-wechat@1.18.4_brolog@1.14.2_gerror@1.0.16_wechaty-puppet@1.20.2_rxjs@7.8.1_/node_modules/wechaty-puppet-wechat/dist/cjs/src/bridge.js:154:13)
18:16:57 WARN PuppetWeChatBridge proxyWechaty() noWechaty exception: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:16:58 WARN PuppetWeChatBridge proxyWechaty() noWechaty exception: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:17:07 WARN PuppetWeChatBridge proxyWechaty() noWechaty exception: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:17:07 ERR PuppetWeChatBridge getContact() rejection: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:17:07 ERR PuppetWeChat roomRawPayload(@@8331b9b3a1e3e99c8c1d89435e3b750ed8635b4583d8339499003815d6153c1e) exception: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
2024-11-01T22:17:07.856Z error: on(error) GError: message not found for id: 17304993600420499
    at GError.from (/home/josh/projects/convo/node_modules/.pnpm/gerror@1.0.16/node_modules/gerror/dist/cjs/src/gerror/gerror.js:86:23)
    at PuppetWeChat.<anonymous> (/home/josh/projects/convo/node_modules/.pnpm/wechaty@1.20.2_@swc+core@1.6.13_brolog@1.14.2_redux@4.2.1_rxjs@7.8.1/node_modules/wechaty/dist/cjs/src/wechaty-mixins/puppet-mixin.js:242:72)
18:17:08 WARN PuppetWeChatBridge proxyWechaty() noWechaty exception: Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:17:08 ERR PuppetWeChatBridge getContact() rejection: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
18:17:08 ERR PuppetWeChat roomRawPayload(@@8331b9b3a1e3e99c8c1d89435e3b750ed8635b4583d8339499003815d6153c1e) exception: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
2024-11-01T22:17:08.145Z error: on(error) GError: message not found for id: 17304993600520549
    at GError.from (/home/josh/projects/convo/node_modules/.pnpm/gerror@1.0.16/node_modules/gerror/dist/cjs/src/gerror/gerror.js:86:23)
    at PuppetWeChat.<anonymous> (/home/josh/projects/convo/node_modules/.pnpm/wechaty@1.20.2_@swc+core@1.6.13_brolog@1.14.2_redux@4.2.1_rxjs@7.8.1/node_modules/wechaty/dist/cjs/src/wechaty-mixins/puppet-mixin.js:242:72)
18:17:47 WARN PuppetWatchdogAgent start() reset() reason: {"data":{"code":200,"url":"https://login.weixin.qq.com/qrcode/Afs3WJQofw=="},"timeoutMilliseconds":60000}
2024-11-01T22:17:47.385Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":{"code":200,"url":"https://login.weixin.qq.com/qrcode/Afs3WJQofw=="},"timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:518:28)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
18:17:47 WARN PuppetWeChatBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed.
18:18:54 WARN PuppetWatchdogAgent start() reset() reason: {"data":"inited","timeoutMilliseconds":60000}
2024-11-01T22:18:54.826Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":"inited","timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:530:35)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
18:18:54 WARN PuppetWatchdogAgent start() reset() reason: {"data":"inited","timeoutMilliseconds":60000}
2024-11-01T22:18:54.827Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":"inited","timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:530:35)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
18:20:00 WARN PuppetWatchdogAgent start() reset() reason: {"data":"inited","timeoutMilliseconds":60000}
2024-11-01T22:20:00.531Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":"inited","timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:530:35)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
18:20:00 WARN PuppetWatchdogAgent start() reset() reason: {"data":"inited","timeoutMilliseconds":60000}
2024-11-01T22:20:00.531Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":"inited","timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:530:35)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
18:20:00 WARN PuppetWatchdogAgent start() reset() reason: {"data":"inited","timeoutMilliseconds":60000}
2024-11-01T22:20:00.531Z error: on(error) Error: WatchdogAgent reset: lastFood: "{"data":"inited","timeoutMilliseconds":60000}"
    at Watchdog.reset (/home/josh/projects/convo/node_modules/.pnpm/wechaty-puppet@1.20.2_rxjs@7.8.1/node_modules/wechaty-puppet/dist/cjs/src/agents/watchdog-agent.js:48:39)
    at Watchdog.emit (node:events:530:35)
    at Timeout._onTimeout (/home/josh/projects/convo/node_modules/.pnpm/watchdog@0.9.2/node_modules/watchdog/dist/cjs/src/watchdog.js:84:18)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
@linj121 linj121 added the bug Something isn't working label Nov 1, 2024
@linj121
Copy link
Owner Author

linj121 commented Nov 2, 2024

Temporary workaround: stop wechaty, wait 2 minutes or more for the context to be rebuilt (question: what exactly is being rebuilt here?), and then re-start it.
See: d873d27#diff-7bd4c8bf754fd12fd8e6e762dba133fe4286454c7d133f51d26fcb5404b5a07c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant