- Newest
- Most votes
- Most comments
The issue you're experiencing with your Flutter integration tests stopping around the 6-minute mark on AWS Device Farm iOS devices appears to be related to a test execution timeout or a WebDriverAgent session issue.
Looking at your test output, I notice that the tests are running successfully for about 5 minutes and 27 seconds (your last logged test starts at "05:27") before stopping abruptly. The error message "Test runner never began executing tests after launching" suggests that the test runner lost connection with the device or timed out.
There are a few potential causes and solutions to consider:
-
WebDriverAgent Session Issues: Device Farm uses WebDriverAgent for iOS testing, and sometimes it can fail to maintain a session for longer test runs. This is a known issue that has affected other users.
-
Device-Specific Problems: Try changing the iOS device in your device pool. Some users have reported that switching from one iOS device to another (for example, from an iPhone with iOS 16.0.2 to one with iOS 16.6) resolved similar issues.
-
Test Structure: Consider breaking your test suite into smaller chunks. Instead of running all 12 tests in one go, you could split them into multiple test runs with fewer tests each.
-
Appium Configuration: If you're using Appium under the hood, you might need to adjust your configuration. Some users have had success with specific versions of Appium and the XCUITest driver.
-
Test Execution Timeout: While you've set the
-maximum-test-execution-time-allowanceparameter to 2400 seconds, there might be another timeout at play. The execution timeout for Device Farm should be set to the maximum duration of your test run plus some buffer (e.g., if your tests take 20 minutes, set a timeout of 30 minutes).
Try these approaches to resolve the issue, with changing the iOS device being potentially the quickest solution to test.
Sources
Setting the execution timeout for test runs in AWS Device Farm - AWS Device Farm
Device farm (iOS) run failure - Unable to start WebDriverAgent session because of xcodebuild failure | AWS re:Post
answered 10 months ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 years ago
- AWS OFFICIALUpdated 4 years ago

I have tried running with different iOS devices but with the same result. Tests still stop running around the 6 minute mark. I'd like to avoid having to break down the tests into smaller chunks since I want to run these tests on CI and it would require more computing time to rebuild the app for each different test chunk.