iOS fastlane build fails with useModernBuildSystem=YES

I’ve got an XCode 12.2.1 project that fails to build using Fastlane on the tests target. It fails during the build when it’s meant to build the Image.xcassets or asset tags, my image is the following:

Build-agent version 1.0.23380-924dbe3d (2020-01-10T17:38:51+0000)
Creating a dedicated VM with xcode:11.2.1 image

Before the testing starts this is the environment:

xcodebuild -showBuildSettings -workspace ./MyApp.xcworkspace -scheme MyAppTests

+------------------------------------------------+---------------------------------------------------------------------------------------------+
|                                                           Summary for scan 2.135.2                                                           |
+------------------------------------------------+---------------------------------------------------------------------------------------------+
| scheme                                         | MyAppTests                                                                              |
| output_directory                               | ../TestOutput/                                                                              |
| workspace                                      | ./MyApp.xcworkspace                                                                     |
| derived_data_path                              | /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-bmavbfsvufomjudfjceqoqiieqpf |
| device                                         | iPhone 8                                                                                    |
| skip_detect_devices                            | false                                                                                       |
| force_quit_simulator                           | false                                                                                       |
| reset_simulator                                | false                                                                                       |
| reinstall_app                                  | false                                                                                       |
| clean                                          | false                                                                                       |
| open_report                                    | false                                                                                       |
| 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                                                                                       |
| disable_concurrent_testing                     | false                                                                                       |
| skip_build                                     | false                                                                                       |
| slack_use_webhook_configured_username_and_icon | false                                                                                       |
| slack_username                                 | fastlane                                                                                    |

After the build starts it fails after a while with the following:

[21:23:01]: $ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace ./MyApp.xcworkspace -scheme MyAppTests -destination 'platform=iOS Simulator,id=37ADC6A3-2460-40D2-84D7-25A6AF1B6CBD' -derivedDataPath '/Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-bmavbfsvufomjudfjceqoqiieqpf' build test | tee '/Users/distiller/project/MyApp/output/buildlogs/scan/MyAppTests-MyAppTests.log' | xcpretty  --report html --output '/Users/distiller/project/TestOutput/report.html' --report junit --output '/Users/distiller/project/TestOutput/report.junit' --report junit --output '/var/folders/z7/8rr0l_45719dk91y30bbhvw40000gn/T/junit_report20200113-2521-2gleeg' 
[21:23:01]: ▸ Loading...
[21:23:09]: ▸ 2020-01-13 21:23:09.364 xcodebuild[2613:16579] Requested but did not find extension point with identifier Xcode.IBBuildSupport.AssetCatalog.AssetTagScanner
[21:23:10]: ▸ ❌  error: failed to read asset tags: unexpected error generating result tags (in target 'MyApp' from project 'MyApp')
[21:23:10]: ▸ ** BUILD FAILED **
[21:23:14]: ▸ ❌  error: failed to read asset tags: unexpected error generating result tags (in target 'MyApp' from project 'MyApp')
[21:23:14]: ▸ Testing failed:
[21:23:14]: ▸ 	failed to read asset tags: unexpected error generating result tags
[21:23:14]: ▸ 	Testing cancelled because the build failed.
[21:23:14]: ▸ ** TEST FAILED **
2020-01-13 21:23:09.364 xcodebuild[2613:16579] Requested but did not find extension point with identifier Xcode.IBBuildSupport.AssetCatalog.AssetTagScanner

❌  error: failed to read asset tags: unexpected error generating result tags (in target 'MyApp' from project 'MyApp')

The tests run normally and succesfully when I run it in my local environment, I’ve made sure that I have the same versions of fastlane in the CI image and on my local machine 2.134.0.

After a bit of searching I can get the tests to run if I setup my fast file with `-UseModerBuildSystem=NO’,

lane :tests do
      run_tests(
          scheme: "MyAppTests",
          output_directory: '../TestOutput/',
          xcargs: '-UseModernBuildSystem=NO'
      )
  end

Is there a way to run it without using the legacy build system?, I’m happy to provide more information to help debug the issue.

1 Like

This was happening with a unchecked *.xcasset directory that was not carried over when switching branches.

@triztain did you resolve the issue?

I am also facing same issue on Xcode Jenkins setup.
Requested but did not find extension point with identifier Xcode.IBBuildSupport.AssetCatalog.AssetTagScanner 13:45:26 error: failed to read asset tags: unexpected error generating result tags (in target from project )