-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bad error when using anchor hash in URL #213
Comments
Note in the sample code above, if I switch to use |
So according to the documentation the call to Line 271 in 0c9fefd
Line 248 in 0c9fefd
|
This code: const puppeteer = require('puppeteer');
const Url = "https://www.peterbe.com#other-important-security-considerations";
// const Url="https://www.peterbe.com";
(async () => {
const browser = await puppeteer.launch();
console.log('Browser version', await browser.version());
const page = await browser.newPage();
await page.setRequestInterception(true);
await page.setDefaultNavigationTimeout(5 * 1000);
page.on('request', request => {
const requestUrl = request.url();
console.log(requestUrl);
request.continue();
});
page.on('response', response => {
console.log(response.status(), response.url());
});
await page.setJavaScriptEnabled(false);
await page.goto(Url);
const htmlVanilla = await page.content();
await page.setJavaScriptEnabled(true);
const response = await page.goto(Url, {
waitUntil: 'networkidle0'
});
const htmlJS = await page.content();
await browser.close();
})(); When you run that it will crash and fail with |
Ignore this comment above about not catching errors around |
E.g.
When I run it:
The text was updated successfully, but these errors were encountered: