Request Interception issue with base href
See original GitHub issueRequest interception appears to be faulty and results in a navigation error.
Environment
- Puppeteer version:
1.14.0-next.1556048038195
, tested 10.11 untilnext
- Chromium version:
r641577
- Platform / OS version:
macOS 10.14.3 Mojave
- Node.js version:
8.15.1
, tested up until10.15.3
Steps to reproduce
- Clone https://github.com/ps-mariotacke/puppeteer-intercept-issue a stripped down sample
- Run
npm install
- Run
npm start
What is the expected result?
Chromium spawns and takes a screenshot. It should have setRequestInterception
enabled on the page.
What happens instead? Chromium gets stuck and errors with a navigation error.
Additional information
- I included a
broken.html
andworking.html
payload which can be switched in theindex.js
at the top. The only difference between these two payloads is that the broken payload specifies a<base href="...">
in<head>
. The working payload does not include the base href and instead specifies the fully qualified url in the script tag. - https://github.com/ps-mariotacke/puppeteer-intercept-issue
Related to #3471
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
request url problems when using base href - Stack Overflow
My current solution is to set base href to <base href="/"> and put all angular2 files except index.html directly under /public. (index.html is...
Read more >Angular Interceptor for a BaseHref Path in Services - DZone
The HttpInterceptors can be used to to modify the headers, url, and body of Angular service requests/responses. The example project that is used ......
Read more >A Practical Guide to Intercepting Network Requests in Cypress
First things first - matching our url. When using .intercept() command, there are two main questions that need to be resolved. How do...
Read more >Cypress cy.intercept Problems - Gleb Bahmutov
This is the browser trying to be robust and retrying a failed network request. The browser sees a network error coming back from...
Read more >Top 10 ways to use Interceptors in Angular - Medium
It provides a way to intercept HTTP requests and responses to transform or handle them before passing ... ng serve — serve-path=<path> —...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed working in
puppeteer@1.15.0-next.1556508387804
. Thank you very much for the quick turn-around @aslushnikov. 🔥The upstream fix is out for review: https://chromium-review.googlesource.com/c/chromium/src/+/1586346