This error occurred on Xcode 12 in a fairly empty sample project with only the default unit tests (no code coverage). I was using this project to test my fastlane file and CI/CD setup in Azure DevOps Microsoft hosted Mac agent (10.15)
[07:41:51]: $ slather coverage --sonarqube-xml --build-directory / --output-directory sonar-reports --ignore ../../\* --ignore Pods/\* --ignore \*Sample/\* --ignore \*Tests.m --scheme SampleSwift --workspace SampleSwift.xcworkspace SampleSwift.xcodeproj
[07:41:53]: ▸ Slathering...
[07:43:12]: ▸ /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/project.rb:198:in `[]': Operation not permitted - /System/Volumes/Data/private/var/db/lockdown (Errno::EPERM)
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/project.rb:198:in `profdata_coverage_dir'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/project.rb:498:in `find_binary_files'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/project.rb:437:in `configure_binary_file'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/project.rb:317:in `configure'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/lib/slather/command/coverage_command.rb:59:in `execute'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/gems/slather-2.6.1/bin/slather:17:in `<top (required)>'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/bin/slather:23:in `load'
[07:43:12]: ▸ from /usr/local/lib/ruby/gems/2.7.0/bin/slather:23:in `<main>'
[07:43:12]: ▸ Operation not permitted - /System/Volumes/Data/private/var/db/lockdown
[07:43:12]: ▸ Are you sure your project is generating coverage? Make sure you enable code coverage in the Test section of your Xcode scheme.
[07:43:12]: ▸ Did you specify your Xcode scheme? (--scheme or 'scheme' in .slather.yml)
[07:43:12]: ▸ If you're using a workspace, did you specify it? (--workspace or 'workspace' in .slather.yml)
[07:43:12]: ▸ If you use a different Xcode configuration, did you specify it? (--configuration or 'configuration' in .slather.yml)
+----------------------------+----------+
| Lane Context |
+----------------------------+----------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios test |
| SCAN_DERIVED_DATA_PATH | Build |
| SCAN_GENERATED_PLIST_FILES | [] |
| SCAN_GENERATED_PLIST_FILE | |
+----------------------------+----------+
This error occurred on Xcode 12 in a fairly empty sample project with only the default unit tests (no code coverage). I was using this project to test my fastlane file and CI/CD setup in Azure DevOps Microsoft hosted Mac agent (10.15)
My fastlane lane: