Version
npx playwright 1.59.1
python playwright 1.59.0
Source code / Trace
Due to strict company data security policies, I cannot attach the raw .zip trace file publicly.
However, if it is necessary for debugging, I am more than happy to share the trace file privately. Please provide an email address or a secure channel, and I will send it over.
Steps to reproduce
- Generate a trace file (traces/xxx.zip) using playwright-python on a complex page containing multiple nested, dynamically injected and sandboxed iframes (typical in enterprise micro-frontend dashboards).
- List all actions in the trace to find the target action ID:
npx playwright trace actions traces/xxx.zip
- Attempt to extract the specific action's snapshot using the CLI:
DEBUG=pw:api,pw:browser npx playwright trace snapshot <action-id>
Observe the CLI hanging indefinitely, eventually hitting the 30000ms timeout instead of outputting the snapshot.
w:api navigated to "about:blank" +7ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +18ms
pw:api navigated to "about:blank" +76ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +17ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +261ms
pw:api navigated to "about:blank" +44ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +54ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +21ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "about:blank" +75ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdff" +40ms
pw:api navigated to "about:blank" +10ms
pw:api navigated to "about:blank" +105ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +27ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +46ms
pw:api navigated to "about:blank" +9ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +48ms
pw:api navigated to "about:blank" +7ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +54ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +1ms
pw:api navigated to "about:blank" +41ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +147ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +92ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +26ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +42ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +3ms
pw:api navigated to "about:blank" +12ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +74ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +37ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +0ms
pw:api navigated to "about:blank" +124ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +27ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +30ms
pw:api navigated to "about:blank" +50ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +8ms
pw:api navigated to "about:blank" +52ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +2ms
pw:api navigated to "about:blank" +13ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +144ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +88ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +31ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +49ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +7ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +48ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +74ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +3ms
^[ pw:api navigated to "about:blank" +141ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +30ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +14ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +62ms
pw:api navigated to "about:blank" +8ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +61ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +6ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +177ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +87ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +41ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdff" +28ms
pw:api navigated to "about:blank" +33ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +5ms
pw:api navigated to "about:blank" +56ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +65ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +0ms
pw:api navigated to "about:blank" +133ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +56ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +9ms
^C pw:browser [pid=544282] +8s
^X pw:api <= failed +62ms
Error: Target page, context or browser has been closed
Expected behavior
The CLI snapshot command should successfully resolve the routing, load the page, and output the DOM/Snapshot data, exactly as the UI version (show-trace) does.
Actual behavior
The CLI snapshot server fails to resolve base URLs for iframes correctly, falling into an infinite redirect loop. It endlessly concatenates permutations of different frame IDs to the relative path, causing the headless browser to constantly navigate and never reach the load state.
Log Evidence:
Notice the catastrophic concatenation of 4 different frame IDs (2f10..., 9824..., c5ee..., 3841...):
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +18ms
pw:api navigated to "about:blank" +76ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +17ms
...
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +83ms
### Additional context
As a side note, it is extremely difficult for enterprise users to share raw trace files for debugging due to internal APIs, tokens, and sensitive business data embedded in the DOM or network payloads.
Feature Request: It would be immensely helpful if the Playwright team could provide a built-in trace sanitization/redaction tool (e.g., a CLI command to strip network payload bodies, mask text nodes, or replace internal URLs). This would allow us to safely share redacted .zip traces with the maintainers to help fix complex routing bugs like this one much faster.
### Environment
```shell
### System info
- **Playwright Version**: `playwright-python` 1.59.0 (for recording) / Node.js CLI `1.59.1` (for parsing)
- **Operating System**: Linux (WSL)
- **Browser**: Chromium (Headless Shell)
- **Other info**: Occurs within a complex enterprise micro-frontend architecture.
Version
npx playwright 1.59.1
python playwright 1.59.0
Source code / Trace
Due to strict company data security policies, I cannot attach the raw
.ziptrace file publicly.However, if it is necessary for debugging, I am more than happy to share the trace file privately. Please provide an email address or a secure channel, and I will send it over.
Steps to reproduce
w:api navigated to "about:blank" +7ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +18ms
pw:api navigated to "about:blank" +76ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +17ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +261ms
pw:api navigated to "about:blank" +44ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +54ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +21ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "about:blank" +75ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdff" +40ms
pw:api navigated to "about:blank" +10ms
pw:api navigated to "about:blank" +105ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +27ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +46ms
pw:api navigated to "about:blank" +9ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +48ms
pw:api navigated to "about:blank" +7ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +54ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +1ms
pw:api navigated to "about:blank" +41ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +147ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +92ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +26ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +42ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +3ms
pw:api navigated to "about:blank" +12ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +74ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +37ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +0ms
pw:api navigated to "about:blank" +124ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +27ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1bsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +30ms
pw:api navigated to "about:blank" +50ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +8ms
pw:api navigated to "about:blank" +52ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +2ms
pw:api navigated to "about:blank" +13ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +144ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +88ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +31ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +49ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0fsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +7ms
pw:api navigated to "about:blank" +14ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +48ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +0ms
pw:api navigated to "about:blank" +74ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@2f104321b461c9602dfc326f8d33bdff" +3ms
^[ pw:api navigated to "about:blank" +141ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +30ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +14ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +62ms
pw:api navigated to "about:blank" +8ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +61ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdffsnapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +6ms
pw:api navigated to "about:blank" +16ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +177ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +87ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +41ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@2f104321b461c9602dfc326f8d33bdff" +28ms
pw:api navigated to "about:blank" +33ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20" +5ms
pw:api navigated to "about:blank" +56ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "about:blank" +65ms
pw:api navigated to "about:blank" +1ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@c5ee72952502e1eb31eb52564050cc1b" +0ms
pw:api navigated to "about:blank" +133ms
pw:api navigated to "about:blank" +3ms
pw:api navigated to "about:blank" +56ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "about:blank" +2ms
pw:api navigated to "http://localhost:44946/snapshotsnapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@9824b9793c1111ed6a4182d9f33cad20snapshot/frame@38414a781e64cd0c4c10e3f1d74c3b0f" +9ms
^C pw:browser [pid=544282] +8s
^X pw:api <= failed +62ms
Error: Target page, context or browser has been closed
Expected behavior
The CLI snapshot command should successfully resolve the routing, load the page, and output the DOM/Snapshot data, exactly as the UI version (show-trace) does.
Actual behavior
The CLI snapshot server fails to resolve base URLs for iframes correctly, falling into an infinite redirect loop. It endlessly concatenates permutations of different frame IDs to the relative path, causing the headless browser to constantly navigate and never reach the
loadstate.Log Evidence:
Notice the catastrophic concatenation of 4 different frame IDs (
2f10...,9824...,c5ee...,3841...):