You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running flutter test, the following errors are encountered:
Pending Timer Error
Exception:
═╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════
The following assertion was thrown running a test:
A Timer is still pending even after the widget tree was disposed.
'package:flutter_test/src/binding.dart':
Failed assertion: line 1606 pos 12: '!timersPending'
Possible Cause:
A timer remains active after the widget tree has been disposed.
Late Initialization Error
Exception:
═╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═
The following LateError was thrown while finalizing the widget tree:
LateInitializationError: Field '_videoController@28198544' has not been initialized.
Possible Cause:
The _videoController field is not properly initialized before usage, leading to this error during widget disposal.
Steps to Reproduce the bug/problem
Open the project in a preferred IDE (e.g., VS Code, Android Studio).
Run the command:
flutter test
Expected behavior
The tests should pass successfully without encountering Pending Timer or LateInitializationError issues.
Device Info (The device where you encountered this issue)
OS: Ubuntu 24.04.1 LTS
Additional Notes
I discussed this with a experienced flutter dev and he concluded that the latetimer error is related to the video_player package (version 2.9.3) Not the project Codebase
The late initialization error might indicate that _videoController should be initialized earlier in the widget -lifecycle (e.g., inside initState).
The text was updated successfully, but these errors were encountered:
Describe the bug/problem
When running
flutter test
, the following errors are encountered:Pending Timer Error
A timer remains active after the widget tree has been disposed.
Late Initialization Error
The
_videoController
field is not properly initialized before usage, leading to this error during widget disposal.Steps to Reproduce the bug/problem
flutter test
Expected behavior
The tests should pass successfully without encountering Pending Timer or LateInitializationError issues.
Device Info (The device where you encountered this issue)
Additional Notes
The text was updated successfully, but these errors were encountered: