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

eas build: Build request failed - CombinedError: [GraphQL] Entity not authorized: AccountEntity #1324

Closed
Cafe137 opened this issue Aug 31, 2022 · 31 comments
Assignees

Comments

@Cafe137
Copy link

Cafe137 commented Aug 31, 2022

Build/Submit details page URL

No response

Summary

✔ Uploaded to EAS 8s
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.
    CombinedError: [GraphQL] Entity not authorized: AccountEntity[****] (viewer = UserViewerContext[****], action = READ, 
    ruleIndex = -1)

There are some recent comments encountering the same problem in issue #694

Managed or bare?

Managed

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.4
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
      npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ^0.16.2 => 0.16.12 
      babel-preset-expo: 8.5.1 => 8.5.1 
      expo: ^43.0.0 => 43.0.4 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      eas-cli: 1.2.0
      expo-cli: 6.0.5
    Expo Workflow: managed
🎉 Didn't find any issues with the project!

Error output

eas build --platform=ios
An Expo user account is required to proceed.

Log in to EAS
✔ Email or username … ****
✔ Password … *********
» android: androidStatusBar.backgroundColor: Color conflicts with the splash.backgroundColor
» ios: expo-document-picker: Cannot configure iOS entitlements because neither the appleTeamId property, nor the environment variable EXPO_APPLE_TEAM_ID were defined.
✔ Using remote iOS credentials (Expo server)

If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the missing values manually and we can only run minimal validation on them.
✔ Do you want to log in to your Apple account? … yes

› Log in to your Apple Developer account to continue
✔ Apple ID: … ****
› Restoring session /Users/****/.app-store/auth/****/cookie
› Team **** (****)
› Provider **** (****)
✔ Logged in Local session
✔ Bundle identifier registered ****
✔ Synced capabilities: Enabled: Sign In with Apple
✔ Synced capability identifiers: No updates
✔ Fetched Apple distribution certificates
✔ Fetched Apple provisioning profiles
Provisioning profile (id: ****) is no longer valid
✔ Fetched Apple provisioning profiles
✔ Provisioning Profile - ID: ****
    Name: *[expo] **** AppStore ****
    Expiry: **** 
  Would you like to reuse the original profile? … yes
✔ Fetched Apple provisioning profiles
✔ Updated provisioning profile (****) with distribution certificate (****)
✔ Updated Expo profile for **** (****)

Project Credentials Configuration

Project                   ****
Bundle Identifier         ****
                          
App Store Configuration   
                          
Distribution Certificate  
Serial Number             ****
Expiration Date           ****
Apple Team                ****
Updated                   ****
                          
Provisioning Profile      
Developer Portal ID       ****
Status                    active
Expiration                ****
Apple Team                ****
Updated                   1 second ago
                          
All credentials are ready to build **** (****)

✔ Push Notifications setup for ****: ****

Compressing project files and uploading to EAS Build. Learn more: https://expo.fyi/eas-build-archive
✔ Uploaded to EAS 8s
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.
    CombinedError: [GraphQL] Entity not authorized: AccountEntity[****] (viewer = UserViewerContext[****], action = READ, 
    ruleIndex = -1)

Reproducible demo or steps to reproduce from a blank project

eas build
@Cafe137 Cafe137 added the needs review Issue is ready to be reviewed by a maintainer label Aug 31, 2022
@dsokal dsokal added needs more info and removed needs review Issue is ready to be reviewed by a maintainer labels Aug 31, 2022
@dsokal
Copy link
Contributor

dsokal commented Aug 31, 2022

Hi,
Thanks for reporting. Could you please share some details?

  • Do you have owner set in app.json?
  • Are you using a team / organization that has a different name than the username you're using with EAS CLI? You can check the username with eas whoami.

@dsokal dsokal self-assigned this Aug 31, 2022
@Cafe137
Copy link
Author

Cafe137 commented Aug 31, 2022

I missed an important piece - I could successfully and reliably build the project with eas build many times before. And seemingly nothing has changed since the last try (3 months ago).

  • Do you have owner set in app.json?

No, never had.

  • Are you using a team / organization that has a different name than the username you're using with EAS CLI? You can check the username with eas whoami.

expo and eas have the same user.

@dsokal
Copy link
Contributor

dsokal commented Aug 31, 2022

Can you share more details? What's your username? I can't help you without it.

@Cafe137
Copy link
Author

Cafe137 commented Aug 31, 2022

matesmajda

@dsokal
Copy link
Contributor

dsokal commented Aug 31, 2022

  1. Do you have projectId in app.json? Sth like in the screenshot:

Screenshot 2022-08-31 at 15 27 10

  1. Can you please install eas-cli@0.60.0 and let me know if it works for you on that version?
  2. If 2. doesn't work, stay on 0.60.0 but this time remove extra.eas.projectId from app.json.

@Cafe137
Copy link
Author

Cafe137 commented Aug 31, 2022

Yes I have projectId

2. seems to work:

✔ Uploaded to EAS 8s
⠸ Build in progress...

@Cafe137
Copy link
Author

Cafe137 commented Aug 31, 2022

OK can confirm 0.60.0 works.

I tried downgrading to 1.1.1 earlier today but the issue was present there as well.

@wschurman
Copy link
Member

Hi @Cafe137, I'm having trouble reproducing the issue on my end. To expedite my debugging, would you be able to clarify the following: It works on 0.60.0 and your app.json contains extra.eas.projectId?

@Cafe137
Copy link
Author

Cafe137 commented Sep 1, 2022

Hello @wschurman,

Yes it does work on 0.60.0.
And I do have app.json > expo > extra > eas > projectId.

Let me know if you want me to try a few more things to help debug this.

@dsokal dsokal assigned wschurman and unassigned dsokal Sep 1, 2022
@noorsheikh
Copy link

I had the exact same issue, the problem was the extra.eas.projectId in app.json file. I had projectId from another expo.dev account and the current logged in user was from my second account. Changing extra.eas.projectId to the projectId from my second account fixed the issue. So, always check if you have extra.eas.projectId from the same expo.dev account that you are logged in to through expo login or eas login.

@hbriese
Copy link

hbriese commented Sep 9, 2022

I have this issue on 2.1.0 and didn't have this issue on 0.60.0.
The owner of the projectId is an organization I am part of.
EAS build works fine (android & ios), however I encounter this error running the project on the dev-client so my current workaround is to exclude the projectId when doing so.

@hirehouse
Copy link

I also confirm that I was able to make it work with eas-cli@^0.60.0 without projectId in app.json (app.config.ts in my case)

@NajeebUllah161
Copy link

I had the exact same issue, the problem was the extra.eas.projectId in app.json file. I had projectId from another expo.dev account and the current logged in user was from my second account. Changing extra.eas.projectId to the projectId from my second account fixed the issue. So, always check if you have extra.eas.projectId from the same expo.dev account that you are logged in to through expo login or eas login.

You are LOVE <3

@frankcalise
Copy link

I have this issue on version 2.2.1 and not on 2.1.0 (although the project ID is for a different account that I do not have access to, the 2.1.0 version gave a nicer error message about it)

@UtkarshRana22
Copy link

For me this issue resolved when I switched to the account with which I had my keystore generated

@hellocaio
Copy link

I solved this issue by removing eas: projectId from app.json:

"extra": {
  "eas": {
    "projectId": "a1b2c3d4-e5f6-g7h8i9-j1k2-l3m4n5o6p7"
  }
}

I need a build for development, the company's Expo project ID is different than my account's project ID, thus the problem...

@firstChairCoder
Copy link

I have this issue on 2.1.0 and didn't have this issue on 0.60.0. The owner of the projectId is an organization I am part of. EAS build works fine (android & ios), however I encounter this error running the project on the dev-client so my current workaround is to exclude the projectId when doing so.

I can confirm this works for anyone that wants to run the project on expo-dev-client. Removing the extra.eas.projectId from app.json simply allows eas to create the project on your own Expo Profile.

It will also return the projectId key once created, so nothing lost, I guess...

@JotaErrE01
Copy link

I solved this issue by removing eas: projectId from app.json:

"extra": {
  "eas": {
    "projectId": "a1b2c3d4-e5f6-g7h8i9-j1k2-l3m4n5o6p7"
  }
}

I need a build for development, the company's Expo project ID is different than my account's project ID, thus the problem...

This works for me, thanks man!

@Davidsonjose
Copy link

I was running a build using another expo login details and a project id has been generated before, i removed the project in my app.json and ran the command again and it worked perfectly

@pencilcheck
Copy link

Removing it and let eas build generate it works for me too. but the error message is very weird.

Invalid app ID
Graphql request failed

@diemer
Copy link

diemer commented Apr 26, 2023

I'm also having this problem. For me, my account is a member of a legacy team account for one client, and an organization for another. No matter what I do, eas whoami shows the team account, which I think is the cause of my issues but I don't know how to resolve that.

@wschurman
Copy link
Member

@diemer - eas whoami shows the user you are logged in as. Your user is then a member of accounts. In your case, it is a member of your personal account (the account with the same name as your user) and an organization account of a different name. If your user is a member of both, it should have access to both. I don't know the exact error you are seeing but you can view your permissions on each of the accounts by navigating to the respective account's members settings page on the Expo website.

@wschurman
Copy link
Member

Going to close this out as it is working as expected. The solution is to ensure that the extra.eas.projectId in the app config is the expected project you are building. If this needs to dynamically change (for example, if one wants to build for separate projects) then using a dynamic config (app.config.js) is required: https://docs.expo.dev/workflow/configuration/.

@HermesSantos
Copy link

installing the eas-cli@0.60.0 worked for me, but now I have this message after eas build -p android --profile preview:
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, please report the issue.
CombinedError: [Network] upstream connect error or disconnect/reset before headers. reset reason: connection termination

@guillainbisimwa
Copy link

I Have also this issue:
image
with eas-cli/4.1.1 linux-x64 node-v20.5.0

@joshfavara
Copy link

joshfavara commented Aug 22, 2023

My solution was a little different.
I was receiving this error on eas-cli@2.7.1:

We've encountered a transient error. Try again shortly.
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, report the issue.

And then when I upgraded to eas-cli@4.1.2, I received this error:

This account has used its iOS builds from the Free plan this month, which will reset in 9 days (on Fri Sep 01 2023). Upgrade your plan for more builds with shorter wait times and longer timeouts, and to run more builds concurrently with a subscription plan.

So, my assumption is that the old version didn't have this error written in... super exciting.

@eylonshm7
Copy link

I was just logged in to another expo account by mistake 👍

@MeshalKhalid
Copy link

What worked for me was removing a commented line from my app.json file.

@ghost
Copy link

ghost commented Apr 24, 2024

I solved this issue by removing eas: projectId from app.json:

"extra": {
  "eas": {
    "projectId": "a1b2c3d4-e5f6-g7h8i9-j1k2-l3m4n5o6p7"
  }
}

I need a build for development, the company's Expo project ID is different than my account's project ID, thus the problem...

Thanks brother , it works finlly

@chungyu1108
Copy link

I got this issue [GraphQL] Entity not authorized: AccountEntity[33727d9d-bb0e-403f-b16a-a258bd21c10c] (viewer = RegularUserViewerContext[dae9ee5a-1133-4fbc-948e-2541f4c377b0], action = READ, ruleIndex = -1)

@Biantuadi
Copy link

this error means that you are logged as owner. remove this in app.json :

   "extra": {
      "eas": {
        "projectId": "Your project id"
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests