Skip to content

[video_player] Flaky integration test failure on web #130147

Open

Description

@stuartmorgan-g

While converting web platform tests to LUCI, I'm seeing frequent failures in one test:

Failure in method: stay paused when seeking after video completed
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following TestFailure was thrown running a test:
Expected: Duration:<0:00:07.534000>
  Actual: Duration:<0:00:07.544000>

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:49  throw_
packages/matcher/src/expect/prints_matcher.dart.js 433:22                     fail
packages/matcher/src/expect/prints_matcher.dart.js 430:12                     _expect
packages/matcher/src/expect/prints_matcher.dart.js 365:12                     expect$
packages/flutter_test/src/test_text_input_key_handler.dart.js 7284:12         expect$
video_player_test.dart.js 257:23                                              <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
...

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.

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    platform-webWeb applications specifically
    packageflutter/packages repository. See also p: labels.
    c: flakeTests that sometimes, but not always, incorrectly pass
    fyi-ecosystemFor the attention of Ecosystem team
    team-webOwned by Web platform team
    on Jul 7, 2023
  2. stuartmorgan-g commented on Jul 7, 2023

    @stuartmorgan-g
    ContributorAuthor
  3. self-assigned this
    on Jul 8, 2023
  4. ditman commented on Jul 8, 2023

    @ditman
    Member

    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.

  5. added
    P2Important issues not at the top of the work list
    on Jul 8, 2023
  6. 5 remaining items

  7. stuartmorgan-g commented on Sep 21, 2023

    @stuartmorgan-g
    ContributorAuthor

    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.

  8. ditman commented on Sep 21, 2023

    @ditman
    Member

    I think we're going to be able to close this with only the fix to the autoplay issue on the web, so I guess we're going to be fine until then (but yeah the added complexity is super frustrating when debugging!)

    Nope, I've just got a failure even with the new code; yikes!

    Failure Details:
    Failure in method: stay paused when seeking after video completed
    ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
    The following TestFailure was thrown running a test:
    Expected: Duration:<0:00:07.534000>
      Actual: Duration:<0:00:07.544000>
    
    When the exception was thrown, this was the stack:
    dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:49  throw_
    packages/matcher/src/expect/prints_matcher.dart.js 436:22                     fail
    packages/matcher/src/expect/prints_matcher.dart.js 433:12                     _expect
    packages/matcher/src/expect/prints_matcher.dart.js 368:12                     expect$
    packages/flutter_test/src/test_text_input_key_handler.dart.js 9367:12         expect$
    video_player_test.dart.js 259:23                                              <fn>
    dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
    dart-sdk/lib/async/zone.dart 1407:47                                          _rootRunUnary
    dart-sdk/lib/async/zone.dart 1308:19                                          runUnary
    dart-sdk/lib/async/future_impl.dart 162:18                                    handleValue
    dart-sdk/lib/async/future_impl.dart 846:44                                    handleValueCallback
    dart-sdk/lib/async/future_impl.dart 875:13                                    _propagateToListeners
    dart-sdk/lib/async/future_impl.dart 647:5                                     [_completeWithValue]
    dart-sdk/lib/async/future_impl.dart 721:7                                     <fn>
    dart-sdk/lib/async/zone.dart 1399:13                                          _rootRun
    dart-sdk/lib/async/zone.dart 1301:19                                          run
    dart-sdk/lib/async/zone.dart 1209:7                                           runGuarded
    dart-sdk/lib/async/zone.dart 1249:23                                          callback
    dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
    dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
    dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:15           <fn>
    
    The test description was:
      stay paused when seeking after video completed
    ═════════════════════════════════════════════════════════════════
    
    end of failure 1
    
  9. flutter-triage-bot commented on Feb 8, 2024

    @flutter-triage-bot

    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!

  10. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Feb 8, 2024
  11. removed their assignment
    on Feb 8, 2024
  12. ditman commented on Feb 8, 2024

    @ditman
    Member

    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.

  13. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions