make sure PuppetWhatsAppOptions.puppeteerOptions.puppeteer.headless is unset or truthy value.
start puppet and wait till qrcode appears.
terminate the system and restart.
system will stuck and no qrcode event will be triggered.
Something might be helpful:
This might be realted to localAuth defined by whatsapp-web.js. If at first we start the system with headless as falsy, the problem will disappear. This hows that the localAuth generated by headless: off mode will prevent the problem.
However if we start with headless on but turn it off afterwards, the problem will remain. And the browswer will say that you need to update your Chrome to 60+ (actually we have 100.0.4889.0)
If we clear the localAuth folder, the problem will disappear.
Potential solution:
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.
We can save a correct session (created by starting the puppeteer in headless: off mode) in the puppet.
Update:
Reproduced with whatsapp-web.js (just set headless to true in example.js)
There is no silver bullets in whatsapp-web.js issue. Suggestion is delete session everytime, which is not acceptable for us here.
Steps to reproduce the problem:
Something might be helpful:
Potential solution:
Update: