New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Puppeteer does not follow javascript redirects - leads to infinite loading of page without timeout #3684
Comments
Having the same issue. The URL I visit is https://drive.google.com/?tab=io. |
I would be happy if puppeteer would throw an error in my case. :) |
Drop requirement for matching "origin" and "content-type" headers in requests and request interceptions. This way javascript redirects that use form submission start working. Fix puppeteer#3684.
I can reproduce this with the following script: const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({
ignoreHTTPSErrors: true,
});
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', r => r.continue());
await page.goto('http://clkuk.tradedoubler.com/click?p=190137&a=3063988&g=22260412&url=https://eu.puma.com/de/de/home/&epi=dede-shopping-stripe');
await page.waitFor(5000);
await page.evaluate(() => 7 * 8); // hangs here
await browser.close();
})(); The core issue here is again request interception - #3471, since our heuristic fails to match interception with I'll try to relax the heuristic a little more for now and see if it still holds in the wild. |
Drop requirement for matching "origin" and "content-type" headers in requests and request interceptions. This way javascript redirects that use form submission start working. Fix #3684.
Steps to reproduce
Tell us about your environment:
Puppeteer version: 1.11.0
Platform / OS version: Mac OS, 10.13.6
URLs (if applicable):
Node.js version: 6.1.0
What steps will reproduce the problem?
What is the expected result?
The page.evaluate function should either throw an error or a timeout should occur. But neither happens. Alternative solution: puppeteer should follow the javascript redirects; that would also solve the problem.
What happens instead?
The script is running in an endless loop, cause the page is not fully loaded or rather the redirects in form of javascript redirects is not followed. If I open the page above in my Chrome I got redirected to this url. If the evaluate script would run on this url, everything would be fine. Unfortunately the redirects don't work with puppeteer for some reasons.
The text was updated successfully, but these errors were encountered: