Skip to content

@remotion/renderer: Fix parallel browser downloads - #9882

Merged
JonnyBurger merged 1 commit into
mainfrom
codex/fix-parallel-browser-download
Jul 29, 2026
Merged

@remotion/renderer: Fix parallel browser downloads#9882
JonnyBurger merged 1 commit into
mainfrom
codex/fix-parallel-browser-download

Conversation

@JonnyBurger

Copy link
Copy Markdown
Member

Summary

  • serialize browser downloads and extraction across Remotion processes
  • recover stale download locks and recheck the installed browser after waiting
  • add a regression test that launches two processes against the same browser cache

Testing

  • bun run build
  • bun run stylecheck
  • bun test packages/renderer/src (343 tests passed)

Closes #9875

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Jul 29, 2026 10:57am
remotion Ready Ready Preview, Comment Jul 29, 2026 10:57am

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — serializes concurrent browser downloads with a file-based lock to prevent corruption when multiple Remotion processes race to download/extract Chrome into the same cache directory.

  • Add browser-download-lock.ts — file-based cross-process lock using O_EXCL|O_CREAT (wx), with stale lock recovery (process liveness check + 30s mtime threshold), heartbeat every 5s, and token-based ownership verification.
  • Wrap downloadBrowser in the lock — acquires the lock before downloading, rechecks whether the browser was installed by a winner while waiting, and releases the lock in finally.
  • Add integration test — spawns two worker processes competing for the same lock, asserts the second is blocked while the first holds the lock, and verifies cleanup.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@JonnyBurger
JonnyBurger merged commit 880d3be into main Jul 29, 2026
19 checks passed
@JonnyBurger
JonnyBurger deleted the codex/fix-parallel-browser-download branch July 29, 2026 12:31
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.

Browser download is conflicting when running multiple npx remotion still

1 participant