fastlane: Unauthorized access (upload_to_testflight)

New Issue Checklist

Issue Description

desc "Build demo app" lane :demo do build_app(scheme: "work - Demo", workspace: "./ios/work.xcworkspace", include_bitcode: true) upload_to_testflight end

bundle install runs great, asks for my apple id, when logging in with my email, erroring out with ‘unauthorized access’ error. I have account manager access to the appstoreconnect; tried changing password (signed back into xcode, and appstore) and still no luck. Anyone else having this issue?

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

bundle install && bundle exec fastlane demo

[19:26:06]: Unauthorized Access

±-----±---------------------±------------+ | fastlane summary | ±-----±---------------------±------------+ | Step | Action | Time (in s) | ±-----±---------------------±------------+ | 1 | default_platform | 0 | | 2 | build_app | 155 | | 💥 | upload_to_testflight | 33 | ±-----±---------------------±------------+

[19:26:06]: fastlane finished with errors

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 12.0
Ruby 2.6.3
Bundler? false
Git git version 2.30.1 (Apple Git-130)
Installation Source /usr/local/bin/fastlane
Host macOS 12.0 (21A344)
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 13.1
Swift Version 5.5.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 "Build dev app"
  lane :dev do
    build_app(scheme: "work - Dev", workspace: "./ios/work.xcworkspace", include_bitcode: true)
    upload_to_testflight
  end

  desc "Build demo app"
  lane :demo do
    build_app(scheme: "work - Demo", workspace: "./ios/work.xcworkspace", include_bitcode: true)
    upload_to_testflight
  end

  desc "Build prod app"
  lane :prod do
    build_app(scheme: "work - Prod", workspace: "./ios/work.xcworkspace", include_bitcode: true)
    upload_to_testflight
  end
end

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.204.3 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
atomos 0.1.3
colored2 3.1.2
nanaimo 0.3.0
rexml 3.2.5
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.6.0
public_suffix 4.0.6
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 1.17.2
simctl 1.6.8
CFPropertyList 3.0.5
claide 1.1.0
unicode-display_width 1.8.0
excon 0.92.0
ruby2_keywords 0.0.5
faraday-retry 1.0.3
faraday-rack 1.0.0
faraday-patron 1.0.0
faraday-net_http_persistent 1.2.0
faraday-net_http 1.0.1
faraday-multipart 1.0.3
faraday-httpclient 1.0.1
faraday-excon 1.1.0
faraday-em_synchrony 1.0.0
faraday-em_http 1.0.0
faraday 1.10.0
unf_ext 0.0.8.1
faraday_middleware 1.2.0
fastimage 2.2.6
json 2.6.1
jwt 2.3.0
webrick 1.7.0
httpclient 2.8.3
multi_json 1.15.0
signet 0.16.1
os 1.1.4
memoist 0.16.2
googleauth 1.1.2
mini_mime 1.1.2
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.1.1
google-apis-core 0.4.2
google-apis-playcustomapp_v1 0.7.0
google-apis-androidpublisher_v3 0.16.0
rake 13.0.6
digest-crc 0.6.4
google-apis-storage_v1 0.11.0
google-apis-iamcredentials_v1 0.10.0
google-cloud-errors 1.2.0
google-cloud-env 1.5.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.1
emoji_regex 3.2.3
aws-eventstream 1.2.0
aws-sigv4 1.4.0
aws-partitions 1.568.0
jmespath 1.6.1
aws-sdk-core 3.130.0
aws-sdk-kms 1.55.0
aws-sdk-s3 1.113.0
forwardable 1.2.0
logger 1.3.0
date 2.0.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
zlib 1.0.0
mutex_m 0.1.0
ostruct 0.1.0
strscan 1.0.0
io-console 0.4.7
fileutils 1.1.0
etc 1.0.1
libxml-ruby 3.2.1
psych 3.1.0

generated on: 2022-03-16

 [bundle install runs great, asks for my apple id, when logging in with my email, erroring out with 'unauthorized access' error. I have account manager access to the appstoreconnect; tried changing password (signed back into xcode, and appstore). Anyone else having this issue?] 

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 48
  • Comments: 67 (11 by maintainers)

Most upvoted comments

✨ Official Update 1

Hello, everyone! I’m looking into what’s happening and will hopefully have some updates soon. 👉 I’m testing about #20081 to see if that solves the issues for me and if it will work for everyone else

🙏 And if we could silence any more “+1” or “Same here” from this point on that would be great! I would love to keep this discussion focused on what works to get around this and any updates that we have.

And also… I have some personal/family stuff that happened today so I will try and get things as soon as I can for everyone but all patience is appreciated ❤️ Thanks!

✨ Official Update 6

2.205.0 has been released to RubyGems with the fix! Thank you to everyone who reported and helped test ❤️

And big thank you again to @VrsajkovIvan33 and @valerio-castelli for doing the investigation and majority of the fixing 🙌

✨ Official Update 4

All tests are fixed an now passing in #28003. A big thank you again to @VrsajkovIvan33 and @valerio-castelli for doing the research and the hard part 🙌

I need to go eat dinner but then I’m going to come back and run through actual projects to make sure everything is still working as expected.

Updated timing 👇

Expected Merge: 7pm central Expected Release RubyGems: 8pm central Expected Release Homebrew: A few hours after ☝️ (because out of my control when it gets merged)

Thank you all for making this the best community! ❤️

✨ Official Update 3

I’m currently working on fixing all of the tests right now to make sure I didn’t miss anything else that I physically need to test. The tests are taking a bit to update because this affects a lot of parts of fastlane.

Expected Merge: Something this evening (I’m in US central) Expected Release RubyGems: An hour or so after ☝️ Expected Release Homebrew: A few hours after ☝️ (because out of my control when it gets merged)

My son just went down for a nap so I’m hoping to get test fixed by the time he wakes up and then I’ll get this merged and released during playtime or after dinner or after his bedtime 🤷‍♂️

🙏 Please ask any questions or post any issues with the fix in the #20083

And thanks again for all of your patience!

✨ Official Update 2

I’ve opened up #20083 (a duplicate of #20081 but on a branch that I can commit to). I’ve gotten @VrsajkovIvan33 and @valerio-castelli permission to do so for the sake of getting this fix out ❤️

✅ I’ve made some changes and I’ve successfully submitted a built to TestFlight. I want to do more testing and I need to update tests before getting a release out.

If anybody wants to test, you can update your Gemfile like below 👇 But please leave any comments in the PR and not here. If it works for you, please feel free to comment that in the PR or give a 👍 reaction to this comment.

Thank you again for your patience! I usually look at issues before going to be to see if anything major and last night I decided I wanted to sleep (bad decision 🤷‍♂️)

Testing Steps

Update Gemfile and run bundle install, bundle update fastlane, or bundle update

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz-spaceship-replace-teams-endpoints"

same error with 2.204.3.

Not going to roll back. Waiting for an official feedback from Fastlane here

Back to 2.176.0, work for me!

We’re glad our contribution helped you!

We’re also thankful for all the hard work you put in maintaining fastlane - it’s been, and still is, an invaluable project for us, and we’re happy to give something back when we can! 🙌

✨ Official Update 5

The fix has been merged and the bump version PR has been created #20084

Fix (assuming CIs will pass and the release process doesn’t break somewhere) should be on RubyGems in about an hour 🤞

fastlane fastlane-credentials remove --username <USERNAME>
fastlane spaceauth -u <USERNAME>

solved it for me without downgrading fastlane.

Work for me ! sudo gem uninstall fastlane sudo gem install fastlane --version 2.176.0

same here The ipa can be uploaded to testflight via Transporter manually

Guys, let’s not pollute this thread by sending same issue with xxx, I’ve tried with archive with Xcode directly and always get a timeout. Maybe it’s the Apple service that’s down instead of a Fastlane issue. Anyway, let’s wait for a while.

Given the amount of people having this issue, yes, something has most likely changed on Apple’s part in the last 24 hours or so. However, I’m one of many who’ve downgraded (to 2.166.0 in my case) and gotten App Store version number and testflight upload working again. So there’s more to be investigated than just an outage on apple’s side.

Rolling back to 2.176.0 didn’t work for me because of app_identifier bug. [!] Could not find an app on App Store Connect with app_identifier:

same here

hello fastlane update_fastlane doesn’t work for me, it keep saying I am on 2.204.3

If you installed it using brew it identifies there is a new version but brew upgrade keeps showing version 2.204.3. I guess will need to wait until the new version is in brew.

Please add

gem "fastlane", "2.205.0"

in Gemfile

Same issue here

Having the same issue with fastlane produce.

hello fastlane update_fastlane doesn’t work for me, it keep saying I am on 2.204.3

If you installed it using brew it identifies there is a new version but brew upgrade keeps showing version 2.204.3. I guess will need to wait until the new version is in brew.

Not sure if this is helpful, it did try a few times before throwing the error ‘Unauthorized access’

Auth error received: 'Spaceship::UnauthorizedAccessError', 'Unauthorized Access'. Login in again then retrying after 3 seconds (remaining: 4)...
Loading session from '<Fastlane cookie directory>'

I’m running an older version(2.176.0) of fastlane in another machine, tried the same lane and manage to upload successfully

same

same here

Same issue

same here

same here

same here

Version 2.176.0 works for me!

Just upgrade to last version…

@joshdholtz thank you so much for fixing it.

We also had the problem and it’s now fixed

gem install fastlane
# Fetching fastlane-2.205.0.gem

@joshdholtz just worked for me with your branch, I really appreciate your effort, thanks a lot 🙏

@joshdholtz it works here with your branch, thank you!!

Same here with 2.197.0

Same here with 2.204.2

same here

same here, I am guess this is more an issue with apple servers.

same here

Testing Steps

Update Gemfile and run bundle install, bundle update fastlane, or bundle update

Thanks! It works.

@joshdholtz Thank you very much for the fix. When can we expect your PR to be merged into main as a new version?

same here

Same here. Any workarounds available for the short-term?

Same here