App specific password is invalid (-22938)

Bitrise Build Issue Report template

Could not deploy to Test flight due to invalid app-specific-password
Our IOS build throws the following
Transporter transfer failed. Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938) Application specific password you provided using environment variable FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD is invalid, please make sure it's correct

Description of the issue

When we build IOS app and push it to Test flight to distribute for testing, it fails at that time.
It has signed in successfully to apple portal, but when you it tries to fetch the app-specific-password, it throws the error mentioned above.

Environment:

we use bitrise.yml to deploy to Testflight
we use secret tab to store the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD and use it to connect to the apple portal.

Reproducibility

We’ve reset the app-specific password couple of times and have saved it the secret tabs and rebuild again. We have even reset the apple connection and use Apple id authorization to consume the new app-specific-password. But ttill the issue remains the same. Not sure if there is any caching issue or propagation or anything else.

Any help at the earliest would be highly appreciated.

Please let me know if you need more details.

Build log

[01:54:56]: Login to App Store Connect (betfairdevelopment@gmail.com) [01:54:57]: Login successful [01:55:01]: Ready to upload new build to TestFlight (App: 1499767350)... [01:55:03]: Fetching password for transporter from environment variable named FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD[01:55:04]: Going to upload updated app to App Store Connect [01:55:04]: This might take a few minutes. Please don't interrupt the script. [01:55:19]: Transporter transfer failed. [01:55:19]: [01:55:19]: Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938) [01:55:19]: [01:55:19]: Application specific password you provided using [01:55:19]: environment variable FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD [01:55:19]: is invalid, please make sure it's correct [01:55:19]:
cheers,
BT

I run into the same problem.

It was working for some time: Fetching password for transporter from environment variable named FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD iTunes Transporter successfully finished its job but now fails (like above) without having made any changes.

Did you managed to solve the problem?

I’ve resolved that by removing the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD from input variables of fastlane in the work flow and then in ios build settings where you can see the following
in which go to teams and scroll down and where you can see the apple service connection. In that click Test connection which if it returns successful, you’re good.