Scan execution stuck for 10 minutes after finishing running tests
Author: 0xLucasMarcalCreated Aug 14, 2023Updated Sep 17, 2026
Labelstool: scan
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
While running tests on CI, we started getting some weird overall time on a few jobs.
Taking a look at the console output I've noticed that after finishing running tests with scan, the execution was stuck for 10 minutes before finishing the job.
Command executed
fastlane scan --project *** --scheme *** --testplan *** --deployment_target_version 16.4 --device *** --derived_data_path *** --output_types 'junit' --output_directory '.' --output_files '***-junit.xml' --cloned_source_packages_path /***/PackageSources --number_of_retries 3 --xcargs 'CODE_SIGNING_ALLOWED=NO DEBUG_INFORMATION_FORMAT=dwarf SWIFT_USE_INTEGRATED_DRIVER=NO -skipPackagePluginValidation -skipPackageUpdates' -concurrent_workers 3 -max_concurrent_simulators 3 --ensure_devices_found true --prelaunch_simulator true --parallel_testing trueComplete output when running fastlane, including the stack trace and command used
[2023-08-14T19:30:17.810Z] [19:30:17]: ▸ [35m [32m✔[0m test_TOSViewed_noBrandToken_eventIsNotLogged on 'Clone 1 of jenkins-test-B2BC5C96-D2FD-4C41-AB61-61175AEB5897 - xctest (16241)' (0.015 seconds)[0m
[2023-08-14T19:30:17.810Z] [19:30:17]: ▸ [35m [32m✔[0m test_TOSViewed_nonBlocking_eventIsLoggedCorrectly on 'Clone 1 of jenkins-test-B2BC5C96-D2FD-4C41-AB61-61175AEB5897 - xctest (16241)' (0.011 seconds)[0m
[2023-08-14T19:40:09.568Z] [19:40:03]: ▸ [35m2023-08-14 19:40:03.813 xcodebuild[12338:68673] [MT] IDETestOperationsObserverDebug: 641.717 elapsed -- Testing started completed.[0m
[2023-08-14T19:40:09.568Z] [19:40:03]: ▸ [35m2023-08-14 19:40:03.813 xcodebuild[12338:68673] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start[0m
[2023-08-14T19:40:09.568Z] [19:40:03]: ▸ [35m2023-08-14 19:40:03.813 xcodebuild[12338:68673] [MT] IDETestOperationsObserverDebug: 641.717 sec, +641.717 sec -- end[0m
[2023-08-14T19:40:09.568Z] [19:40:05]: ▸ [35m[32;1mTest Succeeded[0m
[2023-08-14T19:40:11.461Z] +-------------------------+------+
[2023-08-14T19:40:11.554Z] | Test Results |
[2023-08-14T19:40:11.555Z] +-------------------------+------+
[2023-08-14T19:40:11.555Z] | Number of tests | 1275 |
[2023-08-14T19:40:11.555Z] | Number of tests skipped | 3 |
[2023-08-14T19:40:11.555Z] | Number of failures | [32m0[0m |
[2023-08-14T19:40:11.555Z] +-------------------------+------+
[2023-08-14T19:40:11.555Z]
[2023-08-14T19:40:11.555Z]
[2023-08-14T19:40:11.555Z] #######################################################################
[2023-08-14T19:40:11.555Z] # fastlane 2.214.0 is available. You are on 2.213.0.
[2023-08-14T19:40:11.555Z] # You should use the latest version.
[2023-08-14T19:40:11.555Z] # Please update using `gem install fastlane`.
[2023-08-14T19:40:11.555Z] #######################################################################
[2023-08-14T19:40:11.555Z] # Run `gem cleanup` from time to time to speed up fastlane
[2023-08-14T19:40:11.555Z] #######################################################################
[2023-08-14T19:40:12.460Z] Archiving artifacts
[2023-08-14T19:40:12.873Z] Recording test results Environment
[REPLACE THIS WITH YOUR INFORMATION] Source: fastlane/fastlane