EAS Build - Azure Pipeline - Git exited with Non-Zero Code: 128

I am running into a an issue incorporating EAS build into a build pipeline for our mobile app (android only at the moment). Here is the full DEBUG=* log from the build script.

I also have the EXPO_TOKEN set and EAS_BUILD_AUTOCOMMIT set as well.

It looks like it’s failing to commit the changes after auto-incrementing the build version, but I am at a loss as to why (the repo is in Azure as well). At the moment I am not running any other tasks other than ‘npm ci’ in the pipeline.

I am running eas-cli 0.34.0, and have also included the new "cli": { "requireCommit": true } property in my eas.json file.

2021-11-02T15:18:58.1642684Z ##[section]Starting: build
2021-11-02T15:18:58.1651155Z ==============================================================================
2021-11-02T15:18:58.1651452Z Task         : Command line
2021-11-02T15:18:58.1651741Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-11-02T15:18:58.1651998Z Version      : 2.182.0
2021-11-02T15:18:58.1652212Z Author       : Microsoft Corporation
2021-11-02T15:18:58.1652502Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-11-02T15:18:58.1652829Z ==============================================================================
2021-11-02T15:18:58.2883901Z Generating script.
2021-11-02T15:18:58.2890447Z Script contents:
2021-11-02T15:18:58.2891359Z npx eas-cli build --platform android --profile development --non-interactive
2021-11-02T15:18:58.2891881Z ========================== Starting Command Output ===========================
2021-11-02T15:18:58.2911132Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/142db220-4168-409d-871d-9f2bd75213ad.sh
2021-11-02T15:19:11.0781709Z npx: installed 318 in 12.736s
2021-11-02T15:19:11.1477764Z 2021-11-02T15:19:11.146Z @oclif/config reading core plugin /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli
2021-11-02T15:19:11.1478590Z 2021-11-02T15:19:11.146Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/package.json
2021-11-02T15:19:11.1490898Z 2021-11-02T15:19:11.148Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/oclif.manifest.json
2021-11-02T15:19:11.1493765Z 2021-11-02T15:19:11.149Z @oclif/config:eas-cli using manifest from /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/oclif.manifest.json
2021-11-02T15:19:11.1510580Z 2021-11-02T15:19:11.150Z @oclif/config reading user plugins pjson /home/vsts/.local/share/eas-cli/package.json
2021-11-02T15:19:11.1511285Z 2021-11-02T15:19:11.150Z @oclif/config loadJSON /home/vsts/.local/share/eas-cli/package.json
2021-11-02T15:19:11.1531348Z 2021-11-02T15:19:11.150Z @oclif/config loading plugins [ '@oclif/plugin-help', '@expo/plugin-warn-if-update-available' ]
2021-11-02T15:19:11.1532202Z 2021-11-02T15:19:11.152Z @oclif/config reading core plugin /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help
2021-11-02T15:19:11.1534927Z 2021-11-02T15:19:11.152Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/package.json
2021-11-02T15:19:11.1535948Z 2021-11-02T15:19:11.152Z @oclif/config reading core plugin /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available
2021-11-02T15:19:11.1536810Z 2021-11-02T15:19:11.152Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/package.json
2021-11-02T15:19:11.1539905Z 2021-11-02T15:19:11.153Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json
2021-11-02T15:19:11.1544211Z 2021-11-02T15:19:11.153Z @oclif/config loadJSON /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/oclif.manifest.json
2021-11-02T15:19:11.1545159Z 2021-11-02T15:19:11.153Z @oclif/config:@oclif/plugin-help using manifest from /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json
2021-11-02T15:19:11.1546160Z 2021-11-02T15:19:11.154Z @oclif/config:@expo/plugin-warn-if-update-available using manifest from /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/oclif.manifest.json
2021-11-02T15:19:11.1548563Z 2021-11-02T15:19:11.154Z @oclif/config config done
2021-11-02T15:19:11.1549145Z 2021-11-02T15:19:11.154Z @oclif/config start init hook
2021-11-02T15:19:11.1565474Z 2021-11-02T15:19:11.155Z eas:@expo/plugin-warn-if-update-available:hooks:init start /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/lib/hooks/init/check-update
2021-11-02T15:19:11.1810282Z 2021-11-02T15:19:11.180Z update-check Error: ENOENT: no such file or directory, stat '/home/vsts/.cache/eas-cli/version'
2021-11-02T15:19:11.1811106Z 2021-11-02T15:19:11.180Z update-check spawning version refresh
2021-11-02T15:19:11.1835961Z 2021-11-02T15:19:11.183Z eas:@expo/plugin-warn-if-update-available:hooks:init done
2021-11-02T15:19:11.1837022Z 2021-11-02T15:19:11.183Z @oclif/config init hook done
2021-11-02T15:19:11.1845592Z 2021-11-02T15:19:11.183Z eas init version: @oclif/command@1.8.0 argv: [ 'build', '--platform', 'android', '--profile', 'development', '--non-interactive' ]
2021-11-02T15:19:11.1878560Z 2021-11-02T15:19:11.187Z @oclif/config runCommand build [ '--platform', 'android', '--profile', 'development', '--non-interactive' ]
2021-11-02T15:19:11.1938741Z 2021-11-02T15:19:11.190Z @oclif/config:eas-cli require /home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/commands/build/index.js
2021-11-02T15:19:11.9151937Z 2021-11-02T15:19:11.914Z @oclif/config start prerun hook
2021-11-02T15:19:11.9157546Z 2021-11-02T15:19:11.914Z @oclif/config prerun hook done
2021-11-02T15:19:11.9159048Z 2021-11-02T15:19:11.915Z eas:build init version: @oclif/command@1.8.0 argv: [ '--platform', 'android', '--profile', 'development', '--non-interactive' ]
2021-11-02T15:19:12.4688387Z - Linking to project @****/****
2021-11-02T15:19:12.7421604Z ✔ Linked to project @******** (​https://expo.dev/accounts/****​)
2021-11-02T15:19:13.7799546Z ✔ Using remote Android credentials (Expo server)
2021-11-02T15:19:14.2874104Z ✔ Using Keystore from configuration: Build Credentials ********* (default)
2021-11-02T15:19:14.2887355Z 
2021-11-02T15:19:14.2893661Z Bumping expo.android.versionCode from 34 to 35
2021-11-02T15:19:14.3059292Z 
2021-11-02T15:19:14.5841829Z Error: git exited with non-zero code: 128
2021-11-02T15:19:14.5843747Z     at ChildProcess.completionListener (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
2021-11-02T15:19:14.5853637Z     at Object.onceWrapper (events.js:520:26)
2021-11-02T15:19:14.5854321Z     at ChildProcess.emit (events.js:400:28)
2021-11-02T15:19:14.5854841Z     at maybeClose (internal/child_process.js:1058:16)
2021-11-02T15:19:14.5855388Z     at Socket.<anonymous> (internal/child_process.js:443:11)
2021-11-02T15:19:14.5858995Z     at Socket.emit (events.js:400:28)
2021-11-02T15:19:14.5860527Z     at Pipe.<anonymous> (net.js:686:12)
2021-11-02T15:19:14.5860983Z     ...
2021-11-02T15:19:14.5862105Z     at spawnAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
2021-11-02T15:19:14.5863031Z     at GitClient.commitAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/vcs/clients/git.js:42:41)
2021-11-02T15:19:14.5864283Z     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-11-02T15:19:14.5865257Z     at async reviewAndCommitChangesAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/build/utils/repository.js:113:9)
2021-11-02T15:19:14.5866141Z     at async prepareBuildRequestForPlatformAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/build/build.js:39:9)
2021-11-02T15:19:14.5867022Z     at async prepareAndroidBuildAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/build/android/build.js:42:12)
2021-11-02T15:19:14.5867876Z     at async Build.startBuildAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/commands/build/index.js:193:37)
2021-11-02T15:19:14.5868762Z     at async Build.prepareAndStartBuildAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/commands/build/index.js:184:23)
2021-11-02T15:19:14.5869614Z     at async Build.runAsync (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/build/commands/build/index.js:73:53)
2021-11-02T15:19:14.5870473Z     at async Build._run (/home/vsts/.npm/_npx/2277/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/command.js:43:20)
2021-11-02T15:19:15.0294080Z ##[error]Bash exited with code '1'.
2021-11-02T15:19:15.0337524Z ##[section]Finishing: build

it looks like this means git isn’t properly set up on your azure worker. How to resolve "git did not exit cleanly (exit code 128)" error on TortoiseGit? - Stack Overflow

Appreciate the help! Wish the build would propagate the Git errors. Took a bit of trial and error with various git commands in our pipeline to track down the error.

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