When logout, puppeteer will be destroied and restarted.
In the process, the heartbeat check will continue (as it stops and starts with manager). And when it tries to get whatsapp client, the system will crash.
Solution: wrap manager.heartbeat alive = !!this.getWhatsAppClient().pupBrowser?.isConnected() with try catch.
When logout, puppeteer will be destroied and restarted. In the process, the heartbeat check will continue (as it stops and starts with manager). And when it tries to get whatsapp client, the system will crash.
Solution: wrap manager.heartbeat
alive = !!this.getWhatsAppClient().pupBrowser?.isConnected()
with try catch.