Open boringparty opened 1 year ago
On the current alpha, I'm still receiving this error. I've tried setting the username/password via environment variable as well as using the interactive prompts, no dice.
? Enter your F1TV password: [hidden]
Login required. This may take 10-30 seconds.
Error: Navigation timeout of 120000 ms exceeded
TimeoutError: Navigation timeout of 120000 ms exceeded
at /Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:108:111
at async FrameManager.waitForFrameNavigation (/Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:168:23)
at async Frame.waitForNavigation (/Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:536:16)
at async Page.waitForNavigation (/Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1229:16)
at async Promise.all (index 1)
at async Object.getF1tvToken (/Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/lib/f1tv-token.js:30:5)
at async saveF1tvToken (/Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/lib/f1tv-api.js:169:26)
at async /Users/redacted/.nvm/versions/node/v20.5.1/lib/node_modules/@thedave42/f1tv-dl/index.js:197:17
^C%
redacted@wundervoll ~ % f1tv-dl https://f1tv.formula1.com/detail/1000006785/2023-dutch-gp-qualifying -i eng -l debug
redacted@wundervoll ~ % f1tv-dl --version
0.25.16-alpha.0
So, spent some time putzing around - not a nodeJS dev, but have worked my way around some code.
I was able to get past the cookie accept/consent page - it's a frame now. The login never completes, and I don't know why.
if (debug) await getScreenshot(page, '01');
frame = page.frames().find(frame => frame.url().startsWith("https://consent.formula1.com")),
clickLogin = await frame.click('button[title="ACCEPT ALL"]'),
await Promise.all([
page.waitForNavigation({ timeout: config.TOKEN_NETWORK_TIMEOUT, waitUntil: 'networkidle0' }),
getScreenshot(page, '01_after-clicking-consent-button')
]);
await Promise.all([
page.$eval('a[title="Sign in"]', el => el.click()),
getScreenshot(page, '01_sign-in'),
page.waitForNavigation({ timeout: config.TOKEN_NETWORK_TIMEOUT, waitUntil: 'domcontentloaded' }),
getScreenshot(page, '01_sign-in-waitfornav')
]);
/* if (debug) await getScreenshot(page, '02');
await Promise.all([
page.$eval('#truste-consent-button', el => el.click()),
page.waitForSelector('#truste-consent-button', { timeout: 10000, hidden: true })
]); */
if (debug) await getScreenshot(page, '03');
await page.waitForTimeout(getRandomInt(1000, 3000));
I am encountering a similar issue; is there a fix for this?
after this is just sits there doing nothing. I'm not sure if this is isolated to my system or a change on the F1TV side.