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
94 stars 53 forks source link

Fastlane 2FA issue #358

Open airmikec opened 5 months ago

airmikec commented 5 months 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

Question, Bug, or Feature?
Type: Question - Bug

Enter Task Name: Publish to the App Store TestFlight track

Environment

Issue Description

As you can see in the images below a specific task is running for 1.5 hours. It submits the code to Apple, and apple get's that code, and then it asks for a 2FA, and then it starts counting down right after that and it never ends. So after 1.5 hours I had to cancel the task, assuming it's still looking for a 2FA code, which there should be. I have added the Application Id and the Application Password. I read somewhere by adding the Application Id or password it bypasses 2FA. Don't know if that is true, but nonetheless, it's been added. Need to figure out how to get the task to stop after it sends it to Apple. From what I can tell, this is related to FastLane.

Task logs

Task log of the failing task tasklog_9.log

Troubleshooting

Images showing what is happening. error image 1 error image 2

Error logs

No error, it just never ends. I have to manually cancel the task. As you notice on the screen this task was running for 1.5 hours.

Update 2024-04-20

I chose to not install fastlane and I get the same 2FA problem.

Update 2024-04-22

I switched to using an Apple API Key because documentation says it by-passes 2FA and I am still having trouble authenticating.

airmikec commented 5 months ago

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