wechaty / puppet-whatsapp

Wechaty Puppet for Whatsapp
https://npmjs.com/package/wechaty-puppet-whatsapp
Apache License 2.0
24 stars 17 forks source link

cannot connect to web.whatsapp.com when restart system as logout state #367

Closed hcfw007 closed 2 years ago

hcfw007 commented 2 years ago

Steps to reproduce the problem:

  1. make sure PuppetWhatsAppOptions.puppeteerOptions.puppeteer.headless is unset or truthy value.
  2. start puppet and wait till qrcode appears.
  3. terminate the system and restart.
  4. system will stuck and no qrcode event will be triggered.

Something might be helpful:

Potential solution:

  1. We set a timeout for scan or login event. If we did not receive such event in like 30 seconds, we clear the localAuth folder and try again.
  2. We can save a correct session (created by starting the puppeteer in headless: off mode) in the puppet.

Update:

hcfw007 commented 2 years ago

https://github.com/pedroslopez/whatsapp-web.js/issues/1463

hcfw007 commented 2 years ago

@huan @su-chang Any suggestion on this?

su-chang commented 2 years ago

扫描已经过期的二维码提示截图如下

origin_img_v2_d50ba0f1-8224-4610-8672-8d2b54a4f6fg

lijiarui commented 2 years ago

扫描已经过期的二维码提示截图如下

origin_img_v2_d50ba0f1-8224-4610-8672-8d2b54a4f6fg

How to reproduce: