fastlane tests crash - access denied on mobile sync dir

Created on 18 Apr 2020  Â·  1Comment  Â·  Source: fastlane/fastlane

New Issue Checklist

Issue Description

Looks like the scan performed cannot access some directory and then it dies. This directory cannot be chmod - permission denied, even with sudo. Any ideas or recommendations? I've searched everywhere without any solution.

|            Lane Context            |
+------------------------+-----------+
| DEFAULT_PLATFORM       | ios       |
| PLATFORM_NAME          | ios       |
| LANE_NAME              | ios tests |
| SCAN_DERIVED_DATA_PATH | /Users    |
+------------------------+-----------+
[11:25:41]: Operation not permitted - /Users/user/Library/Application Support/MobileSync

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 💥   | run_tests        | 53          |
+------+------------------+-------------+

[11:25:41]: fastlane finished with errors


/Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/scan/lib/scan/manager.rb:30:in `[]': Operation not permitted - /Users/user/Library/Application Support/MobileSync (Errno::EPERM)
    29: from /usr/local/bin/fastlane:23:in `<main>'
    28: from /usr/local/bin/fastlane:23:in `load'
    27: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/bin/fastlane:23:in `<top (required)>'
    26: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    25: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    24: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
    23: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    22: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    21: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    20: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    19: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    18: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    17: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    16: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
    15: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
    14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    13: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/lane.rb:33:in `call'
    11: from Fastfile:51:in `block (2 levels) in parsing_binding'
    10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
     9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
     8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
     7: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
     6: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:253:in `block in execute_action'
     5: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
     4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/runner.rb:261:in `block (2 levels) in execute_action'
     3: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/actions/run_tests.rb:39:in `run'
     2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/fastlane/lib/fastlane/actions/run_tests.rb:36:in `ensure in run'
     1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/scan/lib/scan/manager.rb:30:in `test_summary_filenames'
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.145.0/scan/lib/scan/manager.rb:30:in `[]': [!] Operation not permitted - /Users/user/Library/Application Support/Mobile
Command executed

fastlane tests

sudo fastlane tests

Complete output when running fastlane, including the stack trace and command used


 [REPLACE THIS WITH YOUR INFORMATION] 

Environment

✅ fastlane environment ✅

Stack

| Key | Value |
| --------------------------- | -------------------------------------------------------------- |
| OS | 10.15.4 |
| Ruby | 2.6.3 |
| Bundler? | false |
| Git | git version 2.14.1 |
| Installation Source | /usr/local/bin/fastlane |
| Host | Mac OS X 10.15.4 (19E287) |
| Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib |
| OpenSSL Version | LibreSSL 2.8.3 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 11.4.1 |

System Locale

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

fastlane files:

./fastlane/Fastfile

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
  desc "Push a new release build to the App Store"

  lane :release do
    #increment_build_number(xcodeproj: "app.xcodeproj")
    #increment_version_number(
    #   bump_type: "patch",
    #   xcodeproj: "app.xcodeproj"
    #)

    build_app(scheme: "thescheme")
    deliver(
      skip_screenshots: true,
      app_identifier: "com.app",
      #individual_metadata_items: ['name', 'subtitle']
    )
  end

  lane :releasefull do

    build_app(scheme: "thescheme")
    deliver(
      skip_screenshots: false,
      app_identifier: "com.app",
    )
  end

  lane :screenshots do
    capture_screenshots
    upload_to_app_store
  end

  lane :tests do
    run_tests(scheme: "Tests",
            devices: ["iPad Pro (12.9-inch) (3rd generation)"],
            only_testing: ["Tests/PurchaseIdsTests",
        "Tests/PurchasedFeaturesModelTests",
        "Tests/PurchaseCostsTests"])
  end

end

./fastlane/Appfile

app_identifier("com.someapp") # The bundle identifier of your app
apple_id("[email protected]") # Your Apple email address

itc_team_id("1234567") # App Store Connect Team ID
team_id("UmmReally?") # Developer Portal Team ID

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

fastlane gems

| Gem | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.145.0 | ✅ Up-To-Date |

Loaded fastlane plugins:

No plugins Loaded

Loaded gems

| Gem | Version |
| ------------------------- | ------------ |
| did_you_mean | 1.3.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 |
| public_suffix | 2.0.5 |
| addressable | 2.7.0 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| babosa | 1.0.3 |
| colored | 1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.6 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| faraday_middleware | 0.13.1 |
| fastimage | 2.1.7 |
| gh_inspector | 1.1.3 |
| multi_xml | 0.6.0 |
| rubyzip | 1.3.0 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 1.0.0 |
| dotenv | 2.7.5 |
| bundler | 1.17.2 |
| jwt | 2.1.0 |
| emoji_regex | 1.0.1 |
| nanaimo | 0.2.6 |
| colored2 | 3.1.2 |
| claide | 1.0.3 |
| CFPropertyList | 3.0.2 |
| atomos | 0.1.3 |
| xcodeproj | 1.16.0 |
| unicode-display_width | 1.7.0 |
| tty-screen | 0.7.1 |
| tty-cursor | 0.7.1 |
| tty-spinner | 0.9.3 |
| excon | 0.73.0 |
| faraday | 0.17.3 |
| unf_ext | 0.0.7.7 |
| json | 2.3.0 |
| mini_magick | 4.10.1 |
| naturally | 2.2.0 |
| simctl | 1.6.8 |
| httpclient | 2.8.3 |
| multi_json | 1.14.1 |
| signet | 0.14.0 |
| os | 1.1.0 |
| memoist | 0.16.2 |
| googleauth | 0.12.0 |
| mini_mime | 1.0.2 |
| retriable | 3.1.2 |
| declarative-option | 0.1.0 |
| declarative | 0.0.10 |
| uber | 0.1.0 |
| representable | 3.0.4 |
| google-api-client | 0.36.4 |
| digest-crc | 0.5.1 |
| google-cloud-errors | 1.0.0 |
| google-cloud-env | 1.3.1 |
| google-cloud-core | 1.5.0 |
| google-cloud-storage | 1.26.0 |
| aws-eventstream | 1.1.0 |
| aws-sigv4 | 1.1.1 |
| aws-partitions | 1.297.0 |
| jmespath | 1.4.0 |
| aws-sdk-core | 3.94.0 |
| aws-sdk-kms | 1.30.0 |
| aws-sdk-s3 | 1.61.2 |
| forwardable | 1.2.0 |
| logger | 1.3.0 |
| stringio | 0.0.2 |
| ipaddr | 1.2.2 |
| openssl | 2.1.2 |
| ostruct | 0.1.0 |
| strscan | 1.0.0 |
| date | 2.0.0 |
| fileutils | 1.1.0 |
| etc | 1.0.1 |
| io-console | 0.4.7 |
| zlib | 1.0.0 |
| libxml-ruby | 3.1.0 |
| rexml | 3.1.9 |
| psych | 3.1.0 |
| mutex_m | 0.1.0 |
| webrick | 1.4.2 |

generated on: 2020-04-18

Most helpful comment

Fixed via setting the following vars in the lane so it doesn't try to access and modify some weird locations..

buildlog_path: "./fastlane/fastlane-buildlog",
derived_data_path: "~/Library/Developer/Xcode/DerivedData",

>All comments

Fixed via setting the following vars in the lane so it doesn't try to access and modify some weird locations..

buildlog_path: "./fastlane/fastlane-buildlog",
derived_data_path: "~/Library/Developer/Xcode/DerivedData",
Was this page helpful?
0 / 5 - 0 ratings