Skip to content

fix(example): decode iOS captures in the capture resolution screen - #750

Merged
gre merged 1 commit into
masterfrom
fix/example-resolution-ios-decode
Oct 28, 2026
Merged

gre merged 1 commit into
masterfrom
fix/example-resolution-ios-decode

Conversation

@gre

@gre gre commented Oct 28, 2026

Copy link
Copy Markdown
Owner

master's iOS Detox job is red: all 6 capture-resolution cases fail with "ERROR could not decode capture" (see the detox-screenshots-ios artifact of run 40201027129). Every open PR inherits it (#744–#749).

Cause: on iOS, result: "tmpfile" resolves to a bare path (/…/tmp/ReactNative/x.png). The screen decodes it with Skia.Data.fromURI. Skia's Apple loader builds an NSURL from the string and calls dataWithContentsOfURL, and a scheme-less URL reads nothing. Android returns file://…, so only iOS was affected.

Why it slipped through: the screen/test landed in #742 while iOS Detox was still continue-on-error, so its green check meant nothing. #741 made Detox blocking, and the failure appeared on master once both were merged.

Fix: prefix bare paths with file:// (URI-encoded) before handing them to Skia. Example-only; the library's tmpfile contract is unchanged.

🤖 Generated with Claude Code

iOS returns tmpfile results as bare paths. Skia's Apple loader turns the
string into an NSURL and reads it with dataWithContentsOfURL, which reads
nothing without a scheme, so every capture resolution case failed with
'could not decode capture'. The test was added while iOS Detox was still
non-blocking, so CI only went red once #741 made it blocking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gre
gre marked this pull request as ready for review October 28, 2026 15:49
Copilot AI balanced review requested due to automatic review settings October 28, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@gre
gre merged commit d478e91 into master Oct 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants