EAS Update bundle failure via Github Action

I’m running into trouble utilizing the eas update command via the Github Action sample code in the documentation. I’m using the bare workflow and the latest eas-cli.

The logs don’t say much -

2022-05-19T16:27:20.8063829Z - Linking to project @dreamstreets/streetbeacon
2022-05-19T16:27:20.9542859Z ✔ Linked to project @dreamstreets/streetbeacon (​https://expo.dev/accounts/dreamstreets/projects/streetbeacon​)
2022-05-19T16:27:21.3781064Z - Building bundle...
2022-05-19T16:27:27.7994522Z ✖ Failed to build bundle!
2022-05-19T16:27:27.8067368Z     Error: /home/runner/work/streetbeacon-app/streetbeacon-app/node_modules/ex
2022-05-19T16:27:27.8068323Z     po/bin/cli.js exited with non-zero code: 1

Can you help troubleshoot this further? The action and surrounding logs are pasted below.

Thanks,
Lou

Logs

2022-05-19T16:27:19.8643415Z ##[group]Run eas update --branch preview --message "test build"
2022-05-19T16:27:19.8644255Z e[36;1meas update --branch preview --message "test build"e[0m
2022-05-19T16:27:19.8706337Z shell: /usr/bin/bash -e {0}
2022-05-19T16:27:19.8706652Z env:
2022-05-19T16:27:19.8707235Z   EXPO_TOKEN: ***
2022-05-19T16:27:19.8707582Z   SSH_AUTH_SOCK: /tmp/ssh-RWwsfQ8UJpgP/agent.1721
2022-05-19T16:27:19.8707913Z   SSH_AGENT_PID: 1722
2022-05-19T16:27:19.8708200Z ##[endgroup]
2022-05-19T16:27:20.8063829Z - Linking to project @dreamstreets/streetbeacon
2022-05-19T16:27:20.9542859Z ✔ Linked to project @dreamstreets/streetbeacon (​https://expo.dev/accounts/dreamstreets/projects/streetbeacon​)
2022-05-19T16:27:21.3781064Z - Building bundle...
2022-05-19T16:27:27.7994522Z ✖ Failed to build bundle!
2022-05-19T16:27:27.8067368Z     Error: /home/runner/work/streetbeacon-app/streetbeacon-app/node_modules/ex
2022-05-19T16:27:27.8068323Z     po/bin/cli.js exited with non-zero code: 1
2022-05-19T16:27:27.8173448Z ##[error]Process completed with exit code 1.
2022-05-19T16:27:27.8220434Z Post job cleanup.
2022-05-19T16:27:27.8634618Z Stopping SSH agent
2022-05-19T16:27:27.8686973Z unset SSH_AUTH_SOCK;
2022-05-19T16:27:27.8687483Z unset SSH_AGENT_PID;

update.yml

name: update
on: push

jobs:
  update:
    name: EAS Update
    runs-on: ubuntu-latest
    steps:
      - name: Check for EXPO_TOKEN
        run: |
          if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
            echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
            exit 1
          fi

      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x
          cache: yarn

      - name: Setup Expo
        uses: expo/expo-github-action@v7
        with:
          expo-version: latest
          eas-version: latest
          token: ${{ secrets.EXPO_TOKEN }}

      - name: Find yarn cache
        id: yarn-cache-path
        run: echo "::set-output name=dir::$(yarn cache dir)"

      - name: Restore cache
        uses: actions/cache@v2
        with:
          path: ${{ steps.yarn-cache-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: ${{ runner.os }}-yarn-

      - name: Set SSH Key Agent
        uses: webfactory/ssh-agent@v0.5.4
        with:
          ssh-private-key: ${{ secrets.GEOBG_DEPLOY_KEY }}

      - name: Install dependencies
        run: yarn install --immutable

      - name: Extract branch name
        shell: bash
        run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
        id: extract_branch

      - name: Publish update
        run: eas update --branch ${{ steps.extract_branch.outputs.branch }} --message "${{ github.event.head_commit.message }}"

Try running yarn install before setting up expo. Not sure if that’s what the issue is, but this works for me:

steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16.x
          cache: 'yarn'
      - uses: actions/cache@v3
        with:
          path: node_modules
          key: ${{ runner.os }}-nm-${{ hashFiles('**/yarn.lock') }}
      - run: yarn install --frozen-lockfile
      - name: Setup Expo
        uses: expo/expo-github-action@v5
        with:
          expo-version: 5.x
          expo-token: ${{ secrets.EXPO_TOKEN }}
          expo-cache: true
      - name: Build on EAS
        run: npx eas-cli build --platform ios --non-interactive

Thanks for the suggestion @grossadamm I tried changing the order as you suggested and got the same error, unfortunately.

I wonder if there is a way to get additional debugging information from the eas update command? Looking at --help it doesn’t look like there is a --verbose option or the equivalent.

No idea sorry :frowning:

Problem solved. I found the seemingly undocumented EXPO_DEBUG=true environment variable which revealed the metro bundler logs, which revealed a problem with case-sensitivity.

2 Likes

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