fastlane: Skip Xcodebuild "Finished requesting crash reports. Continuing with testing."

Question Checklist

Question Subject

Skip requesting crash reports from Apple when running tests with Gym (or at least, have an option to do so).

Question Description

I’m running a CI machine with the Xcode.

The tests are triggered using fastlane gym. I see this line in the output:

2019-05-27 16:04:28.417 xcodebuild[54605:1482269] [MT] IDETestOperationsObserverDebug: (A72DBEA3-D13E-487E-9D04-5600243FF617) Finished requesting crash reports. Continuing with testing.

This operation takes some time (about a minute) to complete. As far, as I understand, the Xcode requests crash reports from Apple to show in the “Organizer” window.

Since this is a CI machine, the crash reports will never be viewed on it and this step could be skipped completely how can I skip it?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 29 (2 by maintainers)

Most upvoted comments

Still

Sent with GitHawk

Have the same situation: XCUITest + parallel running + Xcode 10.2.1 Stucks on “Finished requesting crash reports. Continuing with testing.”

These timeouts eat up any gains from parallelising tests to begin with.

I have the same situation when try to run iOS XCUITest. The scheme have “Execute in parallel on Simulator”.

When I run tests with faslane they hang with these logs:

[10:36:34]: Running Tests: ▸ Touching oneAppUITests.xctest (in target: oneAppUITests) [10:36:35]: ▸ 2019-09-03 10:36:35.825 xcodebuild[6686:67746] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: [10:36:35]: ▸ /Users/userName/Library/Developer/Xcode/DerivedData/oneApp-drdvtlzcamctnjaceoefmlfsqfbp/Logs/Test/Run-oneApp-2019.09.03_10-30-35-+0300.xcresult/3_Test/Diagnostics/oneAppUITests-C89C9D84-18CC-4C4F-AEE5-ECDA5DD6412C/oneAppUITests-464B4A8A-5C1E-4632-92D5-F8FE18DE5544/Session-oneAppUITests-2019-09-03_103635-BFGgm3.log [10:36:35]: ▸ 2019-09-03 10:36:35.825 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (6E115D89-F465-45A5-B298-60B247FE7B06) Beginning test session oneAppUITests-6E115D89-F465-45A5-B298-60B247FE7B06 at 2019-09-03 10:36:35.825 with Xcode 10E1001 on target <DVTiPhoneSimulator: 0x7f86fba81030> { [10:36:35]: ▸ SimDevice: Clone 1 of iPhone X (14753175-B882-4EA6-87D8-1A7A56ABF959, iOS 12.2, Shutdown) [10:36:35]: ▸ } (12.2 (16E226)) [10:36:49]: ▸ 2019-09-03 10:36:49.400 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (6E115D89-F465-45A5-B298-60B247FE7B06) Finished requesting crash reports. Continuing with testing. [10:36:54]: ▸ 2019-09-03 10:36:54.568 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (ECBCDD1C-3DE8-48C1-A29A-97037B539885) Beginning test session oneAppUITests-ECBCDD1C-3DE8-48C1-A29A-97037B539885 at 2019-09-03 10:36:54.569 with Xcode 10E1001 on target <DVTiPhoneSimulator: 0x7f86f5af4170> { [10:36:54]: ▸ SimDevice: Clone 2 of iPhone X (15A41C4F-4BF9-4577-8CFA-FDD3C2FBE008, iOS 12.2, Shutdown) [10:36:54]: ▸ } (12.2 (16E226)) [10:36:54]: ▸ 2019-09-03 10:36:54.569 xcodebuild[6686:67806] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: [10:36:54]: ▸ /Users/userName/Library/Developer/Xcode/DerivedData/oneApp-drdvtlzcamctnjaceoefmlfsqfbp/Logs/Test/Run-oneApp-2019.09.03_10-30-35-+0300.xcresult/3_Test/Diagnostics/oneAppUITests-C89C9D84-18CC-4C4F-AEE5-ECDA5DD6412C/oneAppUITests-D7E29188-9F98-4FBD-875F-2468C948F59E/Session-oneAppUITests-2019-09-03_103654-Xs6HZG.log [10:36:54]: ▸ 2019-09-03 10:36:54.754 xcodebuild[6686:68887] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: [10:36:54]: ▸ /Users/userName/Library/Developer/Xcode/DerivedData/oneApp-drdvtlzcamctnjaceoefmlfsqfbp/Logs/Test/Run-oneApp-2019.09.03_10-30-35-+0300.xcresult/3_Test/Diagnostics/oneAppUITests-C89C9D84-18CC-4C4F-AEE5-ECDA5DD6412C/oneAppUITests-9EBB97B0-507F-44A6-A71C-3D689A0D8E69/Session-oneAppUITests-2019-09-03_103654-dBUiaV.log [10:36:54]: ▸ 2019-09-03 10:36:54.754 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (72E5669E-0869-458A-B9CE-4159AFEA903E) Beginning test session oneAppUITests-72E5669E-0869-458A-B9CE-4159AFEA903E at 2019-09-03 10:36:54.755 with Xcode 10E1001 on target <DVTiPhoneSimulator: 0x7f86fbc0bf40> { [10:36:54]: ▸ SimDevice: Clone 3 of iPhone X (341B57AC-0FD2-4303-9D27-AA244A4373DD, iOS 12.2, Shutdown) [10:36:54]: ▸ } (12.2 (16E226)) [10:38:35]: ▸ 2019-09-03 10:38:35.962 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (ECBCDD1C-3DE8-48C1-A29A-97037B539885) Finished requesting crash reports. Continuing with testing. [10:38:36]: ▸ 2019-09-03 10:38:36.076 xcodebuild[6686:49333] [MT] IDETestOperationsObserverDebug: (72E5669E-0869-458A-B9CE-4159AFEA903E) Finished requesting crash reports. Continuing with testing.

✅ fastlane environment ✅

Stack

Key Value
OS 10.14.6
Ruby 2.2.4
Bundler? false
Git git version 2.20.1 (Apple Git-117)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.14.6 (18G95)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 10.2.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

`./fastlane/Fastfile`
default_platform :ios

platform :ios do
  before_all do
    setup_circle_ci
  end

  desc "Upload to TestFlight"
  lane :beta do
    increment_build_number
    match(type: "appstore")
    gym(export_method: "app-store")
    upload_to_testflight
  end

  desc "Runs all the tests"
  lane :test do
    begin
      scan(scheme: "oneApp")
    rescue => ex
       puts ex
       raise ex
    end
  end

  desc "Create xctestrun file"
  lane :build_for_testing do
    scan(
    clean: true,
    derived_data_path:"~/build_for_testing",
    buildlog_path:"~/build_for_testing/ops123",
    include_simulator_logs: false,
    build_for_testing: true)
  end

  desc "Ad-hoc build"
  lane :adhoc do
    match(type: "adhoc")
    gym(export_method: "ad-hoc")
  end
end

`./fastlane/Appfile`
app_identifier "org.consumerreports.Ratings" # The bundle identifier of your app
apple_id "itmobile@cr.consumer.org" # Your Apple email address

team_id "9TWW27LPR6" # Developer Portal Team ID

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

fastlane gems

Gem Version Update-Status
fastlane 2.130.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 2.3.2
atomos 0.1.3
CFPropertyList 2.3.5
claide 1.0.3
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.12.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.1.3
terminal-table 1.7.3
plist 3.2.0
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.7.0
tty-cursor 0.7.0
tty-spinner 0.9.1
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.6
excon 0.55.0
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.1.3
json 1.8.1
mini_magick 4.9.5
multi_xml 0.6.0
rubyzip 1.2.3
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.0
bundler 1.14.6
faraday_middleware 0.11.0.1
naturally 2.2.0
simctl 1.6.5
jwt 2.1.0
uber 0.0.15
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
multi_json 1.12.1
signet 0.11.0
memoist 0.16.0
os 0.9.6
googleauth 0.6.7
httpclient 2.8.3
google-api-client 0.23.9
google-cloud-env 1.2.1
google-cloud-core 1.3.1
digest-crc 0.4.1
google-cloud-storage 1.16.0
emoji_regex 1.0.1
libxml-ruby 3.0.0
psych 2.0.8

generated on: 2019-09-03

+1

This step causes our CI server to pause for 2-10 minutes on every run. It’s super-annoying.

I am not aware of an existing way to do this. If xcodebuild somehow supports this, we could of course trivially implement this in fastlane as a new option.

Related: https://stackoverflow.com/questions/56326847/xcodebuild-skip-finished-requesting-crash-reports-continuing-with-testing