pywb
pywb copied to clipboard
Client-side replay: static resources missing on URL Not Found page
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:
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):
In server-side replay mode (stylesheet loaded correctly):
Environment
- OS: Linux
- Browser Chromium / Firefox
- Version 135 / 137