expo-github-action and eas-cli: GraphQL error

I’m using a expo-github-action to run eas build, and running into CombinedError: [GraphQL] Unexpected server error.

It’s also worthy of note that the Android build keeps running after the GitHub action fails.

Command I’m running inside the GH action:
eas build --platform all --profile ${{ github.event.inputs.releaseStage }} --non-interactive

We’re not using the expo cli, so can’t run expo diagnostics at the moment. What else can I do to debug this?

We’re seeing this as well but on iOS, with a very similar command:

eas build --profile release --platform ios --non-interactive --no-wait

The build does not queue or run with the iOS version.

Removing both --non-interactive and --no-wait does not help either.

The build does run on EAS successfully with Android, I may add: Build Details — 3e49b489-3b67-463d-bb09-c30edad1d75d — abacus — Expo

Expo builds work as expected using the Classic style.

hi there! so if you run this command locally, this is not working? what version of eas-cli do you have installed?

Appreciate you taking a look.

$ eas -v
eas-cli/0.22.1 darwin-x64 node-v14.16.1

Running this command locally fails to create a build on Expo:

eas build --profile release --platform ios

Running this command locally successfully creates a build on Expo using EAS:

eas build --profile release --platform android

I have not tried the eas build --clear-cache --local -p ios --profile=release yet, but am doing so now.

can you run DEBUG=* EXPO_DEBUG=1 eas build --profile release --platform ios and share the output? can you also share your eas.json?

Here you go:

  @oclif/config reading core plugin /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli +0ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/package.json +0ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/oclif.manifest.json +3ms
  @oclif/config:eas-cli using manifest from /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/oclif.manifest.json +0ms
  @oclif/config reading user plugins pjson /Users/ed/.local/share/eas-cli/package.json +0ms
  @oclif/config loadJSON /Users/ed/.local/share/eas-cli/package.json +2ms
  @oclif/config loading plugins [ '@oclif/plugin-help', '@expo/plugin-warn-if-update-available' ] +1ms
  @oclif/config reading core plugin /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help +0ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/package.json +2ms
  @oclif/config reading core plugin /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available +0ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/package.json +0ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json +1ms
  @oclif/config loadJSON /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/oclif.manifest.json +0ms
  @oclif/config:@oclif/plugin-help using manifest from /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json
+0ms
  @oclif/config:@expo/plugin-warn-if-update-available using manifest from /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if
-update-available/oclif.manifest.json +0ms
  @oclif/config config done +4ms
  @oclif/config start init hook +0ms
  eas:@expo/plugin-warn-if-update-available:hooks:init start /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-avail
able/lib/hooks/init/check-update +0ms
  eas:@expo/plugin-warn-if-update-available:hooks:init done +27ms
  @oclif/config init hook done +28ms
  eas init version: @oclif/command@1.8.0 argv: [ 'build', '--profile', 'release', '--platform', 'ios', '--non-interactive', '--no-wait' ] +0ms
  @oclif/config runCommand build [ '--profile', 'release', '--platform', 'ios', '--non-interactive', '--no-wait' ] +4ms
  @oclif/config:eas-cli require /Users/ed/.volta/tools/image/packages/eas-cli/lib/node_modules/eas-cli/build/commands/build/index.js +38ms
  @oclif/config start prerun hook +900ms
  @oclif/config prerun hook done +1ms
  babel program.body[0] ImportDeclaration: enter +0ms
  babel program.body[0] ImportDeclaration: Recursing into... +1ms
... <snipping 100s of lines of babel> ...
  babel program.body[0].specifiers[0] ImportSpecifier: enter +0ms
  babel program.body[0].specifiers[0] ImportSpecifier: Recursing into... +0ms  babel program.body[1].expression AssignmentExpression: exit +0ms
  babel program.body[1] ExpressionStatement: exit +0ms
✔ Linked to project @abacus-card/abacus
✔ Using remote iOS credentials (Expo server)

Distribution Certificate is not validated for non-interactive builds.
Skipping Provisioning Profile validation on Apple Servers because we aren't authenticated.

Project Credentials Configuration:
  Project: @XXX/XXX
  Bundle Identifier: com.XXX.XXX
  Configuration: App Store

  Distribution Certificate:
    Serial Number: XXX
    Expiration Date: Thu, 10 Feb 2022 15:33:15 EST
    Apple Team: XXX
    Updated 5 months ago

  Provisioning Profile:
    Developer Portal ID: XXX
    Status: active
    Expiration Date: Thu, 10 Feb 2022 15:33:15 EST
    Apple Team: XXX
    Updated 51 minutes ago

All credentials are ready to build @XXX/XXX (com.XXX.XXX)

✔ Compressed project files 3s (47.2 MB)
✔ Uploaded to EAS 14s
Starting iOS build
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, please report the issue.

And the eas.json file:


  "builds": {
    "android": {
      "base": {
        "workflow": "managed",
        "buildType": "development-client",
        "distribution": "internal"
      },
      "release": {
        "extends": "base",
        "buildType": "app-bundle",
        "distribution": "store",
        "releaseChannel": "production-11",
        "env": {
          "API_URL": "https://XXX",
          "BUILD_ENV": "release"
        }
      },
      "staging": {
        "extends": "base",
        "buildType": "apk",
        "releaseChannel": "staging"
      },
      "local": {
        "extends": "base",
        "buildType": "development-client",
        "releaseChannel": "local"
      }
    },
    "ios": {
      "base": {
        "workflow": "managed",
        "autoIncrement": "false"
      },
      "release": {
        "extends": "base",
        "distribution": "store",
        "releaseChannel": "production-11",
        "env": {
          "API_URL": "https://XXX",
          "BUILD_ENV": "release"
        }
      },
      "staging": {
        "extends": "base",
        "releaseChannel": "staging",
        "distribution": "internal"
      },
      "local": {
        "extends": "base",
        "buildType": "development-client",
        "releaseChannel": "local"
      }
    }
  }
}

I’ve redacted with XXX sensitive information.

could you share your app.json? you can share it privately with me if needed at brent@expo.io. you can remove api keys but please keep as much in tact as possible

also, did you attempt to run a build ~20 minutes ago and include the string “55” anywhere in your app config?

i can reproduce this by using the following in my app.json:

    "ios": {
      "buildNumber": 55,
      "supportsTablet": true,
      "bundleIdentifier": "com.notbrent.example"
    },

notice the buildNumber is a number and not a string. this is invalid and we should be rejecting it, but we’re not. using expo tools in vscode you can see this:


solution: change your ios.buildNumber to a string, try again

AFAIK, we did not submit a build with 55 as the ios.buildNumber.

@notbrent - I’ve sent you our app.json and app.config.ts to the brent@expo.io email address.

For our ios.buildNumber, we use the following string composition:

export const FULL_BUILD_NUMBER = `1.${VERSION}.${BUILD_NUMBER}`

which is used in the following snippet:

...
const expoConfig = ({ config }: ConfigContext): ExpoConfig => {
  const computedConfig = {
    ...config,
    slug: 'abacus',
    name: 'Treasure',
    version: VERSION.toString(),
    ios: {
      ...config.ios,
      buildNumber: FULL_BUILD_NUMBER,
      googleServicesFile: `./GoogleService-Info-${SERVICES_FILE_SUFFIX}.plist`,
    },
...

It should be a string. Let me know if you’d like us to try anything more.

what is happening here?

i was able to start a build using your app.json and app.config.ts combination (with a couple unrelated changes) and it worked on my end.

it failed because of the above block about deleting the bundleIdentifier and android package, but that is expected…

what exactly are you seeing when you run this command? can you share the full cli output?

The Expo builds require ios.bundleIdentifier and android.package. The EAS builds have a deprecation warning when including these in app.json output.

In the EAS build context, we delete them from the resulting app.json.

is this a bare workflow project? you definitely should not see any such warning for a managed project

run expo diagnostics in your project and share the output.

if you have ios and android directories with native projects in your project and committed to git then the app.json is largely not used, instead the configuration in those projects will be used

Appreciate you diligently following up and digging in @brents and @notbrent .

Yes, we have ios and android directories, making it a bare project:

$ tree -d -L 1
.
├  android
├  assets
├  bin
├  components
├  e2e
├  ios
├  lib
├  mutations
├  node_modules
├  patches
├  screens
├  simulator
├  storybook
├  types
└  web-build

15 directories

Here’s the full CLI output with eas build for iOS (with some stuff redacted to XXX):

$ eas build -p ios --profile=release --skip-project-configuration
✔ Linked to project @XXX/XXX
✔ 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 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: … ed@XXX
› Restoring session /Users/ed/.app-store/auth/ed@XXX/cookie
› Team XXX. (XXX)
› Provider XXX. (XXX)
✔ Logged in Local session
✔ Bundle identifier registered com.XXX.XXX
✔ Synced capabilities: No updates
✔ Synced capability identifiers: No updates
✔ Fetched Apple distribution certificates
✔ Fetched Apple provisioning profiles

Project Credentials Configuration:
  Project: XXX/XXX
  Bundle Identifier: XXX
  Configuration: App Store

  Distribution Certificate:
    Serial Number: XXX
    Expiration Date: Thu, 10 Feb 2022 15:33:15 EST
    Apple Team: XXX (XXX (Company/Organization))
    Updated 5 months ago

  Provisioning Profile:
    Developer Portal ID: XXX
    Status: active
    Expiration Date: Thu, 10 Feb 2022 15:33:15 EST
    Apple Team: XXX (XXX (Company/Organization))
    Updated 2 days ago

All credentials are ready to build @XXX/XXX (XXX)

✔ Push Notifications setup for XXX
✔ Compressed project files 4s (47.2 MB)
✔ Uploaded to EAS 13s
Build request failed. Make sure you are using the latest eas-cli version. If the problem persists, please report the issue.
    CombinedError: [GraphQL] Unexpected server error.

So the payload looks like it reaches EAS, but there’s this CombinedError [GraphQL] Unexpected server error. and execution halts.

  1. Can you confirm that EAS uses GraphQL and this error is coming from the EAS build server?
  2. Builds for iOS via this workflow were working without changes as recently as 9 days ago. They stopped working around this time and haven’t worked since. Android continues to work as expected.

And my eas-cli version:

$ eas -v
eas-cli/0.22.1 darwin-x64 node-v14.16.1
  1. yes
  2. try building again from the last working commit, then diff from there to see what could have changed

(my guess is that there is some value in your native xcode project that is unexpected and causing this error. possibly the build number or version)

git bisect can be very useful for finding the commit that broke it (if that is what.happened.)

We managed to solve this on our end. In our case, it seemed to relate to the output of eas build being piped to another command, without set -o pipefail being called to exit the task properly.

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