Running Flutter Web integration tests inside gitlab (probably github too) Ubuntu VM fails because of Chromedriver


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/] InitializeSandbox() called with multiple threads in process gpu-process.
[0131/] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[0131/212241.926360:INFO:CONSOLE(65)] "Installed new service worker.", source: http://localhost:8080/ (65)
[0131/] 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?


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)

Leave a Reply

Your email address will not be published. Required fields are marked *