Closed iTofu closed 11 months ago
We were able to work around the issue by removing duration: 1200
as a parameter to app_store_connect_api_key
We were able to work around the issue by removing
duration: 1200
as a parameter toapp_store_connect_api_key
Thanks for your reply. I tried it and removed the duration
parameter, but the same problem still exists.
In addition, errors occurred in upload_to_testflight (upload to tf), not app_store_connect_api_key (request asc api key)
@iTofu have you set params apple_id
as pilot parameters. Reference from pilot fastlane documents
pilot/upload_to_testflight can use an [Application Specific Password via the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD environment variable](https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords) to upload a binary if both the skip_waiting_for_build_processing and apple_id options are set. (If any of those are not set, it will use the normal Apple login process that might require 2FA authentication.)
notice that apple_id
is the Apple ID property in the App Information section in App Store Connect, it is not same as your apple_id in AppFile config.
I'm not sure how it affected, but it works for me.
you can reach more here https://docs.fastlane.tools/actions/pilot/
@iTofu have you set params
apple_id
as pilot parameters. Reference from pilot fastlane documentspilot/upload_to_testflight can use an [Application Specific Password via the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD environment variable](https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords) to upload a binary if both the skip_waiting_for_build_processing and apple_id options are set. (If any of those are not set, it will use the normal Apple login process that might require 2FA authentication.)
notice that
apple_id
is the Apple ID property in the App Information section in App Store Connect, it is not same as your apple_id in AppFile config.I'm not sure how it affected, but it works for me.
you can reach more here https://docs.fastlane.tools/actions/pilot/
Thanks for your reply.
I tried adding apple_id
manually, but it still didn't work.
In addition, I communicate with ASC through App Store Connect API Key, so there is no need for apple_id
I've just seen the same error while I was renewing the certificates. In my case, the error message was not related to the fundamental issue.
If you've updated AppStore Connect API key, verify the Issuer ID
, the Key ID
, and the key file path
in your local machine match with the Fastfile code.
I've just seen the same error while I was renewing the certificates. In my case, the error message was not related to the fundamental issue.
If you've updated AppStore Connect API key, verify the
Issuer ID
, theKey ID
, and thekey file path
in your local machine match with the Fastfile code.AppStore Connect -> Users & Access -> Keys
Fastfile
Thank you for your reply.
I have reconfirmed that the relevant parameters are correct. And puts
the result of app_store_connect_api_key()
, which outputs an obviously valid string, like this:
[15:15:45]: app_store_connect_api_key: {:key_id=>"XXX", :issuer_id=>"\"XX-XX-XX", :key=>"-----BEGIN PRIVATE KEY-----\nXXX\n-----END PRIVATE KEY-----", :is_key_content_base64=>false, :duration=>500, :in_house=>true}
I'm running into this issue currently. It happened before but "fixed itself" so it does seem to be sporatic and related to app store connect (and not with the actual tokens).
To get more info:
Run fastlane with --verbose
. Also, look in /tmp/spaceship*
for logs that show the responses from app store connect. You'll probably see something like:
GET apps: 401 {"errors"=>[{"status"=>"401", "code"=>"NOT_AUTHORIZED", "title"=>"Authentication credentials are missing or invalid.", "detail"=>"Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens"}]}
Unfortunately the actual requests are not logged, and to do that you need to set SPACESHIP_DEBUG=1
and then use the charles web proxy to see the requests. All this to determine that app store connect sometimes craps out.
Sorry, I finally confirmed my problem because I entered an extra " for a certain value, which is a typo. Like this:
# …
key = "value""
# …
_### 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
New Issue Checklist
Issue Description
(Note: ASC = App Store Connect)
I created a new project, and then tried to build it with fastlane and upload it to TestFlight, but there is an error occur on upload:
I checked the issues related to this error and it didn't seem to help my case (I made sure the ASC API Keys was correct), so I created this issue.
And, I have another app, which is also under this asc team, and it builds and uploads normally. I have tried to use the same ASC api key in the new project, or to create a new api key in ASC, both of these errors occurred
Command executed
Complete output when running fastlane, including the stack trace and command used
Environment