Bug 261916 - media/video-pause-while-seeking.html is a flaky failure.
Summary: media/video-pause-while-seeking.html is a flaky failure.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrique Ocaña
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-21 16:30 PDT by Ben Schwartz
Modified: 2023-11-15 13:36 PST (History)
5 users (show)

See Also:


Attachments
video-pause-while-seeking-pretty-diff.html (10.87 KB, text/html)
2023-11-15 13:35 PST, Ben Schwartz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Schwartz 2023-09-21 16:30:11 PDT
media/video-pause-while-seeking.html

This test is a flaky failure on all platforms.

HISTORY:

https://results.webkit.org/?suite=layout-tests&test=media%2Fvideo-pause-while-seeking.html

TEXT DIFF:

+CONSOLE MESSAGE: Unhandled Promise Rejection: AbortError: The operation was aborted.
 
 Test pause while seeking by:
 
DIFF URL:

https://build.webkit.org/results/Apple-Ventura-Release-AppleSilicon-WK2-Tests/268273@main%20(5054)/media/video-pause-while-seeking-pretty-diff.html

REPRODUCTION:

I was able to reproduce this issue on macOS Ventura (13.5, 22G74/arm64) ToT using the following command:

run-webkit-tests --clobber-old-results --verbose --iterations 500 --exit-after-n-failures 1 --child-processes 10 -f media/video-pause-while-seeking.html

REGRESSION:

As this issue extends past the history shown on the flakiness dashboard, I was unable to bisect a regression point.
Comment 1 Radar WebKit Bug Importer 2023-09-21 16:30:20 PDT
<rdar://problem/115866903>
Comment 2 EWS 2023-09-21 16:38:55 PDT
Test gardening commit 268284@main (562a85017214): <https://commits.webkit.org/268284@main>

Reviewed commits have been landed. Closing PR #18053 and removing active labels.
Comment 3 Enrique Ocaña 2023-09-22 03:11:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18072
Comment 4 Enrique Ocaña 2023-09-22 03:12:02 PDT
I don't have a proper Mac test environment available here right now, but I suspect that the unhandled promise rejection may happen in the promise that the video.play() call returns.

I'm submitting a tentative fix that protects that call with a catch().
Comment 5 Ben Schwartz 2023-11-15 13:35:55 PST
Created attachment 468609 [details]
video-pause-while-seeking-pretty-diff.html

With the pull request above, the issue progresses to the following text diff:

```
 ++ Video started to play, seeking
 
 RUN(video.currentTime = 10)
+EVENT(seeked)
+
+++ Video seeked
+
 
 ++ Pausing video before seek finishes
 
 RUN(video.pause())
-EVENT(seeked)
-
-++ Video seeked
-
 
 ++ Checking if it was actually paused (time not marching on)
```

Attaching pretty diff.