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

[Regression] fastlane pilot upload is failing when --apple_id (-p) is provided #18767

Closed
4 tasks done
max-zaytsev opened this issue May 28, 2021 · 7 comments · Fixed by #18771 or #18860
Closed
4 tasks done

[Regression] fastlane pilot upload is failing when --apple_id (-p) is provided #18767

max-zaytsev opened this issue May 28, 2021 · 7 comments · Fixed by #18771 or #18860

Comments

@max-zaytsev
Copy link

New Regression Checklist

Regression Information

  • Breaking version: [e.g. 2.184.0]
  • Last working version: [e.g. 2.183.2]

Regression Description

With fastlane 2.184.0 pilot upload command started to fail if apple_id (-p) argument is provided and when API key authentication is used.

Command executed:
/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/1/a/a/singleview.ipa -a com.xxxx.xamarin-test-app.test-ext --skip_submission true --skip_waiting_for_build_processing true -p 1528xxxxxx

Error message:
/Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:in ask_for_login': [!] Missing username, and running in non-interactive shell (RuntimeError)

The same command passed successfully with 2.183.2 version of fastlane:

We fixed the issue by removing -p argument, but we are wondering if this is the expected behavior

Successful run (2.183.2):

Starting: Publish to the App Store TestFlight track copy
/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/1/a/a/singleview.ipa -a com.xxxx.xamarin-test-app.test-ext --skip_submission true --skip_waiting_for_build_processing true -p 1528xxxxxx
[09:03:39]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[09:03:41]: Sending anonymous analytics information
[09:03:41]: Learn more at https://docs.fastlane.tools/#metrics
[09:03:41]: No personal or sensitive data is sent.
[09:03:41]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[09:03:41]: Ready to upload new build to TestFlight (App: 1528xxxxxx)...
[09:03:42]: Going to upload updated app to App Store Connect
[09:03:42]: This might take a few minutes. Please don't interrupt the script.
[09:04:39]: iTunes Transporter successfully finished its job
[09:04:39]: --------------------------------------------------------------------
[09:04:39]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
[09:04:39]: --------------------------------------------------------------------
[09:04:39]: Successfully uploaded the new binary to App Store Connect
[09:04:39]: `skip_waiting_for_build_processing` used and no `changelog` supplied - skipping waiting for build processing

#######################################################################

fastlane 2.184.0 is available. You are on 2.183.2.

You should use the latest version.

Please update using gem install fastlane.

#######################################################################

2.184.0 Improvements and App Store Connect API 1.3 Support

  • [app store connect] cleanup token creation code across entire project (#18186) via Josh Holtz
  • [deliver][spaceship] migrate AgeRatingDeclaration from AppStoreVersion to AppInfo for App Store Connect API 1.3 update (#18732) via Josh Holtz
  • [pilot] introducing timeout feature for Apple build-processing waiting-time (#18660) via Manish Rathi
  • [action][swiftlint] Added support for --fix mode option (#18695) via Manish Rathi
  • [resign] fix incorrectly typoed variable name (#18715) via Nick Silvestro
  • [Fastlane.Swift] fix OptionalConfigValue for Any-based types. (#18664) via Jorge Revuelta

Unsuccessful run (2.184.0):

/usr/local/opt/ruby@2.7/bin/gem install fastlane
Successfully installed fastlane-2.184.0
Parsing documentation for fastlane-2.184.0
Installing ri documentation for fastlane-2.184.0
Done installing documentation for fastlane after 23 seconds
1 gem installed
/usr/local/opt/ruby@2.7/bin/gem update fastlane -i /Users/runner/.gem-cache
Updating installed gems
Nothing to update
[command]/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/1/a/a/singleview.ipa -a com.xxxx.xamarin-test-app.test-ext --skip_submission true --skip_waiting_for_build_processing true -p 1528xxxxxx
[09:08:03]: �[33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile�[0m
[09:08:05]: Sending anonymous analytics information
[09:08:05]: Learn more at https://docs.fastlane.tools/#metrics
[09:08:05]: No personal or sensitive data is sent.
[09:08:05]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[09:08:05]: Ready to upload new build to TestFlight (App: 1528xxxxxx)...
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
-------------------------------------------------------------------------------------

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

➡️ Fastlane Pilot fails after successfully uploaded and submission due to missing password
#17069 [closed] 10 💬
15 Jan 2021

➡️ download_dsyms should respect FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
#17600 [closed] 17 💬
05 Feb 2021

➡️ "Need to acknowledge to Apple's Apple ID and Privacy statement" error when using fastlane with non-2FA account (yeah, I know...)
#18098 [closed] 127 💬
09 Feb 2021

and 22 more at: https://github.com/fastlane/fastlane/search?q=Missing%20username%2C%20and%20running%20in%20non-interactive%20shell&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.
/Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:in ask_for_login': [!] Missing username, and running in non-interactive shell (RuntimeError) from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:37:in user'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:95:in server_name' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:53:in password'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/itunes_transporter.rb:548:in load_password_for_transporter' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/itunes_transporter.rb:425:in initialize'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:378:in new' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:378:in transporter_for_selected_team'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:33:in upload' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:67:in block (2 levels) in run'
from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call' from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run'
from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:167:in run'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:19:in start' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in take_off'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/bin/fastlane:23:in <top (required)>' from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in load'
from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in <main>' /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:in ask_for_login': Missing username, and running in non-interactive shell (RuntimeError)
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:37:in user' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:95:in server_name'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:53:in password' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/itunes_transporter.rb:548:in load_password_for_transporter'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/itunes_transporter.rb:425:in initialize' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:378:in new'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:378:in transporter_for_selected_team' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/build_manager.rb:33:in upload'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:67:in block (2 levels) in run' from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!' from /usr/local/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:167:in run' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/pilot/lib/pilot/commands_generator.rb:19:in start'
from /Users/runner/.gem-cache/gems/fastlane-2.184.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in take_off' from /Users/runner/.gem-cache/gems/fastlane-2.184.0/bin/fastlane:23:in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in load' from /usr/local/lib/ruby/gems/2.7.0/bin/fastlane:23:in

'

Environment

[09:04:42]: �[33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile�[0m
[09:04:44]: �[33mGenerating fastlane environment output, this might take a few seconds...�[0m
🚫 fastlane environment 🚫

Stack

Key Value
OS 10.15.7
Ruby 2.7.3
Bundler? false
Git git version 2.31.1
Installation Source /usr/local/lib/ruby/gems/2.7.0/bin/fastlane
Host Mac OS X 10.15.7 (19H1217)
Ruby Lib Dir /usr/local/Cellar/ruby@2.7/2.7.3/lib
OpenSSL Version OpenSSL 1.1.1k 25 Mar 2021
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode_12.4.app/Contents/Developer/
Xcode Version 12.4

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.183.2 🚫 Update available

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.4.0
atomos 0.1.3
CFPropertyList 3.0.3
claide 1.0.3
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.19.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
public_suffix 4.0.6
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
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
excon 0.81.0
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-net_http 1.0.1
faraday-net_http_persistent 1.1.0
ruby2_keywords 0.0.4
faraday 1.4.2
faraday_middleware 1.0.0
fastimage 2.2.3
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 2.2.17
simctl 1.6.8
jwt 2.2.3
uber 0.1.0
declarative 0.0.20
trailblazer-option 0.1.1
representable 3.1.1
retriable 3.1.2
mini_mime 1.1.0
multi_json 1.15.0
signet 0.15.0
memoist 0.16.2
os 1.1.1
googleauth 0.16.2
httpclient 2.8.3
rexml 3.2.3.1
webrick 1.6.1
google-apis-core 0.3.0
google-apis-playcustomapp_v1 0.3.0
google-apis-androidpublisher_v3 0.4.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-apis-iamcredentials_v1 0.4.0
google-apis-storage_v1 0.4.0
rake 13.0.1
digest-crc 0.6.3
google-cloud-storage 1.31.1
emoji_regex 3.2.2
jmespath 1.4.0
aws-partitions 1.462.0
aws-eventstream 1.1.1
aws-sigv4 1.2.3
aws-sdk-core 3.114.0
aws-sdk-kms 1.43.0
aws-sdk-s3 1.95.1
uri 0.10.0
unicode-display_width 1.7.0
terminal-table 1.8.0
plist 3.6.0
json 2.3.0
forwardable 1.3.1
logger 1.4.2
cgi 0.1.0
date 3.0.0
timeout 0.1.0
stringio 0.1.0
ipaddr 1.2.2
openssl 2.1.2
zlib 1.1.0
net-http-persistent 2.9.4
ostruct 0.2.0
strscan 1.0.3
io-console 0.5.6
delegate 0.1.0
fileutils 1.4.1
singleton 0.1.0
open3 0.1.0
mini_portile2 2.1.0
nokogiri 1.6.8.1
racc 1.4.16
yaml 0.1.0
psych 3.1.0
mutex_m 0.1.0

generated on: 2021-05-28

[09:04:44]: �[33mTake notice that this output may contain sensitive information, or simply information that you don't want to make public.�[0m [09:04:44]: �[32mOpen https://github.com/fastlane/fastlane/issues/new to submit a new issue ✅�[0m

#######################################################################

fastlane 2.184.0 is available. You are on 2.183.2.

You should use the latest version.

Please update using gem install fastlane.

#######################################################################

Run gem cleanup from time to time to speed up fastlane

#######################################################################

�[32m2.184.0 Improvements and App Store Connect API 1.3 Support�[0m

  • [app store connect] cleanup token creation code across entire project (#18186) via Josh Holtz
  • [deliver][spaceship] migrate AgeRatingDeclaration from AppStoreVersion to AppInfo for App Store Connect API 1.3 update (#18732) via Josh Holtz
  • [pilot] introducing timeout feature for Apple build-processing waiting-time (#18660) via Manish Rathi
  • [action][swiftlint] Added support for --fix mode option (#18695) via Manish Rathi
  • [resign] fix incorrectly typoed variable name (#18715) via Nick Silvestro
  • [Fastlane.Swift] fix OptionalConfigValue for Any-based types. (#18664) via Jorge Revuelta
  • [deliver] remove all instances of is_string in options and use type (#18617) via Josh Holtz
  • [resign] fix entitlements merging when changing team while resigning (#18713) via Nick Silvestro
  • [fastlane_core][configuration] suggestion message improvement when fetching value with non symbol key (#18696) via Manish Rathi
  • [spaceship] update AppStoreConnect SandboxTester doc (#18708) via Yasuharu Yanamura

�[32mPlease update using gem install fastlane�[0m

@max-ott
Copy link
Contributor

max-ott commented May 28, 2021

Makes no sense to me. Why would you try to use both Apple ID and API key auth?

@max-zaytsev
Copy link
Author

Hi @max-ott, thank you for the quick reply,

It was part of our canary tests of azure devops task which uses fastlane pilot command to publish an application to TestFlight.
We tested two ways of authentication (username + password and API key) and we provided apple_id argument in both cases. And it worked fine before.

I can confirm that fastlane pilot works perfectly without apple_id (when we use API key auth)

We just want to make sure that the error message we started seeing is expected now.

@crazymanish
Copy link
Member

Hi @max-zaytsev
Thank you very much for reporting this issue. Open PR: #18771 with the fix.

If possible, I request you to test once this PR #18771. (PR already has testing steps)
Thank you!

@fastlane-bot
Copy link

The pull request #18771 that closed this issue was merged and released as part of fastlane 2.185.0 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

@max-zaytsev
Copy link
Author

@crazymanish sorry for delay! Just want to let you know that I see the same error message with 2.185.0:

/Users/runner/.gem-cache/gems/fastlane-2.185.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:in 'ask_for_login': [!] Missing username, and running in non-interactive shell (RuntimeError)

Command executed:
/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/1/s/output/test-***.ipa --changelog text -a *** --skip_waiting_for_build_processing true -p 15280*****

(And it works fine without apple_id argument)

@crazymanish
Copy link
Member

@crazymanish sorry for delay! Just want to let you know that I see the same error message with 2.185.0:

/Users/runner/.gem-cache/gems/fastlane-2.185.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:in 'ask_for_login': [!] Missing username, and running in non-interactive shell (RuntimeError)

Command executed:
/usr/local/lib/ruby/gems/2.7.0/bin/fastlane pilot upload --api_key_path /Users/runner/work/_temp/api_key***.json -i /Users/runner/work/1/s/output/test-***.ipa --changelog text -a *** --skip_waiting_for_build_processing true -p 15280*****

(And it works fine without apple_id argument)

Thank you for letting us know! This is a slightly complicated change, I think this is happening because of below change 😉
#18771 (comment)
I will open new PR again and will discuss it with @joshdholtz

Thank you @max-zaytsev I will update you again!

@fastlane-bot
Copy link

The pull request #18860 that closed this issue was merged and released as part of fastlane 2.186.0 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

@fastlane fastlane locked and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.