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

Fastlane Pilot fails after successfully uploaded and submission due to missing password #17069

Closed
4 tasks done
aminosman opened this issue Aug 18, 2020 · 10 comments
Closed
4 tasks done

Comments

@aminosman
Copy link

aminosman commented Aug 18, 2020

New Issue Checklist

Issue Description

Pilot fails on Github Action due to missing login (FASTLANE_PASSWORD) after successful upload and submission using FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD. Everything seems to work but it is trying to log into something which fails the action and I would rather not add my password to Github. I went ahead and added FASTLANE_PASSWORD and now it requests a 2FA code. What needs to be done to circumvent this?

Command executed
pilot(
  changelog: plain_changes,
  apple_id: apple_id,
  username: username,
  skip_waiting_for_build_processing: true
)
Complete output when running fastlane, including the stack trace and command used
2020-08-18T19:58:51.0847710Z [19:58:51]: �[32m-------------------�[0m
2020-08-18T19:58:51.0848690Z [19:58:51]: �[32m--- Step: pilot ---�[0m
2020-08-18T19:58:51.0849370Z [19:58:51]: �[32m-------------------�[0m
2020-08-18T19:58:51.0911770Z [19:58:51]: �[32mReady to upload new build to TestFlight (App: XXXXXXX)...�[0m
2020-08-18T19:58:54.0137990Z [19:58:54]: Fetching password for transporter from environment variable named `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
2020-08-18T19:58:54.0138410Z [19:58:54]: Going to upload updated app to App Store Connect
2020-08-18T19:58:54.0140270Z [19:58:54]: �[32mThis might take a few minutes. Please don't interrupt the script.�[0m
2020-08-18T20:01:56.6314310Z [20:01:56]: �[32miTunes Transporter successfully finished its job�[0m
2020-08-18T20:01:56.7492610Z [20:01:56]: �[32m--------------------------------------------------------------------�[0m
2020-08-18T20:01:56.7493850Z [20:01:56]: �[32mSuccessfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.�[0m
2020-08-18T20:01:56.7494690Z [20:01:56]: �[32m--------------------------------------------------------------------�[0m
2020-08-18T20:01:56.7626750Z [20:01:56]: �[32mSuccessfully uploaded the new binary to App Store Connect�[0m
2020-08-18T20:01:56.7627200Z [20:01:56]: Login to App Store Connect (xxxxxxx@xxxxxx.com)
2020-08-18T20:01:56.8723060Z �[32m-------------------------------------------------------------------------------------�[0m
2020-08-18T20:01:56.8724000Z �[32mPlease provide your Apple Developer Program account credentials�[0m
2020-08-18T20:01:56.8724820Z �[32mThe login information you enter will be stored in your macOS Keychain�[0m
2020-08-18T20:01:56.8725570Z �[32mYou can also pass the password using the `FASTLANE_PASSWORD` environment variable�[0m
2020-08-18T20:01:56.8726420Z �[32mSee more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager�[0m
2020-08-18T20:01:56.8857940Z [20:01:56]: �[31mMissing password for user xxxxxxx@xxxxxx.com, and running in non-interactive shell�[0m

Environment

 [REPLACE THIS WITH YOUR INFORMATION] 
@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@messeb
Copy link

messeb commented Aug 26, 2020

I'm facing the same issue.
The output :

Step: upload_to_testflight
09:23:29 [09:23:29]: �[32m----------------------------------�[0m
  09:23:29 [09:23:29]: �[32m--- Step: upload_to_testflight ---�[0m
  09:23:29 [09:23:29]: �[32m----------------------------------�[0m
  09:23:29 [09:23:29]: �[32mReady to upload new build to TestFlight (App: 123456789)...�[0m
  09:23:31 [09:23:31]: Fetching password for transporter from environment variable named `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
  09:23:31 [09:23:31]: Going to upload updated app to App Store Connect
  09:23:31 [09:23:31]: �[32mThis might take a few minutes. Please don't interrupt the script.�[0m
  09:24:34 [09:24:34]: �[32miTunes Transporter successfully finished its job�[0m
  09:24:34 [09:24:34]: �[32m--------------------------------------------------------------------�[0m
  09:24:34 [09:24:34]: �[32mSuccessfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.�[0m
  09:24:34 [09:24:34]: �[32m--------------------------------------------------------------------�[0m
  09:24:34 [09:24:34]: �[32mSuccessfully uploaded the new binary to App Store Connect�[0m
  09:24:34 [09:24:34]: Login to App Store Connect (xxxxxxxxxx@xxxx.tld)
  09:24:34 �[32m-------------------------------------------------------------------------------------�[0m
  09:24:34 �[32mPlease provide your Apple Developer Program account credentials�[0m
  09:24:34 �[32mThe login information you enter will be stored in your macOS Keychain�[0m
  09:24:34 �[32mYou can also pass the password using the `FASTLANE_PASSWORD` environment variable�[0m
  09:24:34 �[32mSee more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager�[0m

I used the smallest possible action definition:

upload_to_testflight(
    skip_waiting_for_build_processing: true,
    apple_id: "123456789"
)

which is described in Use an Application Specific Password to upload in the fastlane documentation. (123456789 is replaced with the correct AppleID)

Issue Checklist

  • fastlane Version: 2.156.1

@messeb
Copy link

messeb commented Aug 27, 2020

Could be there a problem in the following code section?

UI.success("Successfully uploaded the new binary to App Store Connect")
# We will fully skip waiting for build processing *only* if no changelog is supplied
# Otherwise we may partially wait until the build appears so the changelog can be set, and then bail.
return_when_build_appears = false
if config[:skip_waiting_for_build_processing]
if config[:changelog].nil?
UI.important("`skip_waiting_for_build_processing` used and no `changelog` supplied - skipping waiting for build processing")
return
else
return_when_build_appears = true
end
end
# Calling login again here is needed if login was not called during 'start'
login unless should_login_in_start

It's after the response of

Successfully uploaded the new binary to App Store Connect

I set skip_waiting_for_build_processing to true and changelog to nil. So the additional login call

 # Calling login again here is needed if login was not called during 'start' 
 login unless should_login_in_start 

shouldn't be made. But perhaps the conditions doesn't work?

@BCassArq
Copy link

BCassArq commented Sep 1, 2020

I'm seeing the same issue on my project. I've defined a custom lane to perform the TestFlight uploads, which sets skip_waiting_for_build_processing, as per the docs but it still fails after uploading the build. The lane is:

    desc "Uploads the specified ipa file to TestFlight but does not wait for the build to process "
    desc "or uploads the build to testers."
    desc "Optional parameters: "
    desc "  - apple_id: The Apple ID that uniquely identifies the app within TestFlight."
    desc "  - ipa_path: /artefacts/AwareSuper.ipa"
    desc "e.g. bundle exec fastlane ios deploy_testflight ipa_path:'./artefacts/AwareSuper.ipa'"
    lane :deploy_testflight do |options|
            _apple_id = options[:apple_id] ||= ENV["APPLE_ID"]
            _ipa_path = options[:ipa_path] ||= File.join(@artefacts_directory, "#{@product_name}.ipa")

            upload_to_testflight(
                apple_id: _apple_id,
                ipa: _ipa_path,
                skip_submission: true,
                skip_waiting_for_build_processing: true
            )
    end

and the build output:

13:42:10 [13:42:10]: ----------------------------------
13:42:10 [13:42:10]: --- Step: upload_to_testflight ---
13:42:10 [13:42:10]: ----------------------------------
13:42:10 [13:42:10]: Ready to upload new build to TestFlight (App: 1461702710)...
13:42:11 [13:42:11]: Fetching password for transporter from environment variable named `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
13:42:11 [13:42:11]: Going to upload updated app to App Store Connect
13:42:11 [13:42:11]: This might take a few minutes. Please don't interrupt the script.
13:43:25 [13:43:25]: iTunes Transporter successfully finished its job
13:43:25 [13:43:25]: --------------------------------------------------------------------
13:43:25 [13:43:25]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
13:43:25 [13:43:25]: --------------------------------------------------------------------
13:43:25 [13:43:25]: Successfully uploaded the new binary to App Store Connect
13:43:25 [13:43:25]: Login to App Store Connect ([*******])
13:43:25 -------------------------------------------------------------------------------------
13:43:25 Please provide your Apple Developer Program account credentials
13:43:25 The login information you enter will be stored in your macOS Keychain
13:43:25 You can also pass the password using the `FASTLANE_PASSWORD` environment variable
13:43:25 See more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
13:43:25 -------------------------------------------------------------------------------------
13:43:25 [13:43:25]: Missing password for user [*******], and running in non-interactive shell

@BCassArq
Copy link

BCassArq commented Sep 1, 2020

Forgot to add I'm using Fastlane version: 2.157.2

@devzhr
Copy link
Contributor

devzhr commented Sep 4, 2020

my problem is:

Fastlane code:

      sync_code_signing(type: "appstore", git_url: "https://git.exemple.com/iphone/app.git",
        username: "ci@exemple.com")  # see code signing guide for more information
      build_ios_app(scheme:  "MonApp",
      configuration: "Release")
      upload_to_testflight(apple_id: "1111111111",
        changelog: "changelog")

error:

Missing username, and running in non-interactive shell

[22:02:01]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️ Fastlane Pilot fails after successfully uploaded and submission due to missing password
#17069 [open] 5 💬
3 days ago
➡️ Could not retrieve response as fastlane runs in non-interactive mode
#15548 [closed] 8 💬
27 Feb 2020
➡️ Match with Google Cloud: Impossible to run in noninteractive mode (CI)
#15426 [closed] 3 💬
02 Dec 2019

@max-ott
Copy link
Contributor

max-ott commented Sep 9, 2020

Could you please update all to the latest Fastlane version and check if the issue persists? Please always include your Fastlane environment.

@max-ott max-ott closed this as completed Sep 9, 2020
@messeb
Copy link

messeb commented Sep 9, 2020

@max-ott It still fails in the same way with version 2.158.0.

Environment

### Stack
Key Value
OS 10.15.4
Ruby 2.6.3
Bundler? true
Git git version 2.24.3 (Apple Git-128)
Installation Source ~/Home/workspace/appstore-build/Vendor/bundle/ruby/2.6.0/bin/fastlane
Host Mac OS X 10.15.4 (19E266)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.6.3/lib
OpenSSL Version OpenSSL 1.1.1d 10 Sep 2019
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 11.5

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane gems

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

@anneWe
Copy link

anneWe commented Oct 8, 2020

Hi, i have the same issue with fastlane version 2.162.0. Are there any solutions to the issue?

The output

[08:07:34]: --- Step: upload_to_testflight ---
[08:07:34]: ----------------------------------
[08:07:34]: Ready to upload new build to TestFlight (App: XXX)...
[08:07:37]: Fetching password for transporter from environment variable named `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD`
[08:07:37]: Going to upload updated app to App Store Connect
[08:07:37]: This might take a few minutes. Please don't interrupt the script.
[08:08:45]: iTunes Transporter successfully finished its job
[08:08:45]: --------------------------------------------------------------------
[08:08:45]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
[08:08:45]: --------------------------------------------------------------------
[08:08:45]: Successfully uploaded the new binary to App Store Connect
[08:08:45]: Login to App Store Connect (XXX)
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
See more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
[08:08:45]: Crash in lane deploy_to_testflight
[08:08:45]: Missing password for user XXX, and running in non-interactive shell
The Fastlane Code

upload_to_testflight(
        username: ENV['APPSTORECONNECT_USER_NAME'],
        apple_id: ENV['APPSTORECONNECT_APPLE_ID'],
        skip_submission: true,
        skip_waiting_for_build_processing: true
)
🚫 fastlane environment 🚫

Stack

Key Value
OS 10.15.7
Ruby 2.6.6
Bundler? true
Git git version 2.28.0
Installation Source ~/work/1/.bundle/ruby/2.6.0/bin/fastlane
Host Mac OS X 10.15.7 (19H2)
Ruby Lib Dir /usr/local/Cellar/ruby@2.6/2.6.6_1/lib
OpenSSL Version OpenSSL 1.1.1f 31 Mar 2020
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode_11.7.app/Contents/Developer/
Xcode Version 11.7

System Locale

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

fastlane files:

`./fastlane/Fastfile`
import_from_git(
  url: "XXX",
  branch: "feature/testflight-upload",
  path: "Global_Fastfile"
)

No Appfile found

fastlane gems

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-appcenter 1.9.0 🚫 Update available
fastlane-plugin-lizard 1.3.2 ✅ Up-To-Date
fastlane-plugin-badge 1.4.0 ✅ Up-To-Date

@anneWe
Copy link

anneWe commented Nov 16, 2020

I was able to figure out the issue I had: in a previous action a changelog was generated and used for the upload to appcenter. the changelog was written to the shared lane_context and used in the upload_to_testflight action. even directly setting the changelog to nil in the action didnt help. with the changelog in place, the upload_to_testflight action tried to login after the successful upload. my workaround was setting the shared lane_context to nil before I call the upload_to_testflight action:

      lane_context[SharedValues::FL_CHANGELOG] = nil

      upload_to_testflight(
        username: ENV['APPSTORECONNECT_USER_NAME'],
        apple_id: ENV['APPSTORECONNECT_APPLE_ID'],
        skip_submission: true,
        skip_waiting_for_build_processing: true
      )

@fastlane fastlane locked and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants