question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request Interception issue with base href

See original GitHub issue

Request interception appears to be faulty and results in a navigation error.

Environment

  • Puppeteer version: 1.14.0-next.1556048038195, tested 10.11 until next
  • Chromium version: r641577
  • Platform / OS version: macOS 10.14.3 Mojave
  • Node.js version: 8.15.1, tested up until 10.15.3

Steps to reproduce

  1. Clone https://github.com/ps-mariotacke/puppeteer-intercept-issue a stripped down sample
  2. Run npm install
  3. 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 and working.html payload which can be switched in the index.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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ps-mariotackecommented, Apr 29, 2019

Confirmed working in puppeteer@1.15.0-next.1556508387804. Thank you very much for the quick turn-around @aslushnikov. 🔥

2reactions
aslushnikovcommented, Apr 27, 2019
Read more comments on GitHub >

github_iconTop 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 >

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