Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with permissions using Xcode 11.4 & fastlane to run unit tests #20

Open
sonrohan opened this issue Jul 17, 2020 · 0 comments
Open

Comments

@sonrohan
Copy link

I am having permissions issues while trying to run scan with CircleCI. Any help would be appreciated!

test:
  macos:
    xcode: "11.4"
  working_directory: /Users/distiller/project
  environment:
    FL_OUTPUT_DIR: output
    FASTLANE_LANE: test
  shell: /bin/bash --login -o pipefail
  steps:
    - checkout
    - restore_cache:
        key: 1-gems-{{ checksum "Gemfile.lock" }}
    - run: bundle check || bundle install --path vendor/bundle
    - save_cache:
        key: 1-gems-{{ checksum "Gemfile.lock" }}
        paths:
          - vendor/bundle
    - run:
        name: fastlane
        command: bundle exec fastlane $FASTLANE_LANE
    - store_artifacts:
        path: output
    - store_test_results:
        path: output/scan
Fastfile looks sort of like

platform :ios do
  before_all do
    setup_circle_ci
  end


lane :test do
    workspace = "./PxApple.xcworkspace"

    run_tests(workspace: workspace, output_directory: "./fastlane/test_output", scheme: "PxNetwork")
  end

My Gemfile looks like

# Gemfile
source "https://rubygems.org"
gem 'fastlane'

(Fastlane 2.152.0)

Fastlane Env:

[⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [⠧] 🚀 [⠇] 🚀 [✔] 🚀 
[20:26:39]: Sending anonymous analytics information
[20:26:39]: Learn more at https://docs.fastlane.tools/#metrics
[20:26:39]: No personal or sensitive data is sent.
[20:26:39]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[20:26:39]: Generating fastlane environment output, this might take a few seconds...
<details><summary>🚫 fastlane environment 🚫</summary>

### Stack

| Key                         | Value                                                          |
| --------------------------- | -------------------------------------------------------------- |
| OS                          | 10.15.4                                                        |
| Ruby                        | 2.6.3                                                          |
| Bundler?                    | true                                                           |
| Git                         | git version 2.26.1                                             |
| Installation Source         | ~/project/vendor/bundle/ruby/2.6.0/bin/fastlane                |
| Host                        | Mac OS X 10.15.4 (19E266)                                      |
| 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-11.4.1.app/Contents/Developer/             |
| Xcode Version               | 11.4.1                                                         |


### System Locale

| Error                       |
| --------------------------- |
| No Locale with UTF8 found 🚫 |


### fastlane files:

<details><summary>`./fastlane/Fastfile`</summary>

```ruby
default_platform(:ios)

platform :ios do
  before_all do
    setup_circle_ci
  end

  lane :lint do
    swiftlint(
      mode: :lint,
      config_file: "fastlane/.swiftlint",
      raise_if_swiftlint_error: true,
      ignore_exit_status: false
    )
  end

  lane :correct do
    swiftlint(
      mode: :autocorrect,
      config_file: "fastlane/.swiftlint",
      raise_if_swiftlint_error: true,
      ignore_exit_status: false
    )
  end

  lane :test do
    workspace = "./PxApple.xcworkspace"

    run_tests(workspace: workspace, output_directory: "./fastlane/test_output", scheme: "PxNetwork")
  end

  lane :buildsdkdemoapps do
    codesigning_identity = ""
    skip_package_ipa = "true"
    skip_package_pkg = "true"
    skip_archive = "true"
    workspace = "./PxApple.xcworkspace"

    gym(codesigning_identity: codesigning_identity, skip_archive: skip_archive, skip_package_ipa: skip_package_ipa, skip_package_pkg: skip_package_pkg, skip_codesigning: "true", workspace: workspace, scheme: "Proxy ID")
    gym(codesigning_identity: codesigning_identity, skip_archive: skip_archive, skip_package_ipa: skip_package_ipa, skip_package_pkg: skip_package_pkg, skip_codesigning: "true", workspace: workspace, scheme: "ProxyCheckIn")
  end
end

`./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.152.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
bundler 1.17.2
etc 1.0.1
forwardable 1.2.0
rake 13.0.1
CFPropertyList 3.0.2
public_suffix 4.0.5
addressable 2.7.0
atomos 0.1.3
aws-eventstream 1.1.0
aws-partitions 1.343.0
aws-sigv4 1.2.1
jmespath 1.4.0
aws-sdk-core 3.104.0
aws-sdk-kms 1.36.0
aws-sdk-s3 1.74.0
babosa 1.0.3
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 1.7.10
commander-fastlane 4.4.6
declarative 0.0.20
declarative-option 0.1.0
digest-crc 0.6.1
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.0.0
excon 0.75.0
multipart-post 2.0.0
faraday 0.17.3
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.14.0
fastimage 2.1.7
gh_inspector 1.1.3
jwt 2.2.1
memoist 0.16.2
multi_json 1.15.0
os 1.1.0
signet 0.14.0
googleauth 0.13.0
httpclient 2.8.3
mini_mime 1.0.2
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.38.0
google-cloud-env 1.3.3
google-cloud-errors 1.0.1
google-cloud-core 1.5.0
google-cloud-storage 1.26.2
json 2.3.1
mini_magick 4.10.1
plist 3.5.0
rubyzip 2.3.0
security 0.1.3
naturally 2.2.0
simctl 1.6.8
slack-notifier 2.3.2
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.3.0
xcodeproj 1.17.1
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.0

generated on: 2020-07-17

[20:26:39]: Take notice that this output may contain sensitive information, or simply information that you don't want to make public. [20:26:39]: Open https://github.com/fastlane/fastlane/issues/new to submit a new issue ✅ ```

I am getting this error:

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/project/vendor/bundle/ruby/2.6.0/bin/fastlane)
 
Errno::EPERM: [!] Operation not permitted - //System/Volumes/Data/private/var/db/lockdown

My path: /github/proxyco/px-apple/212/workflows/6e6463af-b7e7-44bc-9abd-03ef63c52e8d/jobs/396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@sonrohan and others