Fastlane scan ends with "Exit status: 149"

We run on CircleCI iOS Unit Tests and even though they are successful, the lane fails with Exit status: 149.

The command we execute is:

scan( workspace: $pathToWorkspaceFileName, scheme: scheme, suppress_xcode_output: false, clean:true, disable_concurrent_testing: true )

If I run it locally, tests are fine. On CI also tests are fine but I get a final Exit status: 149.

The fastlane output is:
[⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [⠧] 🚀 [⠇] 🚀 [⠏] 🚀 [⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [⠧] 🚀 [⠇] 🚀 [⠏] 🚀 [✔] 🚀 [15:28:25]: fastlane detected a Gemfile in the current directory [15:28:25]: However, it seems like you didn't use bundle exec`
[15:28:25]: To launch fastlane faster, please use
[15:28:25]:
[15:28:25]: $ bundle exec fastlane run_all_tests
[15:28:25]:
[15:28:25]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
±---------------------------±--------±--------------------------------------+
| Used plugins |
±---------------------------±--------±--------------------------------------+
| Plugin | Version | Action |
±---------------------------±--------±--------------------------------------+
| fastlane-plugin-versioning | 0.4.4 | get_version_number_from_git_branch |
| | | increment_build_number_in_xcodeproj |
| | | get_version_number_from_plist |
| | | get_build_number_from_plist |
| | | ci_build_number |
| | | get_version_number_from_xcodeproj |
| | | increment_version_number_in_xcodeproj |
| | | increment_version_number_in_plist |
| | | get_app_store_version_number |
| | | get_info_plist_path |
| | | get_build_number_from_xcodeproj |
| | | increment_build_number_in_plist |
±---------------------------±--------±--------------------------------------+

15:28:31: — Step: import_from_git —
15:28:31: -----------------------------
15:28:31: Cloning remote git repo…
15:28:31: ----------------------------------------
15:28:31: — Step: Verifying fastlane version —
15:28:31: ----------------------------------------
15:28:31: Your fastlane version 2.170.0 matches the minimum requirement of 2.134.0 :white_check_mark:
[15:28:32]: ------------------------------
[15:28:32]: — Step: default_platform —
[15:28:32]: ------------------------------
[15:28:32]: Driving the lane ‘ios run_all_tests’ :rocket:
[15:28:32]: -------------------
[15:28:32]: — Step: is_ci —
[15:28:32]: -------------------
[15:28:32]: Oh hello there!! Running on CI.
[15:28:32]: Setting up the circle CI.
[15:28:32]: -----------------------------
[15:28:32]: — Step: setup_circle_ci —
[15:28:32]: -----------------------------
[15:28:32]: Creating temporary keychain: “fastlane_tmp_keychain”.
[15:28:32]: security list-keychains -d user [15:28:32]: ▸ "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db" [15:28:32]: Found keychain '/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db' in list-keychains, adding to search list skipped [15:28:32]: Enabling match readonly mode. [15:28:32]: -------------------------------------------- [15:28:32]: --- Step: Switch to ios pod_install lane --- [15:28:32]: -------------------------------------------- [15:28:32]: Cruising over to lane 'ios pod_install' 🚖 [15:28:32]: Running with bundle exec set to FALSE! [15:28:32]: ----------------------- [15:28:32]: --- Step: cocoapods --- [15:28:32]: ----------------------- [15:28:32]: pod install --silent
[15:28:40]: Pod install success
[15:28:40]: Cruising back to lane ‘ios run_all_tests’ :oncoming_automobile:
[15:28:40]: ------------------
[15:28:40]: — Step: scan —
[15:28:40]: ------------------
[15:28:40]: Resolving Swift Package Manager dependencies…
[15:28:40]: xcodebuild -resolvePackageDependencies -workspace **********************.xcworkspace -scheme ****** [15:28:41]: ▸ Command line invocation: [15:28:41]: ▸ /Applications/Xcode-12.2.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace **********************.xcworkspace -scheme ****** [15:28:44]: ▸ resolved source packages: [15:28:44]: xcodebuild -showBuildSettings -workspace **********************.xcworkspace -scheme ******
[15:28:48]: Found simulator “iPhone 8 (13.7)”

±-----------------------------------------------±---------------------------------------------------------------------------------------------------------+
| Summary for scan 2.170.0 |
±-----------------------------------------------±---------------------------------------------------------------------------------------------------------+
| workspace | .xcworkspace |
| scheme | ****** |
| suppress_xcode_output | false |
| clean | true |
| disable_concurrent_testing | true |
| derived_
_path | /Users/distiller/Library/Developer/Xcode/DerivedData/
****-bkfgnzebodiwimhiuhxqxdyyihzz |
| skip_detect_devices | false |
| force_quit_simulator | false |
| reset_simulator | false |
| disable_slide_to_type | true |
| reinstall_app | false |
| open_report | false |
| output_directory | output/scan |
| output_types | html,junit |
| buildlog_path | output/buildlogs/scan |
| include_simulator_logs | true |
| should_zip_build_products | false |
| result_bundle | false |
| use_clang_report_name | false |
| skip_build | false |
| slack_use_webhook_configured_username_and_icon | false |
| slack_username | fastlane |
| slack_icon_url | https://fastlane.tools/assets/img/fastlane_icon.png |
| skip_slack | false |
| slack_only_on_failure | false |
| xcodebuild_command | env NSUnbufferedIO=YES xcodebuild |
| use_system_scm | false |
| fail_build | true |
| xcode_path | /Applications/Xcode.app |
±-----------------------------------------------±---------------------------------------------------------------------------------------------------------+

[15:28:49]: Disabling ‘Slide to Type’ iPhone 8
[15:28:49]: /usr/libexec/PlistBuddy -c "Add :KeyboardContinuousPathEnabled bool false" /Users/distiller/Library/Developer/CoreSimulator/Devices/3FC630D9-227D-4920-95F2-E547A8C04ECA/****/Library/Preferences/com.apple.keyboard.ContinuousPath.plist >/dev/null 2>&1 [15:28:49]: Booting iPhone 8 [15:28:50]: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace .xcworkspace -scheme ****** -derivedDataPath /Users/distiller/Library/Developer/Xcode/DerivedData/-bkfgnzebodiwimhiuhxqxdyyihzz -destination ‘platform=iOS Simulator,id=3FC630D9-227D-4920-95F2-E547A8C04ECA’ -disable-concurrent-testing clean build test | tee '/iOSApp/output/buildlogs/scan/-.log’ | xcpretty --report html --output '/iOSApp/output/scan/report.html’ --report junit --output '/iOSApp/output/scan/report.junit’ --report junit --output ‘/var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/junit_report20201207-3620-d4ylxr’
[15:28:50]: ▸ Loading…
[15:29:07]: ▸ Clean Succeeded
[15:29:28]: ▸ Running script ‘[CP] Copy XCFrameworks’
[15:35:42]: Running Tests: ▸ Touching .framework (in target 'Pods-
-’ from project ‘Pods’)
[15:35:42]: ▸ Processing Info.plist
[15:35:42]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:35:42]: ▸ Copying ios_core.h
[15:35:42]: ▸ Compiling UITextView.swift
[15:36:02]: Running Tests: ▸ Touching ios_
views.framework (in target 'iosviews’ from project 'ios_views’)
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:36:02]: ▸ Processing Info.plist
[15:36:02]: ▸ Running script ‘[CP] Check Pods Manifest.lock’
[15:38:03]: ▸
[15:38:04]: ▸ 2020-12-07 15:38:04.002 xcodebuild[3721:72834] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[15:38:04]: ▸ /Users/distiller/Library/Developer/Xcode/DerivedData/
-bkfgnzebodiwimhiuhxqxdyyihzz/Logs/Test/Run--2020.12.07_15-28-59-+0000.xcresult/Staging/3_Test/Diagnostics/*****Tests-ABBD47CB-E51E-4F0A-8AF3-8419DF930973/*****Tests-A6CC6708-8805-44CE-922D-BF96DF957728/Session-*****Tests-2020-12-07_153804-GtaXlB.log
[15:38:04]: ▸ 2020-12-07 15:38:04.003 xcodebuild[3721:16015] [MT] IDETestOperationsObserverDebug: (956B345A-74BA-4491-8590-41902DBB194A) Beginning test session ios_feature_squadsTests-956B345A-74BA-4491-8590-41902DBB194A at 2020-12-07 15:38:04.003 with Xcode 12B45b on target <DVTiPhoneSimulator: 0x7fe8d8d0b2b0> {
[15:38:04]: ▸ SimDevice: Clone 1 of iPhone 8 (063EF4C9-461C-41C4-9C57-6C2050835EA7, iOS 13.7, Booted)
[15:38:04]: ▸ } (13.7 (17H22))
[15:38:04]: ▸ 2020-12-07 15:38:04.005 xcodebuild[3721:16015] [MT] IDETestOperationsObserverDebug: (956B345A-74BA-4491-8590-41902DBB194A) Finished requesting crash reports. Continuing with testing.
[15:38:04]: ▸ All tests
[15:38:04]: ▸ Test Suite *****Tests.xctest started
[15:38:04]: ▸ *****Tests
[15:38:04]: ▸ ✓ ***** (0.020 seconds)
[15:38:04]: ▸ ✓ ***** (0.001 seconds)
[15:38:04]: ▸ Executed 28 tests, with 0 failures (0 unexpected) in 0.036 (0.050) seconds
[15:38:04]: ▸
[15:38:04]: ▸ 2020-12-07 15:38:04.657 xcodebuild[3721:72888] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[15:38:04]: ▸ /Users/distiller/Library/Developer/Xcode/DerivedData/
-bkfgnzebodiwimhiuhxqxdyyihzz/Logs/Test/Run--2020.12.07_15-28-59-+0000.xcresult/Staging/3_Test/Diagnostics/-unit-tests-45582602-9D4B-49CE-8155-5BADA4D4F5C9/-unit-tests-512A87E6-7899-4990-8FAD-F4317293B4C8/Session-******************-unit-tests-2020-12-07_153804-B8H4je.log
[15:38:04]: ▸ 2020-12-07 15:38:04.658 xcodebuild[3721:16015] [MT] IDETestOperationsObserverDebug: (F8FE32C4-33A2-4B5D-94F7-67F7915062B3) Beginning test session **********************-unit-tests-F8FE32C4-33A2-4B5D-94F7-67F7915062B3 at 2020-12-07 15:38:04.658 with Xcode 12B45b on target <DVTiPhoneSimulator: 0x7fe8d8d0b2b0> {
[15:38:04]: ▸ SimDevice: Clone 1 of iPhone 8 (063EF4C9-461C-41C4-9C57-6C2050835EA7, iOS 13.7, Booted)
[15:38:04]: ▸ } (13.7 (17H22))
[15:38:04]: ▸ 2020-12-07 15:38:04.663 xcodebuild[3721:16015] [MT] IDETestOperationsObserverDebug: (F8FE32C4-33A2-4B5D-94F7-67F7915062B3) Finished requesting crash reports. Continuing with testing.
[15:38:09]: ▸ All tests
[15:38:09]: ▸ Test Suite **********************-unit-tests.xctest started
[15:38:09]: ▸ *****UnitTest
[15:38:09]: ▸ ✓ ***** (0.005 seconds)
[15:38:09]: ▸ ✓ ***** (0.002 seconds)
[15:38:09]: ▸ Executed 2 tests, with 0 failures (0 unexpected) in 0.007 (0.015) seconds
[15:38:09]: ▸

±-------------------±—+
| Test Results |
±-------------------±—+
| Number of tests | 30 |
| Number of failures | 0 |
±-------------------±—+

15:38:18: — Collecting system logs —
15:38:18: ------------------------------
15:38:18: $ xcrun simctl spawn 3FC630D9-227D-4920-95F2-E547A8C04ECA log collect --start ‘2020-12-07 15:28:48’ --output ************************/iOSApp/output/scan/system_logs-iPhone\ 8_iOS_13.7.logarchive 2>/dev/null

15:38:18: Exit status: 149
[15:38:19]: Unit Tests finished with ERRORS!!!
±---------------------------±---------------------------------------------------------------------------------------------------------+
| Lane Context |
±---------------------------±---------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios run_all_tests |
| KEYCHAIN_PATH | ~/Library/Keychains/fastlane_tmp_keychain |
| ORIGINAL_DEFAULT_KEYCHAIN | “/Users/distiller/Library/Keychains/login.keychain-db” |
| SCAN_DERIVED_DATA_PATH | /Users/distiller/Library/Developer/Xcode/DerivedData/**********************-bkfgnzebodiwimhiuhxqxdyyihzz |
| SCAN_GENERATED_PLIST_FILES | |
| SCAN_GENERATED_PLIST_FILE | |
±---------------------------±---------------------------------------------------------------------------------------------------------+
[15:38:19]: Exit status: 149

±-----±------------------------------------------±------------+
| fastlane summary |
±-----±------------------------------------------±------------+
| Step | Action | Time (in s) |
±-----±------------------------------------------±------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | import_from_git | 1 |
| 4 | is_ci | 0 |
| 5 | setup_circle_ci | 0 |
| 6 | Switch to ios pod_install lane | 0 |
| 7 | cocoapods | 7 |
| :boom: | scan | 578 |
| 9 | Switch to ios version_reset_fallback lane | 0 |
| 10 | Switch to ios post_to_slack_error lane | 0 |
| 11 | Switch to ios get_current_commit_tag lane | 0 |
| 12 | slack | 0 |
±-----±------------------------------------------±------------+

[15:38:19]: fastlane finished with errors

[!] Exit status: 149
[15:38:19]: Shutting down 3FC630D9-227D-4920-95F2-E547A8C04ECA

Exited with code exit status 1
`

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 10.15.5
Ruby 2.7.2
Bundler? false
Git git version 2.29.2
Installation Source ~/.rubies/ruby-2.7.2/bin/fastlane
Host Mac OS X 10.15.5 (19F101)
Ruby Lib Dir ~/.rubies/ruby-2.7.2/lib
OpenSSL Version OpenSSL 1.1.1h 22 Sep 2020
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.2

System Locale

Variable Value
LANG en_GB.UTF-8 :white_check_mark:
LC_ALL en_GB.UTF-8 :white_check_mark:
LANGUAGE
`./fastlane/Appfile`
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address


# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.170.0 :white_check_mark: Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-versioning 0.4.4 :white_check_mark: Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
slack-notifier 2.3.2
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.5.0
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
excon 0.78.0
ruby2_keywords 0.0.2
faraday 1.1.0
faraday_middleware 1.0.0
gh_inspector 1.1.3
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
bundler 2.1.4
uber 0.1.0
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
signet 0.14.0
googleauth 0.14.0
httpclient 2.8.3
google-api-client 0.38.0
jmespath 1.4.0
aws-partitions 1.393.0
aws-eventstream 1.1.0
aws-sigv4 1.2.2
aws-sdk-core 3.109.2
aws-sdk-kms 1.39.0
aws-sdk-s3 1.84.1
uri 0.10.0
nanaimo 0.3.0
colored2 3.1.2
claide 1.0.3
CFPropertyList 3.0.2
atomos 0.1.3
xcodeproj 1.19.0
unicode-display_width 1.7.0
public_suffix 4.0.6
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
babosa 1.0.4
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
fastimage 2.2.0
json 2.3.0
mini_magick 4.11.0
dotenv 2.7.6
naturally 2.2.0
simctl 1.6.8
jwt 2.2.2
declarative 0.0.20
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
rake 13.0.1
digest-crc 0.6.1
google-cloud-errors 1.0.1
google-cloud-env 1.4.0
google-cloud-core 1.5.0
google-cloud-storage 1.29.1
emoji_regex 3.2.1
forwardable 1.3.1
logger 1.4.2
cgi 0.1.0
timeout 0.1.0
stringio 0.1.0
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.2.0
strscan 1.0.3
date 3.0.0
delegate 0.1.0
fileutils 1.4.1
io-console 0.5.6
zlib 1.1.0
singleton 0.1.0
rexml 3.2.3
open3 0.1.0
yaml 0.1.0
psych 3.1.0
mutex_m 0.1.0
webrick 1.6.0
fastlane-plugin-versioning 0.4.4

generated on: 2020-12-07

Thanks everyone for the support in advance!:raised_hands:t4:

We found that this was resolved by the following post: Scan ends with Exit status: 149 on CircleCI · Issue #17753 · fastlane/fastlane · GitHub