From 17f1ee41c975e1dc9d8a7e5abef254a17bf07349 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 27 Jun 2024 23:32:15 +0200 Subject: [PATCH] eg: don't exit on login error since it may be 'Incorrect response' for captcha https://github.com/vogler/free-games-claimer/issues/183#issuecomment-2195691372 --- epic-games.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/epic-games.js b/epic-games.js index d0b9a03..9d492a0 100644 --- a/epic-games.js +++ b/epic-games.js @@ -103,7 +103,7 @@ try { await notify('epic-games: got captcha during login. Please check.'); }).catch(_ => { }); page.waitForSelector('p:has-text("Incorrect response.")').then(async () => { - console.error('Incorrect repsonse for captcha!'); + console.error('Incorrect response for captcha!'); }).catch(_ => { }); await page.fill('#email', email); // await page.click('button[type="submit"]'); login was split in two steps for some time, now email and password are on the same form again @@ -116,8 +116,7 @@ try { const error = page.locator('#form-error-message'); error.waitFor().then(async () => { console.error('Login error:', await error.innerText()); - await context.close(); // finishes potential recording - process.exit(1); + console.log('Please login in the browser!'); }).catch(_ => { }); // handle MFA, but don't await it page.waitForURL('**/id/login/mfa**').then(async () => {