Flutter Integration Step in Build Pipeline Failing #11117
Labels
e2-days
Effort: < 5 days
from.page-issue
Reported in a reader-filed concern
p2-medium
Necessary but not urgent concern. Resolve when possible.
Page URL
https://docs.flutter.dev/testing/integration-tests/
Page source
https://github.com/flutter/website/tree/main/src/content/testing/integration-tests/index.md
Describe the problem
Hi Team,
I'm encountering issues with the integration step in our build pipeline for Flutter applications, which has been running smoothly for the past few months but has recently stopped working. Below is the relevant configuration and script details:
Build Pipeline Configuration:
displayName: Integration Tests
condition: eq(${{parameters.runTests}}, True)
inputs:
scriptPath: 'distribution/ado/test_container/run-integration-tests.sh'
disableAutoCwd: true
ChromeDriver Installation Script:
#!/bin/bash
set -e
Fetch the latest stable ChromeDriver version
CHROMEDRIVER_VERSION=$(curl -sS https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE)
echo "Installing ChromeDriver version: $CHROMEDRIVER_VERSION"
CHROMEDRIVER_DIR=/usr/local/bin
Download and install ChromeDriver (for versions 115 and newer)
npx @puppeteer/browsers install chromedriver@$CHROMEDRIVER_VERSION
cp chromedriver/mac-$CHROMEDRIVER_VERSION/chromedriver-mac-x64/chromedriver $CHROMEDRIVER_DIR/.
chmod 755 $CHROMEDRIVER_DIR/chromedriver
rm -rf chromedriver/
echo "ChromeDriver installed successfully."
Integration Test Runner Script:
#!/bin/bash
set -e
Install ChromeDriver
sh ./distribution/ado/test_container/install-chrome-driver.sh
Launch ChromeDriver
chromedriver --port=4444 &
CHDR_PID=$!
directoriesToRunTests=("applications")
for directory in "${directoriesToRunTests[@]}"
do
cd "$directory"
for subDirectory in */
do
cd "$subDirectory"
done
cd ..
done
kill $CHDR_PID
Error Logs:
integration_test/daily_deals_test.dart is being served at http://localhost:49327
Unhandled exception:
DriverError: Error while reading FlutterDriver result for command: window.$flutterDriver('{"command":"request_data","timeout":"1200000"}')
Original error: Exception: Expected: not null
Actual:
...
The STDIO streams did not close within 10 seconds of the exit event from process '/bin/bash'. This may indicate a child process inherited the STDIO streams and has not yet exited.
##[error]Bash exited with code '1'.
Finishing: Run Integration test for the changes
The integration tests were working fine until recently. Now, I’m seeing the DriverError and STDIO streams did not close within 10 seconds errors, causing the pipeline to fail. Could you please advise on the best way to resolve this issue?
There is similar issue open - flutter/flutter#148982
Any insights or suggestions would be greatly appreciated asap.
Expected fix
No response
Additional context
No response
I would like to fix this problem.
The text was updated successfully, but these errors were encountered: