Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't submit to Apple App Store, Apple 403 detected - Access forbidden. #2136

Open
lennartkloock opened this issue Nov 27, 2023 · 8 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@lennartkloock
Copy link

Build/Submit details page URL

No response

Summary

When executing eas submit -p ios and selecting an eas build and providing the right path to the Apple Connect API key, I get:

Error: Apple 403 detected - Access forbidden.
This request is forbidden for security reasons - The API key in use does not allow this request
✖ Failed to fetch App Store Connect API Key.
Apple 403 detected - Access forbidden.
This request is forbidden for security reasons - The API key in use does not allow this request
    Error: submit command failed.

Managed or bare?

Bare

Environment

expo-env-info 1.0.5 environment info:
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.17.1 - /usr/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.6.7 - /usr/bin/npm
npmPackages:
expo: ~45.0.8 => 45.0.8
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-web: 0.17.7 => 0.17.7
npmGlobalPackages:
eas-cli: 5.9.1
Expo Workflow: bare

Error output

at t.getAppleResponseError (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:833596)
at block (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:840893)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async I (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:839166)
at async method (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:840374)
at async t.providerRequestAsync (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:734446)
at async s.requestAsync (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:740890)
at async s.requestAndParseAsync (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741594)
at async s.fetchSingleModelAsync (/usr/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741360)
at async getAscApiKeyAsync (/usr/lib/node_modules/eas-cli/build/credentials/ios/appstore/ascApiKey.js:38:24)
...

Reproducible demo or steps to reproduce from a blank project

Can't share a demo

@lennartkloock lennartkloock added the needs review Issue is ready to be reviewed by a maintainer label Nov 27, 2023
@lennartkloock lennartkloock changed the title Can't submit to Apple Store, Apple 403 detected - Access forbidden. Can't submit to Apple App Store, Apple 403 detected - Access forbidden. Nov 27, 2023
@szdziedzic
Copy link
Member

Hi, is that how you generated the API key https://github.com/expo/fyi/blob/main/creating-asc-api-key.md?

@lennartkloock
Copy link
Author

Hi, is that how you generated the API key https://github.com/expo/fyi/blob/main/creating-asc-api-key.md?

Yes, that's exactly how I did it. When eas submit asks for the path, I provide the path to the .p8 file

@lennartkloock
Copy link
Author

lennartkloock commented Dec 2, 2023

Could you provide a link to the source code of the apple-utils package so I can investigate myself? I can't find it anywhere. 🤔

@lennartkloock
Copy link
Author

I tried submitting with an app-specific password using the EXPO_APPLE_APP_SPECIFIC_PASSWORD env var and it worked

@fernandatoledo
Copy link

Hey! I am having the same problem here, if I set the values using eas.json then I have no problem but if I try to add the api key using eas credentials then i get the same error.

Screenshot 2024-07-31 at 5 17 18 PM

Has anyone solved it?

@wellRoundedAppDev
Copy link

hello any solutions? Help

@mbrodt
Copy link

mbrodt commented Nov 22, 2024

I was unable to get it working just by providing the .p8 file and the key ID when running eas submit, but I then added the keys to eas.json and it worked:

 "submit": {
    "production": {
      "ios": {
        "ascApiKeyPath": "./path_to_file",
        "ascApiKeyIssuerId": "",
        "ascApiKeyId": ""
      }
    }
  }

@MuhammadHussnainShaker
Copy link

I did not had the permissions on my Apple Developer Account to generate App Store Connect API keys so uploading the app's .ipa through Transporter worked for me. Refer to this link for more details on uploading app to App Store Connect:
https://developer.apple.com/help/app-store-connect/manage-builds/upload-builds/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

6 participants