diff --git a/epic-games.js b/epic-games.js index f828031..9211042 100644 --- a/epic-games.js +++ b/epic-games.js @@ -79,9 +79,9 @@ try { await page.fill('#email', email); await page.fill('#password', password); await page.click('button[type="submit"]'); - page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(() => { + page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(async () => { console.error('Got a captcha during login (likely due to too many attempts)! You may solve it in the browser, get a new IP or try again in a few hours.'); - notify('epic-games: got captcha during login. Please check.'); + await notify('epic-games: got captcha during login. Please check.'); }).catch(_ => { }); // handle MFA, but don't await it page.waitForURL('**/id/login/mfa**').then(async () => {