Skip to content

Regression: Snapshot upload fails on blob iframe URL after CORS iframe processing change #2285

@david-pulkowski

Description

@david-pulkowski

The problem

Percy CLI now fails snapshot upload when a page includes an iframe with a blob URL source. This appears to be a regression introduced around the CORS iframe processing changes in PR 2121.

Environment

OS: Windows 11
Test stack: Selenium + percy exec
Percy CLI affected: newer 1.31.14
Percy CLI not failing for us: 1.31.7
Percy-Selenium SDK Version: 2.2.0
Node: v24.13.0

Details

Observed error
Percy upload fails with:
Invalid URL, scheme must be http or https: blob:https://...

Why this looks like a regression
Older Percy versions in our pipeline did not fail on this scenario.
After upgrading to newer 1.31.14 versions, the same test flow now fails.
PR 2121 moved CORS iframe processing into core and creates iframe resources from frame URLs, which seems to surface blob URLs into upload validation.

Minimal reproduction

Open a page that contains an iframe whose src is blob:https://...
Run snapshot with percy exec using Selenium.
Upload fails with Invalid URL, scheme must be http or https.

Expected behavior
Percy should gracefully handle blob iframe sources by skipping, sanitizing, or otherwise not failing the entire snapshot upload.

Actual behavior
Snapshot upload fails hard when blob iframe URL is present in discovered resources.

Related change
PR 2121: #2121

Impact
Blocks visual snapshots for pages that legitimately use blob-backed iframe content.

Debug logs

[percy:timer] client:post - snapshot.post - 0.222s (214ms)
[percy:core:queue] snapshot queueInfo: {"queued":0,"pending":0,"total":0} (0ms)
[percy:core] Encountered an error uploading snapshot: Test page - After scrolling load (1ms)
[percy:core] Error: Invalid URL, scheme must be http or https: blob:https://www.example.com
at handleFinished (file:///project/node_modules/@percy/client/dist/utils.js:220:17)
at IncomingMessage. (file:///project/node_modules/@percy/client/dist/utils.js:236:27)
at IncomingMessage.emit (node:events:520:35)
at endReadableNT (node:internal/streams/readable:1701:12)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21) (0ms)
[percy:client] Sending error logs for analysis (0ms)
[percy:timer] client:post - error.analysis.get - 0.085s (86ms)
[percy:core] Detected error for Snapshot: Test page - After scrolling load (1ms)
[percy:core] Failure: Upload snapshot failure (0ms)
[percy:core] Failure Reason: Some snapshot or component uploads failed. (0ms)
[percy:core] Suggestion: Snapshot Error: Test page - After scrolling load:
[] (0ms)

Code to reproduce issue

Given the nature of testing/environment bugs, it’s best to try and isolate the
issue in a reproducible repo. This will make it much easier for us to diagnose
and fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions