Skip to content

Commit

Permalink
fix: increase timeout for selector waits in authentication process
Browse files Browse the repository at this point in the history
  • Loading branch information
retconned committed Jan 16, 2025
1 parent ea3db7a commit 6b8efb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/kickApi.ts
Original file line number Diff line number Diff line change
@@ -141,17 +141,18 @@ export const authentication = async ({
request.continue();
});

const selectorTimeout = 6000;
try {
await page.goto("https://kick.com/");
await page.waitForSelector("nav > div:nth-child(3) > button:first-child", {
visible: true,
timeout: 5000,
timeout: selectorTimeout,
});
await page.click("nav > div:nth-child(3) > button:first-child");

await page.waitForSelector('input[name="emailOrUsername"]', {
visible: true,
timeout: 5000,
timeout: selectorTimeout,
});

await page.type('input[name="emailOrUsername"]', username, { delay: 100 });
@@ -168,7 +169,7 @@ export const authentication = async ({
document.body.textContent?.includes("Verify 2FA Code");
return element || !verifyText;
},
{ timeout: 5000 },
{ timeout: selectorTimeout },
);

const requires2FA = await page.evaluate(() => {

0 comments on commit 6b8efb7

Please sign in to comment.