`page.goto()` does not follow redirects

See original GitHub issue

This method does not resolve redirects per 301 nor 302 status codes.

It simply throws an error:

Error: Failed to navigate: http://localhost:3000/some-redirect-url
      at Page.goto (node_modules/puppeteer/lib/Page.js:390:13)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:228:7)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ali-habibzadehcommented, Oct 21, 2017

Is there a way of making .goto not follow redirects and stop after the first 3xx response?

1reaction
kauecastrocommented, Nov 10, 2017

Have already you solved this problem ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stop puppeteer follow redirects - Stack Overflow
goto() method to stop after the first redirect happened and simply return the html from that first 3xx page when i call page.content()...
Read more >
Page.goto() method - Puppeteer
Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last...
Read more >
How to Fix The ERR_TOO_MANY_REDIRECTS Error - Kinsta
The ERR_TOO_MANY_REDIRECTS error is pretty much what it sounds like: something is causing too many redirects, sending your website into an ...
Read more >
Navigation and loading | Playwright 中文文档
Usually, the client-side redirect happens before the load event, and page.goto() method automatically waits for the redirect. However, when redirecting from a ...
Read more >
How to Stop NodeJs Puppeteer Follow Redirects - Query Admin
redirectChain() you can now abort navigation redirects in Puppeteer ... else request.continue(); }); await page.goto('https://example.com'); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found