Skip to content

fix(ios): serialize and finish JS license requests - #5071

Open
OskarEichler wants to merge 2 commits into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/fix-ios-js-license-errors
Open

fix(ios): serialize and finish JS license requests#5071
OskarEichler wants to merge 2 commits into
TheWidlarzGroup:support/6.x.xfrom
OskarEichler:codex/fix-ios-js-license-errors

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 31, 2026

Copy link
Copy Markdown

Fixes

  • register pending FairPlay requests on the same main queue that emits and receives the JS callback, avoiding unsynchronized dictionary access
  • queue requests that share a loadedLicenseUrl instead of overwriting the earlier request
  • consume each request before processing its response so thrown responses cannot leave stale entries
  • forward JS/invalid-license failures to AVContentKeyRequest.processContentKeyResponseError through the existing error path

Previously concurrent key requests for the same identifier overwrote one another. JS-reported and invalid-base64 failures also only emitted a React error; AVFoundation never received a terminal response, so the content-key request could remain pending.

Regression coverage

The v6 branch has no test suite (yarn test reports no test available), so no FairPlay regression test can be added without a new Apple DRM harness. Verified with:

  • xcrun swiftc -parse ios/Video/Features/DRMManager.swift ios/Video/Features/DRMManager+OnGetLicense.swift
  • YARN_NODE_LINKER=node-modules yarn build
  • YARN_NODE_LINKER=node-modules yarn lint
  • git diff --check

Breaking changes

None.

@OskarEichler OskarEichler changed the title fix(ios): finish failed JS license requests fix(ios): serialize and finish JS license requests Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant