Skip to content

Commit

Permalink
fix: Fixed main-frame crash (#2091) (close #2052, close #1954)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Apr 24, 2024
1 parent 605c8c2 commit 6177c53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/controllers/browser.ts
Expand Up @@ -116,7 +116,14 @@ export async function initWhatsapp(
await setWhatsappVersion(page, version, log);
}

setTimeout(() => {
log?.('verbose', `Loading WhatsApp WEB`);
await page.goto(puppeteerConfig.whatsappUrl, {
waitUntil: 'load',
timeout: 0,
referer: 'https://whatsapp.com/',
});
log?.('verbose', 'WhatsApp WEB loaded');
/*setTimeout(() => {
log?.('verbose', `Loading WhatsApp WEB`);
const timeout = 10 * 1000;
Expand All @@ -129,6 +136,7 @@ export async function initWhatsapp(
log?.('verbose', `WhatsApp WEB loaded`);
}, 1000);
*/

return page;
}
Expand Down

0 comments on commit 6177c53

Please sign in to comment.