microsoft / app-store-vsts-extension

Visual Studio Team Services (VSTS) extension for performing continuous delivery to the App Store store from your automated CI builds
Other
93 stars 53 forks source link

[AppStoreRelease] Fastlane 2.184.0 breaks the task #244

Closed miketimofeev closed 3 years ago

miketimofeev commented 3 years ago

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/microsoft/app-store-vsts-extension/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AppStoreRelease

list here (V# not needed):
https://github.com/microsoft/app-store-vsts-extension/tree/master/Tasks

Environment

Issue Description

Looks like these Fastlane changes, which are included in version 2.184, change authorization method thus the task started to fail with

[06:28:21]: Ready to upload new build to TestFlight (App: 1528027807)...
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
-------------------------------------------------------------------------------------

image https://buildcanary.visualstudio.com/PipelineCanary/_build/results?buildId=1561280&view=logs&j=bc17bbe4-9219-5902-8aa2-e19025a17b2c&t=b1b6db51-ae75-50ad-287a-36e54edd9e96

Task logs

https://buildcanary.visualstudio.com/deeb2bf9-e13d-4e1b-acc1-bf9844b08d19/_apis/build/builds/1561280/logs/76

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

2021-05-24T06:28:21.9259170Z /Users/runner/.gem-cache/gems/fastlane-2.184.0/credentials_manager/lib/credentials_manager/account_manager.rb:125:inask_for_login': [!] Missing username, and running in non-interactive shell (RuntimeError)`

bguidinger commented 3 years ago

We're facing this same issue. Another approach to fixing this is to use the fastlane inputs for the AppStoreRelease task.

- task: AppStoreRelease@1
  inputs:
    fastlaneToolsVersion: 'SpecificVersion'
    fastlaneToolsSpecificVersion: '2.183.2'
miketimofeev commented 3 years ago

@anatolybolshakov does it make sense to create an issue in the Fastlane repo? I could do it, but I don't know all the details of how the task works

anatolybolshakov commented 3 years ago

@miketimofeev yes - we are planning to re-check it on our side quickly and reach out to fastlane team - if there is something it could make more sense to apply on fastlane side. @max-zaytsev JFYI

max-zaytsev commented 3 years ago

looks like this issue only occurs if you use _-p (--appleid) argument and API key authentication. Since this argument isn't required when we use API key, we can safely remove it. For basic authentication with a password, everything works as expected.

I've opened the issue in Fastlane repo : https://github.com/fastlane/fastlane/issues/18767

iooovolts commented 3 years ago

Is this working for everyone now? I am using version 2.183.0 with API key auth and I still get the missing username error. I have tried 2.183.2 and still no luck. Any ideas?

Nick-Lucas commented 3 years ago

The workaround worked for me yesterday but today does seem to have broken.

I've just cleared this field and that seems to have sorted the issue, as the code sets -p when it's set image

I believe I set that field out of an abundance of caution, but it so far looks like the BundleId and API Key/Service Connection are enough to specify the app

Rrusl commented 3 years ago

Is this working for everyone now? I am using version 2.183.0 with API key auth and I still get the missing username error. I have tried 2.183.2 and still no luck. Any ideas?

Try to use command without -p like offered in the previous comment.

looks like this issue only occurs if you use -p (--apple_id) argument and API key authentication.

max-zaytsev commented 3 years ago

The fix has been mergedand will be included in the next fastlane release.

airmikec commented 2 months ago

API Key Authentication SOLVED.....

Azure DevOps API Key Issues for deploying to Apple

To get this to successfully work on Azure DevOps Pipeline with an API Key. I ran into so many problems and tried everything I could find and this finally worked. Azure DevOps says you need use the base64 key. Well if you open up the .p8 and copy the base64 encoded string in there, that isn't what they want. They literally want you to copy all of the contenxt in the .p8 file to a base64 string. Don't modify the .p8 file. I found the solution at the follow source, and once you get the data.b64 file open it and copy the base64 string in that file. In the following article is discusses how to do this for Windows, Mac, and Ubuntu.

https://github.com/fastlane/fastlane/issues/21531#issuecomment-1873633417