Skip to content

Preserve HLS interstitial ad states on late asset-list failures - #3569

Open
kelmer44 wants to merge 1 commit into
androidx:mainfrom
kelmer44:preserve-ad-state-on-late-asset-list-failures
Open

kelmer44 wants to merge 1 commit into
androidx:mainfrom
kelmer44:preserve-ad-state-on-late-asset-list-failures

Conversation

@kelmer44

@kelmer44 kelmer44 commented Nov 20, 2026 •

Copy link
Copy Markdown

An HLS interstitial asset-list request can fail after its ad group has been skipped. The error handler unconditionally calls withAdLoadError(), causing an IllegalArgumentException when attempting the invalid SKIPPED → ERROR transition.

I am only marking the ad as errored if its state remains AD_STATE_UNAVAILABLE. This matches the guard in IMA’s AdTagLoader.markAdGroupInErrorStateAndClearPendingContentPosition(). The original failure still reaches listeners, and subsequent asset-list resolution continues.

I added a deterministic Robolectric regression test that starts an asset-list load, skips the group, then releases an injected IOException. The test verifies that processing the late failure does not crash and the ad remains skipped.

@google-cla

google-cla Bot commented Nov 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kelmer44
kelmer44 marked this pull request as ready for review November 20, 2026 14:58
@kelmer44

kelmer44 commented Dec 1, 2026

Copy link
Copy Markdown
Author

I think this has been done already in 3c710a6 can you confirm @tonihei

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.

1 participant