expo build:ios 403 Access forbidden

expo diagnostics:

  Expo CLI 4.11.0 environment info:
    System:
      OS: Windows 10 10.0.19042
    Binaries:
      Node: 12.15.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.11 - C:\Users\jzhou\AppData\Roaming\npm\yarn.CMD
      npm: 7.21.0 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version     2020.3.0.0 AI-203.7717.56.2031.7621141
    npmPackages:
      expo: ^42.0.0 => 42.0.0
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: managed

I’m trying to build an ios app for enterprise distribution with my account role as “Developer”. Unfortunately, I’m running into an Access Forbidden error.

expo build:ios -t archive  

Checking if there is a build in progress...

Accessing credentials for johnzhou in project hid
√ Do you have access to the Apple account that will be used for submitting this app to the App Store? ... yes

› Log in to your Apple Developer account to continue
√ Apple ID: ... ****
› Restoring session ****
› Team ****
› Provider ****
√ Logged in Local session
  Linking bundle identifier ****

Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 3)


Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 2)


Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 1)

  Syncing capabilities
Failed to prepare all credentials.

This issue is similiar to expo build:ios returns: Apple 403 detected - Access forbidden but that solution does not work for me. Neither does this: Apple 403 detected - Access forbidden · Issue #3807 · expo/expo-cli · GitHub

I strongly suspect this is because I have a Developer role rather than an Admin role in the Apple enterprise account. Can I get a confirmation?

Hi. I am having the same issue trying to build the iOS application and getting the 403 error.
But I have an Admin role in the Apple enterprise account.

Here’s the full log:

✔ Choose the build type you would like: › archive

Checking if there is a build in progress...

Accessing credentials for dyy in project ****
✔ Do you have access to the Apple account that will be used for submitting this app to the App Store? … yes

› Log in to your Apple Developer account to continue
✔ Apple ID: … ****@****.***
› Restoring session /Users/****/.app-store/auth/****@****.***/cookie
✔ Select a Team › **** - Company/Organization (****)
› Provider **** (****)
✔ Switched to provider: **** (****)
✔ Logged in Local session

Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 3)


Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 2)


Network Timeout: 'AccessForbiddenError', 'Apple 403 detected - Access forbidden'. Retrying after 3 seconds (remaining: 1)

  Linking bundle identifier com.****.****
Failed to prepare all credentials. 
The next time you build, we will automatically use the following configuration:

Project Credential Configuration:
  Experience: @dyy/****, bundle identifier: com.****.****
    Provisioning profile (ID: ****)
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)

  Distribution Certificate - Certificate ID: ****
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)
  Push Notifications Key - Key ID: ****
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)
Apple 403 detected - Access forbidden
Error: Apple 403 detected - Access forbidden

Ok, so I updated expo-cli version earlier today, before I got the 403 error.
I downgraded expo-cli version (4.11.0 → 4.10.1) and now I am getting more information in the error:

✔ Apple ID: … ****@****.***
› Restoring session /users/****/.app-store/auth/****@****.***/cookie
✔ Select a Team › **** - Company/Organization (****)
› Provider **** (****)
✔ Switched to provider: **** (****)
✔ Logged in Local session
✖ Failed to register bundle identifier com.****.****
Failed to prepare all credentials. 
The next time you build, we will automatically use the following configuration:

Project Credential Configuration:
  Experience: @dyy/****, bundle identifier: com.****.****
    Provisioning profile (ID: ****)
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)

  Distribution Certificate - Certificate ID: ****
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)
  Push Notifications Key - Key ID: ****
    Apple Team ID: ****,  Apple Team Name: **** (Company/Organization)
Unable to process request - PLA Update available - You currently don't have access to this membership resource. To resolve this issue, your team's Account Holder, J*** A***, must agree to the latest Program License Agreement.
UnexpectedAppleResponse: Unable to process request - PLA Update available - You currently don't have access to this membership resource. To resolve this issue, your team's Account Holder, J*** A***, must agree to the latest Program License Agreement.
2 Likes

I’ve asked account holder to sign all of the agreements and I was able to build and push the app without any issues. This resolves my issue with the 403 error.

I guess that expo-cli v4.11.0 is missing error description for that particular error, though it was fine in v4.10.1

1 Like

I had this problem too and you just need to accept the agreements and terms.

1 Like

Which agreements because I have accepted all the agreements I can see. is this something the admin needs to do?

Which agreements? where?

Login to appstoreconnect as the admin user and it should prompt you about the updated agreement.

1 Like

I have the same error with

❯ expo --version
4.12.10

Is there a way to pass a --verbose flag to get the entire stack trace?

EXPO_DEBUG=1 EXPO_APP_STORE_DEBUG=1 expo <command>

1 Like

Thanks @notbrent

It seams i get a 403 error

Error: Request failed with status code 403 (POST https://developer.apple.com/services-account/v1/bundleIds)

I deleted my stored credentials with

rm -rf .app-store/

and I will try to downgrade expo-cli for now

Apple updated their terms of service not long ago. Try logging into https://appstoreconnect.apple.com/ and see if it prompts you to agree to the updated terms. That could potentially explain the 403 error you’re getting.

1 Like

I just got this prompt (and not the regular accept terms in red or yellow I can’t remember :sweat_smile:)

Bring me here Updated App Store Submission - App Store Connect - Apple Developer
1.

But I don’t think it’s the issue.

As @johnzhou said I have a feeling it’s related to the permissions rôles.
With this organization, my user access role is developer.
I didn’t encounter this problem last week —with another client— as an organization admin


Edit
I landed on the official documentation
https://developer.apple.com/support/roles/


from my understanding, as a developer, you have limited access

1 Like

we released a new expo-cli version today that handles this error better, but because i can’t reproduce it on my account i’m not sure about the details of what exactly is happening on your end. let me know what you find

This was happening to me until the owner made my account admin instead of developer.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.