Xcode 8.3 + fastlane test = failing on test report generation

ios
fastlane
xcode

#1

Hi guys,

After migrating to Xcode 8.3 we get a build error when executing test. We are using fastlane to execute the test with the following config:

test:
  override:
    - bundle exec fastlane test

The tests are executed successfully:

[13:17:15]: ▸ Test Succeeded
+--------------------+-----+
|       Test Results       |
+--------------------+-----+
| Number of tests    | 152 |
| Number of failures | 0   |
+--------------------+-----+

However on fastlane test report generation step just after that we got an error:

[13:17:18]: ------------------------------
[13:17:18]: --- Collecting system logs ---
[13:17:18]: ------------------------------
[13:17:18]: $ xcrun simctl getenv 54458F91-1137-4EE5-A93F-E2735A06F48B SIMULATOR_SHARED_RESOURCES_DIRECTORY 2>/dev/null
[13:17:18]: $ xcrun simctl spawn 54458F91-1137-4EE5-A93F-E2735A06F48B log collect 2>/dev/null
...
[13:17:21]: unknown file type: /Users/distiller/Library/Developer/CoreSimulator/Devices/54458F91-1137-4EE5-A93F-E2735A06F48B/data/system_logs.logarchive/.
...
[13:17:21]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run `fastlane env` to append the fastlane environment to your issue
bundler: failed to load command: fastlane (/Users/distiller/.gem/ruby/2.3.4/bin/fastlane)
RuntimeError: [!] unknown file type: /Users/distiller/Library/Developer/CoreSimulator/Devices/54458F91-1137-4EE5-A93F-E2735A06F48B/data/system_logs.logarchive/.
  /Users/distiller/.rubies/ruby-2.3.4/lib/ruby/2.3.0/fileutils.rb:1388:in `copy'
...

The following configuration was working with Xcode 8.2. When examining the build logs from Xcode 8.2 I see that the following two lines are missing:

[13:17:18]: $ xcrun simctl getenv 54458F91-1137-4EE5-A93F-E2735A06F48B SIMULATOR_SHARED_RESOURCES_DIRECTORY 2>/dev/null
[13:17:18]: $ xcrun simctl spawn 54458F91-1137-4EE5-A93F-E2735A06F48B log collect 2>/dev/null

I appears that fastlane cannot generate the test report because the input file are in /dev/null

So what is your advice on the topic? I don’t really want to disable the tests.


#2

Also having this issue


#3

@btanev were you able to resolve this / get more info?


#4

Hey @MTTHWBSH
This problem is not yet resolved.

I’ve opened a ticket in CircleCI’s support system and CS is thinking that this is a problem in fastlane. I’m waiting for the next fastlane release to validate.

Some snippets from the conversation I had:
Apr 7, 08:14 PDT

Re: fastlane test generation: one of our team members is on the fastlane core team and she has been looking into this today. I think this is a bug in fastlane, but we are not sure yet. We will update you as soon as we have new info on this.

Apr 12, 03:52 PDT

The fix has been merged into master last night.


#5

Thank you for the update!


#6

The latest fastlane version released just today (2.27.0) has the aforementioned fix but did not fix the problem for me. Still fails when attempting to gather system logs after running tests:

+--------------------+-----+
|       Test Results       |
+--------------------+-----+
| Number of tests    | 390 |
| Number of failures | 0   |
+--------------------+-----+

[08:16:08]: ------------------------------
[08:16:08]: --- Collecting system logs ---
[08:16:08]: ------------------------------
[08:16:08]: $ xcrun simctl spawn 43730E6C-D8D2-4DB7-9B0B-318BDEB2333A log collect --output /Users/distiller/myapp/fastlane/test_output/system_logs-iPhone\ 6_iOS_10.3.logarchive 2>/dev/null

[08:16:08]: Exit status: 74

#7

Same as @ndonald2, I’m also getting the Exit status: 74 with the latest (2.27.0) Fastlane.


#8

Same result after updating


#9

Still an issue with Fastlane 2.30.1, any updates on this issue?


#10