mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 17:56:15 +00:00
Feature: Improved handling of wait times for page checks and reloads, using a 10s timeout for slower networks
This commit is contained in:
@@ -484,8 +484,9 @@ export class Login {
|
||||
await this.inputEmail(page, email)
|
||||
|
||||
// Step 2: Wait for transition to password page (silent - no spam)
|
||||
// FIXED: Use timeoutMs parameter with 10s timeout
|
||||
await waitForPageReady(page, {
|
||||
networkIdleMs: 500
|
||||
timeoutMs: 10000
|
||||
})
|
||||
|
||||
const passwordPageReached = await LoginStateDetector.waitForAnyState(
|
||||
@@ -544,6 +545,7 @@ export class Login {
|
||||
// --------------- Input Steps ---------------
|
||||
private async inputEmail(page: Page, email: string) {
|
||||
// IMPROVED: Smart page readiness check (silent - no spam logs)
|
||||
// Using default 10s timeout
|
||||
const readyResult = await waitForPageReady(page)
|
||||
|
||||
// Only log if REALLY slow (>5s indicates a problem)
|
||||
@@ -586,7 +588,7 @@ export class Login {
|
||||
if (content.length < 1000) {
|
||||
this.bot.log(this.bot.isMobile, 'LOGIN', 'Reloading page...', 'warn')
|
||||
await page.reload({ waitUntil: 'domcontentloaded', timeout: 10000 }).catch(() => { })
|
||||
await waitForPageReady(page) // Silent
|
||||
await waitForPageReady(page) // Silent - using default 10s timeout
|
||||
}
|
||||
|
||||
const totpRetry = await this.tryAutoTotp(page, 'pre-email retry')
|
||||
|
||||
Reference in New Issue
Block a user