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: https://github.com/expo/expo-cli/issues/3807

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