Skip to content

[build-tools] Install ffmpeg before starting Appium sessions - #4577

Merged
gwdp merged 1 commit into
mainfrom
gwdp/appium-ffmpeg
Oct 8, 2026
Merged

gwdp merged 1 commit into
mainfrom
gwdp/appium-ffmpeg

Conversation

@gwdp

@gwdp gwdp commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Why

On iOS, startRecordingScreen fails in hosted Appium sessions with 'ffmpeg' binary is not found in PATH. XCUITest records the simulator with ffmpeg from the Appium server's PATH. The default iOS session image (macos-tahoe-26.5-xcode-26.6) does not include ffmpeg.

macOS sessions installed ffmpeg for session previews from #4398 until #4549 moved previews to cwebp. Appium recording relied on that install, so recording on iOS stopped working.

How

  • eas/start_appium_remote_session runs the existing best-effort ffmpeg install (Homebrew on macOS, apt on Linux) at the same time as the Appium install, on both platforms. UiAutomator2 also uses ffmpeg, to merge long recordings.
  • The step waits for both installs before it starts Appium or fails.

Not in this PR: ffmpeg in the default macOS session image. The macos-tahoe-26.6-xcode-27.1 image already has it.

LLM Authorship

  • Gabe reproduced the issue on a hosted session and asked to restore the ffmpeg install for Appium on iOS. Claude Code wrote the change.
  • AI review of the first version found that the ffmpeg install could keep running after a failed Appium install. The step now waits for both installs, and a test covers it.
  • Gabe reviewed the final diff and can answer questions.

Test Plan

  • Reproduced on a hosted iOS Appium session (eas-cli 24.12.0): startRecordingScreen returned 500 with 'ffmpeg' binary is not found in PATH.
  • EAS workflow on macos-tahoe-26.5-xcode-26.6 (also the macOS latest image): no ffmpeg in /opt/homebrew/bin or /usr/local/bin. /opt/homebrew/bin is on the step PATH.
  • EAS workflow on the same image, in the order of the step: brew install ffmpeg took 10.4 s next to the appium@^3 and xcuitest install (12.5 s). XCUITest startRecordingScreen and stopRecordingScreen then returned a 4.97 MB MP4. This ran the same commands directly, not this build of build-tools.
  • build-tools unit tests in src/steps: 1333 passed. New tests check that Appium starts only after the ffmpeg install settles (installed or failed), and that an Appium install error waits for it. All three fail on main.
  • tsc, oxlint, and oxfmt are clean.
  • Not run: a hosted session with this branch deployed.

Generated with T3 Code, using Claude Code.

@gwdp
gwdp force-pushed the gwdp/appium-ffmpeg branch 2 times, most recently from 0148de6 to 61d4f29 Compare October 8, 2026 22:01
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.
@gwdp
gwdp force-pushed the gwdp/appium-ffmpeg branch from 61d4f29 to 6505565 Compare October 8, 2026 22:07
@gwdp gwdp changed the title [build-tools] Require ffmpeg before starting Appium sessions [build-tools] Install ffmpeg before starting Appium sessions Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@gwdp
gwdp requested a review from szdziedzic October 8, 2026 22:08
@gwdp
gwdp marked this pull request as ready for review October 8, 2026 22:08

@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

@gwdp
gwdp requested a review from krystofwoldrich October 8, 2026 22:09
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.87%. Comparing base (45d795e) to head (6505565).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4577      +/-   ##
==========================================
+ Coverage   73.87%   73.87%   +0.01%     
==========================================
  Files        1007     1007              
  Lines       49228    49230       +2     
  Branches    10633    10633              
==========================================
+ Hits        36363    36365       +2     
  Misses      11873    11873              
  Partials      992      992              

☔ 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.

@krystofwoldrich

Copy link
Copy Markdown
Contributor

Looks good.

Should we add ffmpeg to macos-tahoe-26.5-xcode-26.6?
How much does the install slows down the start up of iOS Appium sessions?

@gwdp

gwdp commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Looks good.

Should we add ffmpeg to macos-tahoe-26.5-xcode-26.6? How much does the install slows down the start up of iOS Appium sessions?

It was taking ~11secs last week when we had it. xcode 27.1 image already has it so it should run within 1 second max, will make sure to confirm it after deployment and post it here.

Thanks for the quick review 🙏

@gwdp

gwdp commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@gwdp

gwdp commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@gwdp
gwdp merged commit c8696f6 into main Oct 8, 2026
13 checks passed
@gwdp
gwdp deleted the gwdp/appium-ffmpeg branch October 8, 2026 23:12
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