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
{{ message }}
Repository navigation
flutter_tester --non-interactive should never call beginFrame/drawFrame #178
Running the tests directly, as opposed to through the test harness, you get exceptions because the animation code is getting called from beginFrame() which is being called from the engine directly with a different clock time than the fake clock the test is trying to run the system with.
I've temporarily worked around this in some of the tests by disconnecting the binding's hook into the engine, but that's not a good long-term solution.
@chinmaygarde Looks like the engine is still canning window.onBeginFrame during headless flutter test.
To check, I edited packages/flutter_test/lib/src/binding.dart; in the initInstances method of the AutomatedTestWidgetsFlutterBinding class, I changed the last line to:
ui.window.onBeginFrame = (Duration timestamp) { print('engine called onBeginFrame!'); };
Then I ran flutter test in the flutter_test directory, and observed that it calls that print statement. By checking the stack trace that that closure gets called with (using debugPrintStack) I verified that it is coming from calls to _beginFrame.
changed the title [-]sky_shell --non-interactive should never call beginFrame[/-][+]flutter_tester --non-interactive should never call beginFrame[/+]on May 30, 2017
changed the title [-]flutter_tester --non-interactive should never call beginFrame[/-][+]flutter_tester --non-interactive should never call beginFrame/drawFrame[/+]on May 30, 2017
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Hixie commentedon Nov 23, 2015
I've temporarily worked around this in some of the tests by disconnecting the binding's hook into the engine, but that's not a good long-term solution.
Hixie commentedon Dec 9, 2016
@chinmaygarde This bug may be of interest to you. Happy to chat about it if you want.
chinmaygarde commentedon Dec 9, 2016
BeginFrameshould only be called if a frame is actually requested. If not, this is likely a bug in the engine. I will can verify it tomorrow.Hixie commentedon Dec 9, 2016
Oh, cool. I may be able to simplify the test harness then. (This bug is old, it may have changed since I filed it.)
Hixie commentedon Jan 24, 2017
@chinmaygarde Looks like the engine is still canning window.onBeginFrame during headless
flutter test.To check, I edited
packages/flutter_test/lib/src/binding.dart; in theinitInstancesmethod of theAutomatedTestWidgetsFlutterBindingclass, I changed the last line to:Then I ran
flutter testin theflutter_testdirectory, and observed that it calls that print statement. By checking the stack trace that that closure gets called with (usingdebugPrintStack) I verified that it is coming from calls to_beginFrame.[-]sky_shell --non-interactive should never call beginFrame[/-][+]flutter_tester --non-interactive should never call beginFrame[/+][-]flutter_tester --non-interactive should never call beginFrame[/-][+]flutter_tester --non-interactive should never call beginFrame/drawFrame[/+]Hixie commentedon May 30, 2017
We have decided we're fine with the current situation either way.
Turn icf on for all android builds (flutter#178)
github-actions commentedon Aug 8, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.