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

Two factor authentication fails iTunes Connect login #9261

Closed
GevaZeichner opened this Issue May 24, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@GevaZeichner
Copy link

GevaZeichner commented May 24, 2017

New Issue Checklist

Issue Description

I'm trying to use fastlane and pilot for the first time and seems to have trouble to login. The moment I receive the 6 digits code for iTunes, fastlane fails.
I tried to also set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD and unset FASTLANE_SESSION, but it didn't help.

Complete output when running fastlane, including the stack trace and command used
> fastlane spaceauth -u <user>
Logging into to iTunes Connect (<user>)...
Could not login to iTunes Connect
Please check your credentials and try again.
This could be an issue with iTunes Connect,
Please try unsetting the FASTLANE_SESSION environment variable
and re-run `fastlane spaceauth`

Looking for related GitHub issues on fastlane/fastlane...

➡️  iTunes Transporter succeeds eventually but  fastlane reports an error
    https://github.com/fastlane/fastlane/issues/1896 [closed] 35 💬
    20 Feb 2017

➡️  Deliver Signiant transfer engine's status stuck on "CONNECTING"
    https://github.com/fastlane/fastlane/issues/5683 [closed] 12 💬
    06 Dec 2016

➡️  iTunes Transporter was 1: ERROR ITMS-90035
    https://github.com/fastlane/fastlane/issues/1593 [closed] 9 💬
    06 Dec 2016

and 19 more at: https://github.com/fastlane/fastlane/search?q=Problem%20connecting%20to%20iTunes%20Connect&type=Issues&utf8=✓

🔗  You can ⌘ + double-click on links to open them directly in your browser.
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/spaceship/lib/spaceship/spaceauth_runner.rb:25:in `rescue in run': [!] Problem connecting to iTunes Connect (RuntimeError)
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/spaceship/lib/spaceship/spaceauth_runner.rb:14:in `run'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/spaceship/lib/spaceship/commands_generator.rb:40:in `block (2 levels) in run'
	from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
	from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
	from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:38:in `run!'
	from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/spaceship/lib/spaceship/commands_generator.rb:46:in `run'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/spaceship/lib/spaceship/commands_generator.rb:12:in `start'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/fastlane/lib/fastlane/cli_tools_distributor.rb:58:in `take_off'
	from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.33.0/bin/fastlane:20:in `<top (required)>'
	from /usr/local/bin/fastlane:22:in `load'
	from /usr/local/bin/fastlane:22:in `<main>'

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.12.4
Ruby 2.4.1
Bundler? false
Git git version 2.11.0 (Apple Git-81)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.4 (16E195)
Ruby Lib Dir /usr/local/Cellar/ruby/2.4.1_1/lib
OpenSSL Version OpenSSL 1.0.2k 26 Jan 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.2

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.33.0 Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
slack-notifier 1.5.1
CFPropertyList 2.3.5
claide 1.0.1
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.4.4
rouge 2.0.7
xcpretty 0.2.8
terminal-notifier 1.8.0
unicode-display_width 1.2.1
terminal-table 1.8.0
plist 3.3.0
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.5.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.4
excon 0.55.0
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.0.3
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.2.2
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.28
json 2.0.2
mini_magick 4.5.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.1
bundler 1.15.0
faraday_middleware 0.11.0.1
io-console 0.4.6
openssl 2.0.3

generated on: 2017-05-24

@GevaZeichner GevaZeichner changed the title Two factor authentications fails iTunes Connect login Two factor authentication fails iTunes Connect login May 24, 2017

@paiv

This comment has been minimized.

Copy link

paiv commented May 24, 2017

Well, I have two-factor auth configured some time ago, and it was OK until I tried fastlane today and hit this issue.

Yesterday it was fastlane v2.33 and it was OK.

The only thing changed today is macOS update overnight – https://support.apple.com/en-us/HT207706

@KrauseFx

This comment has been minimized.

Copy link
Contributor

KrauseFx commented May 24, 2017

Hey everyone, thanks for reporting this - we can reproduce the issue and are working on a fix. This is actually related to the recent change to how auth works #9238 👍 via @taquitos

@KrauseFx KrauseFx referenced this issue May 24, 2017

Closed

2 Factor on Travis CI #9244

2 of 2 tasks complete
@ivanbruel

This comment has been minimized.

Copy link
Contributor

ivanbruel commented Jun 1, 2017

As I mentioned on #9244 this issue seems to be a travis related issue. Tried replicating with a cURL command both locally and on travis and locally would get 200 and on travis I would not. (Blacklisted maybe?)

@jerrylee007

This comment has been minimized.

Copy link

jerrylee007 commented Jun 2, 2017

any workaround for this issue? currently I'm blocked on this.

@donaldpiret

This comment has been minimized.

Copy link

donaldpiret commented Jun 21, 2017

+1 on this issue :(

@ivanbruel

This comment has been minimized.

Copy link
Contributor

ivanbruel commented Jun 21, 2017

This seems to be related with Geolocation based session tokens, as locally on other Macs I can use the token but not on U.S. based CIs. (I'm generating the token in Lisbon, Portugal).
Happily this does not affect our production app as we're using our own MacMini in Gitlab-CI.
The workaround I used on travis was to create another account associated with the same iTunes team but without the two-factor. This still seems like a risk though.

@donaldpiret

This comment has been minimized.

Copy link

donaldpiret commented Jun 22, 2017

On my end switching to a user with 2fa disabled leads to another error:

[!] The request could not be completed because:
there is no web session to update

This is with the latest nightly build

@KrauseFx

This comment has been minimized.

Copy link
Contributor

KrauseFx commented Jun 22, 2017

This seems to be a different issue actually, please submit a new issue with all the information we need to look into this 👍

@KrauseFx KrauseFx closed this Jun 22, 2017

@fastlane fastlane locked and limited conversation to collaborators Jun 22, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.