pywb icon indicating copy to clipboard operation
pywb copied to clipboard

Client-side replay: static resources missing on URL Not Found page

Open ato opened this issue 6 months ago • 3 comments

Describe the bug

@ldko noticed that in client_side_replay mode there are failed requests for static assets hitting the ir_/ endpoint:

127.0.0.1 - - [2025-04-29 08:14:41] "GET /test/20250428230354ir_/http://localhost:8080/static/css/bootstrap.min.css HTTP/1.1" 404 1176 0.013697

They seem to be coming from the pywb 'URL Not Found' page. In the inspector I can see the HTML has been rewritten by the service-worker:

Image

Steps to reproduce the bug

With pywb 2.9.0b0 create a test collection:

wb-manager init test

and run with this config.yaml:

client_side_replay: true

Open a URL that doesn't exist in the collection such as: http://localhost:8080/test/20250428231034/https://bogus/

Expected behavior

The static asset URLs on the 'URL Not Found' page should probably not be rewritten. Alternatively, the not found page could be changed to not need static assets.

Screenshots

In client-side replay mode (missing stylesheet):

Image

In server-side replay mode (stylesheet loaded correctly):

Image

Environment

  • OS: Linux
  • Browser Chromium / Firefox
  • Version 135 / 137

ato avatar Apr 29 '25 01:04 ato