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

Spaceship: permission denied after correct login. #7794

Closed
2 tasks done
PiotrOlszewski opened this issue Jan 10, 2017 · 6 comments
Closed
2 tasks done

Spaceship: permission denied after correct login. #7794

PiotrOlszewski opened this issue Jan 10, 2017 · 6 comments

Comments

@PiotrOlszewski
Copy link

PiotrOlszewski commented Jan 10, 2017

New Issue Checklist

Issue Description

Issue started after migrating from updating to newest fastlane.
Scenario:
"fastlane beta"

output below Fastfile.
Any ideas?

[09:58:40]: Login to iTunes Connect (***)
Two Factor Authentication for account '****' is enabled
If you're running this in a non-interactive session (e.g. server or CI)
check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
Requesting session...

->> Running fastlane spaceauth -u *** generates another issue:

/Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/spaceauth_runner.rb:25:in `rescue in run': [!] uninitialized constant Spaceship::SpaceauthRunner::UI (NameError)
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/spaceauth_runner.rb:14:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/commands_generator.rb:40:in `block (2 levels) in run'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:178:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:178:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:153:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/runner.rb:444:in `run_active_command'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/delegates.rb:15:in `run!'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/commands_generator.rb:46:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/commands_generator.rb:12:in `start'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/cli_tools_distributor.rb:45:in `take_off'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/bin/fastlane:15:in `<top (required)>'
        from /usr/local/bin/fastlane:23:in `load'
        from /usr/local/bin/fastlane:23:in `<main>'


## Fastfile:

ENV["FASTLANE_ITC_TEAM_ID"] = "MyTeamId"
fastlane_version "1.85.0"
ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = "MyAppPass"

default_platform :ios

platform :ios do
  before_all do
    # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
    cocoapods
    
  end

  desc "Runs all the tests"
  lane :test do
    scan
  end

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :beta do
    # match(type: "appstore") # more information: https://codesigning.guide
    gym(scheme: "MyAppName") # Build your app - more options available
    pilot(skip_waiting_for_build_processing: true)

    # sh "your_script.sh"
    # You can also use other beta testing services here (run `fastlane actions`)
  end

  desc "Deploy a new version to the App Store"
  lane :appstore_deployment do
    # match(type: "appstore")
    # snapshot
    gym(scheme: "MyAppName") # Build your app - more options available
    deliver(force: true)
    # frameit
  end

  # You can define as many lanes as you want

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end



+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | cocoapods                           | 3           |
| 4    | gym                                 | 297         |
| 💥    | pilot                               | 24          |
+------+-------------------------------------+-------------+

[09:44:55]: 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
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': [!] Permission denied - ~/.fastlane/spaceship (Errno::EACCES)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/client.rb:161:in `store_cookie'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/two_step_client.rb:197:in `store_session'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/two_step_client.rb:74:in `handle_two_factor'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/two_step_client.rb:39:in `handle_two_step'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/client.rb:324:in `send_shared_login_request'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/tunes/tunes_client.rb:164:in `send_login_request'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/client.rb:444:in `do_login'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/client.rb:253:in `login'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/client.rb:93:in `login'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/spaceship/lib/spaceship/tunes/spaceship.rb:22:in `login'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/pilot/lib/pilot/manager.rb:15:in `login'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/pilot/lib/pilot/manager.rb:8:in `start'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/pilot/lib/pilot/build_manager.rb:4:in `upload'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/actions/pilot.rb:15:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:232:in `block (2 levels) in execute_action'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:217:in `block in execute_action'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:213:in `chdir'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:213:in `execute_action'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:135:in `trigger_action_by_name'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
        from Fastfile:37:in `block (2 levels) in parsing_binding'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/lane.rb:33:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/lane.rb:33:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/commands_generator.rb:96:in `block (2 levels) in run'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:178:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:178:in `call'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/command.rb:153:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/runner.rb:444:in `run_active_command'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
        from /Library/Ruby/Gems/2.0.0/gems/commander-4.4.1/lib/commander/delegates.rb:15:in `run!'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/commands_generator.rb:293:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/commands_generator.rb:36:in `start'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/fastlane/lib/fastlane/cli_tools_distributor.rb:59:in `take_off'
        from /Library/Ruby/Gems/2.0.0/gems/fastlane-2.7.0/bin/fastlane:15:in `<top (required)>'
        from /usr/local/bin/fastlane:23:in `load'
        from /usr/local/bin/fastlane:23:in `<main>'

##### Complete output when running fastlane, including the stack trace and command used
> You can use: `--capture_output` as the last commandline argument to get that collected for you

[INSERT OUTPUT HERE]

### Environment

Please run `fastlane env` and copy the output below. This will help us help you :+1:
If you used `--capture_output` option please remove this block - as it is already included there.

</details>

### fastlane gems

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


### Loaded fastlane plugins:

**No plugins Loaded**

<details><summary><b>Loaded gems</b></summary>

| Gem                       | Version      |
| ------------------------- | ------------ |
| slack-notifier            | 1.5.1        |
| i18n                      | 0.7.0        |
| json                      | 1.7.7        |
| thread_safe               | 0.3.5        |
| tzinfo                    | 1.2.2        |
| minitest                  | 5.8.4        |
| activesupport             | 4.2.5.2      |
| CFPropertyList            | 2.3.4        |
| claide                    | 1.0.1        |
| colored                   | 1.2          |
| nanaimo                   | 0.2.3        |
| xcodeproj                 | 1.4.2        |
| rouge                     | 1.11.1       |
| xcpretty                  | 0.2.4        |
| terminal-notifier         | 1.7.1        |
| terminal-table            | 1.4.5        |
| plist                     | 3.2.0        |
| addressable               | 2.3.8        |
| multipart-post            | 2.0.0        |
| word_wrap                 | 1.0.0        |
| babosa                    | 1.0.2        |
| highline                  | 1.7.8        |
| commander                 | 4.4.1        |
| excon                     | 0.45.4       |
| faraday                   | 0.9.2        |
| unf_ext                   | 0.0.7.2      |
| unf                       | 0.1.4        |
| domain_name               | 0.5.20160615 |
| http-cookie               | 1.0.2        |
| faraday-cookie_jar        | 0.0.6        |
| fastimage                 | 1.9.0        |
| gh_inspector              | 1.0.2        |
| uber                      | 0.0.15       |
| representable             | 2.3.0        |
| retriable                 | 2.1.0        |
| mime-types-data           | 3.2016.0521  |
| mime-types                | 3.1          |
| hurley                    | 0.2          |
| little-plugger            | 1.1.4        |
| multi_json                | 1.12.1       |
| logging                   | 2.1.0        |
| jwt                       | 1.5.6        |
| memoist                   | 0.15.0       |
| os                        | 0.9.6        |
| signet                    | 0.7.3        |
| googleauth                | 0.5.1        |
| httpclient                | 2.8.3        |
| google-api-client         | 0.9.20       |
| mini_magick               | 4.5.1        |
| multi_xml                 | 0.5.5        |
| rubyzip                   | 1.1.7        |
| security                  | 0.1.3        |
| xcpretty-travis-formatter | 0.0.4        |
| dotenv                    | 2.1.1        |
| bundler                   | 1.13.7       |
| faraday_middleware        | 0.10.0       |
</details>


*generated on:* **2017-01-10**
</details>
@fastlane-bot
Copy link

It seems like this issue might be related to code signing 🚫

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues 👍

@KrauseFx
Copy link
Member

Do you run this on Linux or macOS?

@PiotrOlszewski
Copy link
Author

mac OS Sierra 10.12.2

@mfurtak
Copy link
Contributor

mfurtak commented Jan 10, 2017

@PiotrOlszewski If you run mkdir -p ~/.fastlane/spaceship from your command line, what is the result?

@PiotrOlszewski
Copy link
Author

ls -a ~/.fastlane/
./ ../
hence no directory is there
drwxr-xr-x 2 root staff 68B 10 gru 21:07 .fastlane/

mkdir -p ~/.fastlane/spaceship
->> mkdir: ~/.fastlane/spaceship: Permission denied
hence created with sudo

The problem were permissions (had to grant proper access rights).

Thanks a lot @mfurtak 👍

@Shadester
Copy link

I had the exact same problem. Clean install, no permission to write to that directory.

@fastlane fastlane locked and limited conversation to collaborators Jul 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants