MGY
MGY

Reputation: 8463

Fastlane error Could not receive the latest API key from App Store Connect, this might be a server issue

I'm getting a new Fastlane error after the command below the line:

bundle exec fastlane beta --verbose

And here is the error:

Could not receive the latest API key from App Store Connect, this might be a server issue.

I couldn't find any solution yet.

Best

Upvotes: 3

Views: 3640

Answers (4)

Ryosuke Hiramatsu
Ryosuke Hiramatsu

Reputation: 421

Using "App Store Connect API" is over spaceauth.

Fastlane support App Store Connect API, and it has some benefits. https://docs.fastlane.tools/app-store-connect-api/

You can create "App Store Connect API Key" in App Store Connect, and use it like below:

lane :release do
  api_key = app_store_connect_api_key(
    key_id: "D383SF739",
    issuer_id: "6053b7fe-68a8-4acb-89be-165aa6465141",
    key_filepath: "./AuthKey_D383SF739.p8",
    duration: 1200, # optional (maximum 1200)
    in_house: false, # optional but may be required if using match/sigh
  )

  pilot(api_key: api_key)
end

Upvotes: 1

Vibin
Vibin

Reputation: 185

I got this issue when the AppStore console was under scheduled maintenance, no workaround required, check if you're able to access the AppStore console and if not then you probably have to wait

Upvotes: 0

MGY
MGY

Reputation: 8463

Solution

Use the command below to recreate session for Fastlane:

fastlane spaceauth

it'll send 2 Factor authentication code to your registered device. Then you'll get the message:

Successfully logged in to App Store Connect

then it'll request you to:

pass the following via the **FASTLANE_SESSION** environment variable:

...some long terminal command and it's Example...

use the giving "Example" to pass the environment variable for Fastlane.

That's all.

I hope it'll help someone else in our universe.

Upvotes: 3

Yulia
Yulia

Reputation: 1242

Try to use the same command with sudo.

Upvotes: 2

Related Questions