Skip to content

[build-tools] Encode macOS session previews with cwebp - #4549

Merged
szdziedzic merged 3 commits into
mainfrom
szdziedzic-claude/session-preview-macos-webp
Oct 6, 2026
Merged

szdziedzic merged 3 commits into
mainfrom
szdziedzic-claude/session-preview-macos-webp

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Why

Session previews from #4398 fail on every iOS session. The worker logs show:

Could not refresh the session preview; retrying in 60 seconds. ffmpeg … -c:v libwebp -quality 70 …/preview.webp exited with non-zero code: 8

The macOS session image has no FFmpeg, so the worker installs it with brew install ffmpeg. Homebrew's FFmpeg is built without libwebp, so it cannot encode WebP. Exit code 8 is FFmpeg's "Encoder not found".

How

On macOS, the preview no longer uses FFmpeg. It resizes the simulator screenshot with the built-in sips -Z 320 and encodes it with cwebp -q 70 from Homebrew's webp package. The session host runs brew install webp in the background only when cwebp is missing. If that fails, it logs a warning and the session runs without previews. This also removes the brew install ffmpeg that macOS sessions ran only for previews.

Android keeps the FFmpeg command, because the Android session image's FFmpeg includes libwebp.

Test Plan

Tests, ran EAS Workflow with this logic to test e2e


Devin Review

Homebrew's FFmpeg is built without libwebp, so every macOS preview failed
with "Encoder not found" (exit code 8). Resize the screenshot with sips and
encode it with cwebp from Homebrew's webp package instead. Android keeps
using FFmpeg.

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@szdziedzic
szdziedzic requested a review from gwdp October 6, 2026 12:53
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.80%. Comparing base (01c1ffc) to head (85bef18).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4549      +/-   ##
==========================================
+ Coverage   73.79%   73.80%   +0.01%     
==========================================
  Files        1000     1000              
  Lines       48937    48954      +17     
  Branches    10582    10583       +1     
==========================================
+ Hits        36109    36126      +17     
  Misses      11834    11834              
  Partials      994      994              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@szdziedzic
szdziedzic merged commit 4fd3698 into main Oct 6, 2026
12 checks passed
@szdziedzic
szdziedzic deleted the szdziedzic-claude/session-preview-macos-webp branch October 6, 2026 16:14
gwdp added a commit that referenced this pull request Oct 8, 2026
Appium's startRecordingScreen runs ffmpeg on the worker. The macOS
session image does not ship it, and #4549 removed the only install that
iOS sessions ran, so XCUITest recording fails with "'ffmpeg' binary is
not found in PATH". Install ffmpeg concurrently with Appium, wait for
both installs, and fail the step when ffmpeg is still missing.
gwdp added a commit that referenced this pull request Oct 8, 2026
Appium's startRecordingScreen runs ffmpeg on the worker. The macOS
session image does not ship it, and #4549 removed the only install that
iOS sessions ran, so XCUITest recording fails with "'ffmpeg' binary is
not found in PATH". Install ffmpeg concurrently with Appium, wait for
both installs, and fail the step when ffmpeg is still missing.
gwdp added a commit that referenced this pull request Oct 8, 2026
Appium's startRecordingScreen runs ffmpeg on the worker. The macOS
session image does not ship it, and #4549 removed the only install that
iOS sessions ran, so XCUITest recording fails with "'ffmpeg' binary is
not found in PATH". Install ffmpeg concurrently with Appium, and wait
for both installs before the step continues.
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