Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan execution stuck for 10 minutes after finishing running tests #21461

Open
3 of 4 tasks
lucasmarcal-faire opened this issue Aug 14, 2023 · 9 comments
Open
3 of 4 tasks

Comments

@lucasmarcal-faire
Copy link

lucasmarcal-faire commented Aug 14, 2023

New Issue Checklist

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.

Screenshot 2023-08-14 at 17 09 01

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 true
Complete 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] 
@lucasmarcal-faire lucasmarcal-faire changed the title Scan execution hangs for 10 minutes after finishing running tests Scan execution stuck for 10 minutes after finishing running tests Aug 14, 2023
@Eunicegrath
Copy link

Eunicegrath commented Aug 23, 2023

Hello,

After completing tests with 'fastlane scan', the job stalled for 10 minutes before concluding. The command includes various parameters like test plan, device, and concurrent workers. To troubleshoot, investigate Mayo Clinic Portal potential issues in the post-test phase, considering concurrency settings, simulator availability, and any blocking processes affecting the job's completion.

@samwyndham
Copy link

This also affects our iOS simultor builds although for us we also also have an additional message displayed after the final test run:

IDETestOperationsObserverDebug: Failure collecting diagnostics from simulator: Timed out after 600.0 seconds while waiting for a response from the invoked process

@Losiowaty
Copy link

Losiowaty commented Oct 6, 2023

I'm seeing the same when running scan with code_coverage: true - without it, it works fine.

Locally it will hang, but eventually continue after a couple minutes. [Edit: Scratch that - now local build also hangs "indefinitely"]
On BitRise it seems to hang indefinitely :/

I'm on latest fastlane - 2.216.0.

Local machine : macOS 13.6, Xcode 14.3
BitRise machine : macOS 13.2, Xcode 14.3

@nicholaslythall
Copy link

I'm experiencing something similar on Github actions, running fastlane version 2.210.1.
After compiling the tests and starting the tests, fastlane appears to hang for ~10 minutes before the tests actually start running.
image

@iDylanK
Copy link

iDylanK commented Nov 2, 2023

We are facing the exact same issue on our Azure pipelines. Any updates?

@rogermedibank
Copy link

rogermedibank commented Nov 22, 2023

I am facing the exac same issue on Github macOS runner. Any updates?
However, on a self hosted runner, it's working fine.

Is it sth to do with the tools version?

@aduuub
Copy link

aduuub commented Jan 5, 2024

We are also experiencing this issue on our self hosted runners.

Fastlane 2.213.0
Xcode 14.3.1

@KamilSolarek
Copy link

Having same issue when building for Xcode 15. Small delay for local building (Apple Silicon) but for Azure Builds (Intel) takes at least 10 minutes

@pblondin
Copy link

I'm having the exact same issue on our Jenkins CI. I've try playing around with bunch of the scan options, but with no luck.

prelaunch_simulator: true,
force_quit_simulator: true,
reinstall_app: true,

The app compiles properly, it runs our tests (in my case UI tests), but it ultimately hangs and return an Error 65 after a timeout.

** TEST FAILED **
[03:05:38]: Exit status: 65
+--------------------------+
|       Test Results       |
+--------------------+-----+
| Number of tests    | 108 |
| Number of failures | 108 |
+--------------------+-----+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests