-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[video_player] Flaky integration test failure on web #130147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ditman FYI |
I'll get this test deflaked ASAP. I remember there was some other time-dependent code in the test that would flake more (this seems... parsing video metadata?), but I'll tackle this soon. |
This might be a bug/race condition on the web implementation (?). At first I thought that "10ms" was too low resolution for a web browser to do anything meaningful with, so I bumped the rewind up to "500ms", but that didn't help; in some cases it seems that:
I need to step through the test case manually and see what's actually happening.
It seems that the video buffering is affecting the results of the test. I'm going to let the video fully play on the web before starting to move the playhead around, to ensure that the buffering is not interfering with the positioning of the playhead (note in the failure above how we'd expect the video to be at 7.544 seconds, but it's actually at 0.974 seconds after playing for 1 second!) Unsure why currentTime is being set at 0. This doesn't happen in vanilla JS (demo). Maybe the seek code on the web is wrong? |
TL;DR: I've looked at the player code and the test a little bit, and there are a few problems with the plugin (that we already know about; my upcoming rant is related to: #90080). The plugin attempts to keep track of the play head position with a Timer that only refreshes every 500ms, but the test is operating in much shorter increments. The web might not fully respect those timeouts for many reasons, but the length of those intervals is probably not the source of issues. There's also a couple of Or "when the user clicks play, if you're in the last frame, rewind to 0": The Third, and possibly the ACTUAL problem, is that the web implementation has a bug where the In any case, I think a proper solution to this is to send the progress updates from the native implementation to the plugin, simplify the event handling coming from the native side to ONLY update the As for why this started failing with us updating the browser, and I haven't verified this, but this change looks sus (and somewhat related to the failing test) |
After this lands, we might try to re-enable the flaky test. I've ran it with the package overridden locally, and it has passed several (8) consecutive attempts. |
FWIW, revamping how video_player works internally so it's less "two sources of truth fighting for dominance" is something I am hoping will be a 2024H1 project. |
Nope, I've just got a failure even with the new code; yikes!
|
### Description This PR changes the initialization of the `video` element used by the web implementation of the video_player plugin to **ensure the `autoplay` attribute is set to _**false**_**, as expected by the code. ### Issues * Fixes flutter/flutter#135194 * ~~May be the root cause of flutter/flutter#130147~~ (it isn't, I've seen the integration test failing again)
This issue is assigned to @ditman but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
Haven't had time to work on this one anymore. I suspect this is hard to fix because we're trying to keep in sync the state of the plugin with the internal state of the player, buuut I haven't rewritten this to verify, so: don't know. |
While converting web platform tests to LUCI, I'm seeing frequent failures in one test:
It wasn't happening in Cirrus, but I could repro it locally in 2/4 runs. Either Cirrus for some reason didn't trip the flake, or the flake only happens in newer versions of Chrome (I believe the LUCI config has a newer Chrome version than our last update to the one pulled in our Cirrus tests).
I'm going to mark this as flaky to unblock the migration.
The text was updated successfully, but these errors were encountered: