{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/9518","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/9518/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/9518/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/9518/events","html_url":"https://github.com/fastlane/fastlane/issues/9518","id":236833395,"number":9518,"title":"Locally generated FASTLANE_SESSION does not work on CI machine","user":{"login":"godrei","id":12427060,"avatar_url":"https://avatars1.githubusercontent.com/u/12427060?v=3","gravatar_id":"","url":"https://api.github.com/users/godrei","html_url":"https://github.com/godrei","followers_url":"https://api.github.com/users/godrei/followers","following_url":"https://api.github.com/users/godrei/following{/other_user}","gists_url":"https://api.github.com/users/godrei/gists{/gist_id}","starred_url":"https://api.github.com/users/godrei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godrei/subscriptions","organizations_url":"https://api.github.com/users/godrei/orgs","repos_url":"https://api.github.com/users/godrei/repos","events_url":"https://api.github.com/users/godrei/events{/privacy}","received_events_url":"https://api.github.com/users/godrei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-19T09:40:02Z","updated_at":"2017-06-19T09:40:03Z","closed_at":null,"body":"### New Issue Checklist\r\n\r\n- [x] Updated fastlane to the latest version\r\n- [x] I have read the [Contribution Guidelines](https://github.com/fastlane/fastlane/blob/master/CONTRIBUTING.md)\r\n\r\n### Issue Description\r\n\r\nFor first thank you guys for the Fastlane tools!\r\n\r\nI'm using spaceship for apple developer portal authentication, generating provisioning profile and code sign identity.\r\n\r\nOn my developer account i have 2FA enabled, so i use `fastlane spaceauth -u my@email.com` command (on my local machine) to obtain the session cookie, which i use to set FASTLANE_SESSION env var.\r\nWith this setup `Spaceship::Portal.login(username, password)` works great on my local machine.\r\n\r\nWhen i try to run my script on our build vm (which runs in a different country) it fails.\r\n\r\nIf i generate the session cookie on the build vm (through remote access) my script works well on a build vm, but this new session does not work on my local machine.\r\n\r\n##### Complete output when running fastlane, including the stack trace and command used\r\n> You can use: `--capture_output` as the last commandline argument to get that collected for you\r\n\r\nmy fastlane and spaceship dependencies are defined in a Gemfile (fastlane (2.39.1), spaceship (1.0.0))\r\n\r\nmy script:\r\n\r\n```\r\nrequire 'spaceship'\r\nrequire 'fastlane'\r\n\r\nENV['FASTLANE_PASSWORD'] = password\r\nENV['FASTLANE_SESSION'] = session\r\n\r\nSpaceship::Portal.login(username, password)\r\n```\r\n\r\nthe failed output:\r\n\r\n```\r\n/usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/two_step_client.rb:41:in `handle_two_step': Invalid 2 step response {\"trustedPhoneNumbers\"=>[{\"rawNumber\"=>\"*******20\", \"numberWithDialCode\"=>\"+36 •••••••20\", \"verifiedDate\"=>\"03/28/2017 05:39:30 PM\", \"obfuscatedNumber\"=>\"•••••••20\", \"id\"=>1, \"updateDate\"=>\"03/28/2017 05:39:30 PM\", \"countryDialCode\"=>\"36\", \"countryCode\"=>\"HU\", \"pushMode\"=>\"sms\", \"pending\"=>false, \"lastTwoDigits\"=>\"20\", \"createDate\"=>\"09/20/2016 10:02:26 PM\", \"number\"=>\"*******20\", \"verified\"=>true}], \"securityCode\"=>{\"length\"=>6, \"tooManyCodesSent\"=>false, \"tooManyCodesValidated\"=>false, \"securityCodeLocked\"=>false}, \"authenticationType\"=>\"hsa2\", \"recoveryUrl\"=>\"https://iforgot.apple.com/phone/add?prs_account_nm=[REDACTED]&autoSubmitAccount=true&appId=[REDACTED]\", \"cantUsePhoneNumberUrl\"=>\"https://iforgot.apple.com/iforgot/phone/add?context=cantuse&prs_account_nm=[REDACTED]&autoSubmitAccount=true&appId=[REDACTED]\", \"recoveryWebUrl\"=>\"https://iforgot.apple.com/password/verify/appleid?prs_account_nm=[REDACTED]&autoSubmitAccount=true&appId=[REDACTED]\", \"repairPhoneNumberUrl\"=>\"https://gsa.apple.com/appleid/account/manage/repair/verify/phone\", \"repairPhoneNumberWebUrl\"=>\"https://appleid.apple.com/widget/account/repair?#!repair\", \"aboutTwoFactorAuthenticationUrl\"=>\"https://support.apple.com/kb/HT204921\", \"managedAccount\"=>false, \"supportsRecovery\"=>true, \"trustedPhoneNumber\"=>{\"rawNumber\"=>\"*******20\", \"numberWithDialCode\"=>\"+36 •••••••20\", \"verifiedDate\"=>\"03/28/2017 05:39:30 PM\", \"obfuscatedNumber\"=>\"•••••••20\", \"id\"=>1, \"updateDate\"=>\"03/28/2017 05:39:30 PM\", \"countryDialCode\"=>\"36\", \"countryCode\"=>\"HU\", \"pushMode\"=>\"sms\", \"pending\"=>false, \"lastTwoDigits\"=>\"20\", \"createDate\"=>\"09/20/2016 10:02:26 PM\", \"number\"=>\"*******20\", \"verified\"=>true}, \"hsa2Account\"=>true} (RuntimeError)\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/client.rb:317:in `send_shared_login_request'\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/portal/portal_client.rb:13:in `send_login_request'\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/client.rb:431:in `do_login'\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/client.rb:246:in `login'\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/client.rb:93:in `login'\r\n\tfrom /usr/local/lib/ruby/gems/2.4.0/gems/spaceship-1.0.0/lib/spaceship/portal/spaceship.rb:22:in `login'\r\n\tfrom /tmp/122550714/step_src/step.rb:34:in `<main>'\r\n```\r\n\r\n### Environment\r\n\r\nPlease run `fastlane env` and copy the output below. This will help us help you :+1:\r\nIf you used `--capture_output` option please remove this block - as it is already included there.\r\n\r\n```\r\n[08:50:57]: Generating fastlane environment output, this might take a few seconds...\r\n<details><summary>✅ fastlane environment ✅</summary>\r\n\r\n### Stack\r\n\r\n| Key                         | Value                                       |\r\n| --------------------------- | ------------------------------------------- |\r\n| OS                          | 10.12.4                                     |\r\n| Ruby                        | 2.4.1                                       |\r\n| Bundler?                    | false                                       |\r\n| Git                         | git version 2.12.2                          |\r\n| Installation Source         | /usr/local/bin/fastlane                     |\r\n| Host                        | Mac OS X 10.12.4 (16E195)                   |\r\n| Ruby Lib Dir                | /usr/local/Cellar/ruby/2.4.1_1/lib          |\r\n| OpenSSL Version             | OpenSSL 1.0.2k  26 Jan 2017                 |\r\n| Is contained                | false                                       |\r\n| Is homebrew                 | false                                       |\r\n| Is installed via Fabric.app | false                                       |\r\n| Xcode Path                  | /Applications/Xcode.app/Contents/Developer/ |\r\n| Xcode Version               | 8.3.2                                       |\r\n\r\n\r\n### System Locale\r\n\r\n| Variable | Value       |   |\r\n| -------- | ----------- | - |\r\n| LANG     | en_US.UTF-8 | ✅ |\r\n| LC_ALL   | en_US.UTF-8 | ✅ |\r\n| LANGUAGE | en_US.UTF-8 | ✅ |\r\n\r\n\r\n### fastlane files:\r\n\r\n**No Fastfile found**\r\n\r\n\r\n**No Appfile found**\r\n\r\n\r\n### fastlane gems\r\n\r\n| Gem      | Version | Update-Status |\r\n| -------- | ------- | ------------- |\r\n| fastlane | 2.39.1  | ✅ Up-To-Date  |\r\n\r\n\r\n### Loaded fastlane plugins:\r\n\r\n**No plugins Loaded**\r\n\r\n\r\n<details><summary><b>Loaded gems</b></summary>\r\n\r\n| Gem                       | Version      |\r\n| ------------------------- | ------------ |\r\n| did_you_mean              | 1.1.0        |\r\n| slack-notifier            | 1.5.1        |\r\n| CFPropertyList            | 2.3.5        |\r\n| public_suffix             | 2.0.5        |\r\n| addressable               | 2.5.1        |\r\n| multipart-post            | 2.0.0        |\r\n| word_wrap                 | 1.0.0        |\r\n| tty-screen                | 0.5.0        |\r\n| babosa                    | 1.0.2        |\r\n| colored                   | 1.2          |\r\n| highline                  | 1.7.8        |\r\n| commander-fastlane        | 4.4.4        |\r\n| unf_ext                   | 0.0.7.4      |\r\n| unf                       | 0.1.4        |\r\n| domain_name               | 0.5.20170404 |\r\n| http-cookie               | 1.0.3        |\r\n| faraday-cookie_jar        | 0.0.6        |\r\n| fastimage                 | 2.1.0        |\r\n| gh_inspector              | 1.0.3        |\r\n| declarative               | 0.0.9        |\r\n| declarative-option        | 0.1.0        |\r\n| representable             | 3.0.4        |\r\n| mime-types-data           | 3.2016.0521  |\r\n| mime-types                | 3.1          |\r\n| little-plugger            | 1.1.4        |\r\n| multi_json                | 1.12.1       |\r\n| logging                   | 2.2.2        |\r\n| jwt                       | 1.5.6        |\r\n| memoist                   | 0.15.0       |\r\n| os                        | 0.9.6        |\r\n| signet                    | 0.7.3        |\r\n| googleauth                | 0.5.1        |\r\n| httpclient                | 2.8.3        |\r\n| google-api-client         | 0.12.0       |\r\n| mini_magick               | 4.5.1        |\r\n| multi_xml                 | 0.6.0        |\r\n| rubyzip                   | 1.2.1        |\r\n| security                  | 0.1.3        |\r\n| xcpretty-travis-formatter | 0.0.4        |\r\n| bundler                   | 1.14.6       |\r\n| faraday_middleware        | 0.11.0.1     |\r\n| json                      | 2.1.0        |\r\n| io-console                | 0.4.6        |\r\n| excon                     | 0.57.0       |\r\n| openssl                   | 2.0.3        |\r\n| plist                     | 3.3.0        |\r\n| faraday                   | 0.12.1       |\r\n| claide                    | 1.0.2        |\r\n| colored2                  | 3.1.2        |\r\n| nanaimo                   | 0.2.3        |\r\n| xcodeproj                 | 1.5.0        |\r\n| unicode-display_width     | 1.2.1        |\r\n| terminal-table            | 1.8.0        |\r\n</details>\r\n\r\n\r\n*generated on:* **2017-06-16**\r\n</detai\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/309390022","html_url":"https://github.com/fastlane/fastlane/issues/9518#issuecomment-309390022","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/9518","id":309390022,"user":{"login":"fastlane-bot","id":17056452,"avatar_url":"https://avatars3.githubusercontent.com/u/17056452?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane-bot","html_url":"https://github.com/fastlane-bot","followers_url":"https://api.github.com/users/fastlane-bot/followers","following_url":"https://api.github.com/users/fastlane-bot/following{/other_user}","gists_url":"https://api.github.com/users/fastlane-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane-bot/subscriptions","organizations_url":"https://api.github.com/users/fastlane-bot/orgs","repos_url":"https://api.github.com/users/fastlane-bot/repos","events_url":"https://api.github.com/users/fastlane-bot/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane-bot/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T09:40:03Z","updated_at":"2017-06-19T09:40:03Z","body":"It seems like this issue might be related to code signing :no_entry_sign:\n\nHave you seen our new [Code Signing Troubleshooting Guide](https://docs.fastlane.tools/codesigning/getting-started/)? It will help you resolve the most common code signing issues :+1:"}}
{"actor":{"display_login":"fastlane-bot"}}