fastlane: Fastlane cert fails with 'Unauthorized Access'
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
Running fastlane dies in ‘cert’ with Unauthorized access. I know the username and password are good for Apple Dev Portal, and the user has admin rights.
Complete output when running fastlane, including the stack trace and command used
buildNodeDSW:App jenkins$ fastlane --verbose beta [✔] 🚀 DEBUG [2018-01-15 12:08:20.10]: Checking if there are any plugins that should be loaded… Successfully loaded Appfile at path ‘/path/to/Appfile’
- app_identifier: ‘com.mycompany.AppID’
- apple_id: ‘X@example.com’
INFO [2018-01-15 12:08:20.41]: ---------------------------------------- INFO [2018-01-15 12:08:20.41]: — Step: Verifying fastlane version — INFO [2018-01-15 12:08:20.41]: ---------------------------------------- INFO [2018-01-15 12:08:20.41]: Your fastlane version 2.75.1 matches the minimum requirement of 2.70.2 ✅ INFO [2018-01-15 12:08:20.47]: ------------------------------ INFO [2018-01-15 12:08:20.47]: — Step: default_platform — INFO [2018-01-15 12:08:20.47]: ------------------------------ INFO [2018-01-15 12:08:20.48]: Driving the lane ‘ios beta’ 🚀 INFO [2018-01-15 12:08:20.53]: ----------------------------- INFO [2018-01-15 12:08:20.53]: — Step: unlock_keychain — INFO [2018-01-15 12:08:20.53]: ----------------------------- INFO [2018-01-15 12:08:20.60]: Unlocking keychain at path: <PATH> INFO [2018-01-15 12:08:20.88]: INFO [2018-01-15 12:08:20.94]: ------------------ INFO [2018-01-15 12:08:20.94]: — Step: cert — INFO [2018-01-15 12:08:20.94]: ------------------
±------------------±-------------------------------------+ | Summary for cert 2.75.1 | ±------------------±-------------------------------------+ | keychain_path | <PATH> | | keychain_password | ******** | | development | false | | force | false | | username | X@example.com | | platform | ios | ±------------------±-------------------------------------+
INFO [2018-01-15 12:08:21.16]: Starting login with user ‘X@example.com’ WARN [2018-01-15 12:08:22.61]: Lane Context: INFO [2018-01-15 12:08:22.61]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>“ios beta”} ERROR [2018-01-15 12:08:22.61]: Unauthorized Access INFO [2018-01-15 12:08:22.62]: Successfully generated documentation at path ‘/path/to/fastlane/README.md’
±-----±--------------------±------------+ | fastlane summary | ±-----±--------------------±------------+ | Step | Action | Time (in s) | ±-----±--------------------±------------+ | 1 | Verifying fastlane | 0 | | | version | | | 2 | default_platform | 0 | | 3 | unlock_keychain | 0 | | 💥 | cert | 1 | ±-----±--------------------±------------+
ERROR [2018-01-15 12:08:22.64]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane… Search query: The request could not be completed because: Unauthorized Access
URL: https://api.github.com/search/issues?q=The request could not be completed because: Unauthorized Access+repo:fastlane/fastlane ➡️ Fastlane init: Unauthorized Access https://github.com/fastlane/fastlane/issues/9321 [closed] 3 💬 29 Aug 2017
➡️ fastlane init error https://github.com/fastlane/fastlane/issues/9241 [closed] 25 💬 29 Aug 2017
➡️ 2 Factor on Travis CI https://github.com/fastlane/fastlane/issues/9244 [closed] 8 💬 01 Jun 2017
and 5 more at: https://github.com/fastlane/fastlane/search?q=The request could not be completed because: Unauthorized Access&type=Issues&utf8=✓
🔗 You can ⌘ + double-click on links to open them directly in your browser.
/home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:689:in block in send_request': [!] The request could not be completed because: (Spaceship::UnauthorizedAccessError) Unauthorized Access from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:519:in with_retry’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:683:in send_request' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:571:in request’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:473:in fetch_olympus_session' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:450:in send_shared_login_request’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/portal/portal_client.rb:27:in send_login_request' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:650:in do_login’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:355:in login' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/client.rb:71:in login’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/portal/spaceship.rb:25:in login' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/spaceship/lib/spaceship/portal/spaceship.rb:95:in login’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/cert/lib/cert/runner.rb:24:in login' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/cert/lib/cert/runner.rb:34:in run’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/cert/lib/cert/runner.rb:13:in launch' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/actions/get_certificates.rb:17:in run’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:253:in block (2 levels) in execute_action' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in execute_action’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:231:in block in execute_action' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:227:in chdir’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:227:in execute_action' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:148:in trigger_action_by_name’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/fast_file.rb:148:in method_missing' from Fastfile:58:in block (2 levels) in parsing_binding’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane.rb:33:in call' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane.rb:33:in call’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:49:in block in execute' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:45:in chdir’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/runner.rb:45:in execute' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/lane_manager.rb:56:in cruise_lane’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/command_line_handler.rb:34:in handle' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:107:in block (2 levels) in run’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in call' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in call’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in run' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in run_active_command’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in run!' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in run!’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:336:in run' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/commands_generator.rb:42:in start’
from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/fastlane/lib/fastlane/cli_tools_distributor.rb:94:in take_off' from /home_dir/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.75.1/bin/fastlane:20:in <top (required)>’
from /home_dir/.fastlane/bin/bundle/bin/fastlane:22:in load' from /home_dir/.fastlane/bin/bundle/bin/fastlane:22:in <main>’
Environment
buildNodeDSW:App jenkins$ fastlane env [✔] 🚀 [12:20:28]: Generating fastlane environment output, this might take a few seconds…
✅ fastlane environment ✅
Stack
| Key | Value |
|---|---|
| OS | 10.13.2 |
| Ruby | 2.2.4 |
| Bundler? | false |
| Git | git version 2.14.3 (Apple Git-98) |
| Installation Source | ~/.fastlane/bin/bundle/bin/fastlane |
| Host | Mac OS X 10.13.2 (17C88) |
| Ruby Lib Dir | ~/.fastlane/bin/bundle/lib |
| OpenSSL Version | OpenSSL 1.0.2g 1 Mar 2016 |
| Is contained | true |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcodes/Xcode-9.2.app/Contents/Developer/ |
| Xcode Version | 9.2 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | en_US.UTF-8 | ✅ |
| LANGUAGE | en_US.UTF-8 | ✅ |
fastlane files:
`./fastlane/Fastfile`
# Customize this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
min_fastlane_version("2.70.2")
default_platform(:ios)
platform :ios do
before_all do
unlock_keychain(
path: "<PATH>",
password: "hahahahahano",
set_default: true,
)
puts ENV['BUILD_NUMBER']
end
desc "Create a CI build"
lane :ciBuild do
cert(
keychain_path: "<PATH>",
keychain_password: "hahahahahano",
development: true
)
sigh(
development: true,
app_identifier: "com.mycompany.AppID",
readonly: true,
provisioning_name: "AppDev",
)
build_app(
configuration: "Debug",
include_symbols: true,
build_path: "output/",
export_method: "development",
)
end
desc "Runs all the tests"
lane :test do
run_tests
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
# sync_code_signing(type: "appstore") # more information: https://codesigning.guide
cert(
keychain_path: "<PATH>",
keychain_password: "hahahahahano",
development: false,
)
sigh(
development: false,
app_identifier: "com.mycompany.AppID",
provisioning_name: "AppTestflight",
)
increment_build_number(
build_number: "8"
)
build_app(
configuration: "Debug",
include_symbols: true,
build_path: "output/",
export_method: "app-store",
)
upload_to_testflight(
groups: "alpha",
)
# 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 :release do
# sync_code_signing(type: "appstore")
capture_screenshots
build_app # more options available
upload_to_app_store(force: true)
# frame_screenshots
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
# More information about multiple platforms in fastlane: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
# All available actions: https://docs.fastlane.tools/actions
# fastlane reports which actions are used. No personal data is recorded.
# Learn more at https://docs.fastlane.tools/#metrics
`./fastlane/Appfile`
app_identifier "com.mycompany.AppID"
apple_id "X@example.com"
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.75.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| CFPropertyList | 2.3.5 |
| addressable | 2.5.1 |
| babosa | 1.0.2 |
| bigdecimal | 1.2.6 |
| bundler | 1.14.6 |
| claide | 1.0.2 |
| colored | 1.2 |
| colored2 | 3.1.2 |
| commander-fastlane | 4.4.5 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| domain_name | 0.5.20170404 |
| dotenv | 2.2.0 |
| excon | 0.55.0 |
| faraday | 0.12.1 |
| faraday-cookie_jar | 0.0.6 |
| faraday_middleware | 0.11.0.1 |
| fastimage | 2.1.0 |
| gh_inspector | 1.0.3 |
| google-api-client | 0.13.6 |
| googleauth | 0.5.1 |
| highline | 1.7.8 |
| http-cookie | 1.0.3 |
| httpclient | 2.8.3 |
| hurley | 0.2 |
| io-console | 0.4.3 |
| json | 1.8.1 |
| jwt | 1.5.6 |
| libxml-ruby | 3.0.0 |
| little-plugger | 1.1.4 |
| logging | 2.2.2 |
| memoist | 0.15.0 |
| mime-types | 3.1 |
| mime-types-data | 3.2016.0521 |
| mini_magick | 4.5.1 |
| minitest | 5.4.3 |
| multi_json | 1.12.1 |
| multi_xml | 0.6.0 |
| multipart-post | 2.0.0 |
| nanaimo | 0.2.3 |
| nokogiri | 1.5.6 |
| os | 0.9.6 |
| plist | 3.2.0 |
| power_assert | 0.2.2 |
| psych | 2.0.8 |
| public_suffix | 2.0.5 |
| rake | 10.4.2 |
| rdoc | 4.2.0 |
| representable | 3.0.4 |
| retriable | 2.1.0 |
| rouge | 1.11.1 |
| rubygems-update | 2.5.2 |
| rubyzip | 1.2.1 |
| security | 0.1.3 |
| signet | 0.7.3 |
| slack-notifier | 1.5.1 |
| sqlite3 | 1.3.13 |
| terminal-notifier | 1.7.1 |
| terminal-table | 1.7.3 |
| test-unit | 3.0.8 |
| tty-cursor | 0.5.0 |
| tty-screen | 0.6.3 |
| tty-spinner | 0.7.0 |
| uber | 0.0.15 |
| unf | 0.1.4 |
| unf_ext | 0.0.7.4 |
| unicode-display_width | 1.1.3 |
| word_wrap | 1.0.0 |
| xcodeproj | 1.5.3 |
| xcpretty | 0.2.6 |
| xcpretty-travis-formatter | 0.0.4 |
generated on: 2018-01-15
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (5 by maintainers)
I’m having the same problem when match tries to verify my profile on the dev portal. It seems to have just started a little while ago for me. I already accepted the new terms and conditions before this started. It seems to be intermittent. It fails most of the time but sometimes it randomly works.
After some retries it works
I have experience this issue today as well. Sometimes it seams like the fastlane can’t find a build for hours and then when I log into iTC and navigate to it, it becomes available and fastlane continues. If I don’t do the iTC step then after a longer period of time the Fastlane fails with the Unauthorized Access error.
Also got this, seems like it started after WWDC.
i have the same issue but my account is on like 10 customer teams so I would love to avoid deleting it. @taquitos I have only few output even in verbose mode, any way to see what is wrong with this apple ID?
Thanks
Don’t know why it stopped working, but deleting that account from ITC, and then recreating it, solved the problem.
Thank you @taquitos for your help.