Issue
I am trying to run integration tests for Web inside gitlab VM.
The VM is running Ubuntu 20.04.3 LTS.
Chromedriver is launched with this command line:
chromedriver -port=4444 --enable-chrome-logs
The error from the chromedriver output is:
[0131/212240.342700:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[0131/212240.347411:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[0131/212241.926360:INFO:CONSOLE(65)] "Installed new service worker.", source: http://localhost:8080/ (65)
[0131/212242.084358:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Using chrome 97 or 97 along with chromedriver 97 or 98 gives the same error.
Flutter integration tests is launch using this command:
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d web-server --headless
InitializeSandbox() called with multiple threads in process is know issue and is fixable using the flag –disable-gpu but until know, i haven’t found any solution to disable gpu from within the Flutter CLI or by configuring the FlutterDriver.
Any idea on how to solve this problem?
thanks
Solution
the –release flag has to be given to the command line.
So the command should look like:
flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d web-server --release
Answered By – Arnaud Delubac
Answer Checked By – Marie Seifert (FlutterFixes Admin)