From 6bb1dca93412c82219bd8f68fd1dec8a42aab01b Mon Sep 17 00:00:00 2001 From: KevinMatt <36391318+kevinmatthe@users.noreply.github.com> Date: Mon, 28 Aug 2023 15:16:30 +0800 Subject: [PATCH] epic-games: captcha on login: await notify (#195) Adding async handle in captcha notify --- epic-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 () => {