# Travis Builds Failing - Even Previously Passing Builds

**URL:** <https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517>\
**Category:** Deployment\
**Tags:** travis-build\
**Created:** [January 11, 2023, 9:36pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517 "2023-01-11T21:36:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 9:36pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/1 "2023-01-11T21:36:42Z")

</div>

As of January 11, 2023 all my travis builds are failing. I tested the builds locally and they are not throwing any errors. I even re-ran a build that passed yesterday afternoon (1/10/2023) and now that build is also failing and throwing the same error as all recent builds from today. My git repo is clean, so this error makes no sense to me and it passes all tests locally. I believe the error is a product of the new deployed changes to Travis CI. The error I’m getting is:

**[error]** **There are uncommitted changes on the source repository (listed above). Commit, stash, or remove these changes before deploying, or use the --ignore-dirty flag. Additional guidance is available at [https://support.acquia.com/hc/en-us/articles/360035204013-Dirty-BLT-source-directory-prevents-deploys.](https://support.acquia.com/hc/en-us/articles/360035204013-Dirty-BLT-source-directory-prevents-deploys.)**

Raw log: [https://api.travis-ci.com/v3/job/593100209/log.txt?log.token=OM6eooiXf9p3YyXs3gU-Tw](https://api.travis-ci.com/v3/job/593100209/log.txt?log.token=OM6eooiXf9p3YyXs3gU-Tw)

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 9:50pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/2 "2023-01-11T21:50:47Z")

</div>

Hi @sakibahmed91,

This has to do with your source repo, so nothing you do related to deploys. In your `.gitignore` file add:

```auto
/travis_wait*

```

Then retry, let me know if that works.

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:04pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/3 "2023-01-11T22:04:27Z")

</div>

Hi Montana,

I already have that line in my .gitignore file. My builds are still failing and this issue started today.

Is there anything else I can try?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 10:11pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/4 "2023-01-11T22:11:57Z")

</div>

Hey,

I haven’t seen your `.travis.yml` but I’m assuming you’re using `composer-merge-plugin`, and I don’t recommend that unless you have a super specific need for it, not because it’s a bad project or anything but just because it can lead to so many unexpected edge cases like this.

Composer wasn’t built to have dependencies “sideloaded”, in turn you get weird outcomes like this. BLT used `composer-merge-plugin` up to version 10, and then removed it for these reasons. Maybe try downgrading the version of BLT you’re using.

I do see the log, but it’d be easier for me to parse through the original `.travis.yml`.

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:16pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/5 "2023-01-11T22:16:12Z")

</div>

I’m using BLT 13.7 (latest version).

Here is my .travis.yml. I had no issues deploying this build yesterday. Nothing has changed on my end.

```auto
sudo: true
language: php
dist: xenial

# Adjust the version of PHP to match your production environment.
# Making this version number greater than the production environment can have unintended consequences
# including a non-functional prod environment.
php: "8.1.10"

matrix:
  fast_finish: true

jdk:
  - oraclejdk8

env:
  global:
    - COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
    - BLT_TRAVIS_DIR=$TRAVIS_BUILD_DIR/vendor/acquia/blt-travis
    - BUILD_DIR=$TRAVIS_BUILD_DIR

cache:
  bundler: true
  apt: true
  directories:
    - "$HOME/.composer/cache"
    - "$HOME/.drush/cache"
    - "$HOME/.npm"
    - "$HOME/.nvm"
    - ".rules"
  # Cache front end dependencies to dramatically improve build time.
  # - "docroot/themes/custom/mytheme/node_modules"
  # - "docroot/themes/custom/mytheme/bower_components"

services:
- mysql
- xvfb

addons:
  ssh_known_hosts:
     - svn-29892.prod.hosting.acquia.com
  chrome: stable

# @see https://docs.travis-ci.com/user/notifications
# notifications:
# - hipchat: [api token]@[room id or name]
# - slack: '<account>:<token>#[channel]'

before_install:
  # Disable xdebug.
  - phpenv config-rm xdebug.ini
  - composer self-update --2
  - composer validate --no-check-all --ansi
  - composer install
  # Exit build early if only documentation was changed in a Pull Request.
  - source ${BLT_TRAVIS_DIR}/scripts/exit_early

install:
  - source ${BLT_TRAVIS_DIR}/scripts/setup_environment
  - source ${BLT_TRAVIS_DIR}/scripts/setup_project

script:
  # Uncomment these lines to test database updates using live content.
  # - blt drupal:sync:default:site
  - blt blt:telemetry:disable --no-interaction
  - source ${BLT_TRAVIS_DIR}/scripts/run_tests
  - source ${BLT_TRAVIS_DIR}/scripts/simulate_deploy

deploy:
   - provider: script
     script: "${BLT_TRAVIS_DIR}/scripts/deploy_branch"
     skip_cleanup: true
     on:
       branch: master
       php: 8.1.10
   - provider: script
     script: "${BLT_TRAVIS_DIR}/scripts/deploy_tag"
     skip_cleanup: true
     on:
       tags: true
       php: 8.1.10

```

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 10:18pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/6 "2023-01-11T22:18:53Z")

</div>

Just to see if this works can you downgrade BLT to `9.2.4` and then retry?

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:20pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/7 "2023-01-11T22:20:01Z")

</div>

I cannot downgrade BLT. My project is built on Drupal 9 which requires BLT 12, which is EOL now, and the latest version is BLT 13.

---

<div class="post-metadata">

**Author:** ![justclint](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/justclint/32/6776_2.png) [@justclint](https://travis-ci.community/u/justclint)\
**Post date:** [January 11, 2023, 10:21pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/8 "2023-01-11T22:21:17Z")

</div>

We just started seeing this today as well. In the past its been caused by `source ${BLT_TRAVIS_DIR}/scripts/simulate_deploy`. Im debugging right now but you can try removing that for now.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 10:26pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/9 "2023-01-11T22:26:29Z")

</div>

Try adding in your `.travis.yml` file:

```yaml
composer update drupal/core --with-all-dependencies

```

Also try in your `before_script` having this line:

```yaml
composer self-update 2.0.14

```

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:29pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/10 "2023-01-11T22:29:48Z")

</div>

Unfortunately, that did not work.

---

<div class="post-metadata">

**Author:** ![justclint](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/justclint/32/6776_2.png) [@justclint](https://travis-ci.community/u/justclint)\
**Post date:** [January 11, 2023, 10:29pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/11 "2023-01-11T22:29:53Z")

</div>

Im not sure what is adding this yet but this is the problem file:

```auto
0.02s$ git status
HEAD detached at 229abe8
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	LICENSE.chromedriver

```

Try adding `- rm LICENSE.chromedriver` before the simulate deploy

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 10:33pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/12 "2023-01-11T22:33:06Z")

</div>

Have you tried running `git stash`?

This takes the dirty state of your working directory — that is, your modified tracked files and staged changes — and saves it on a stack of unfinished changes that you can reapply at any time (even on a different branch), or try removing the Chromedriver license.

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:40pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/13 "2023-01-11T22:40:14Z")

</div>

Thanks, this worked!

---

<div class="post-metadata">

**Author:** ![sakibahmed91](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sakibahmed91/32/8437_2.png) [@sakibahmed91](https://travis-ci.community/u/sakibahmed91)\
**Post date:** [January 11, 2023, 10:40pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/14 "2023-01-11T22:40:58Z")

</div>

Thanks, I appreciate the help. Removing the file before simulate deploy solved the problem.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [January 11, 2023, 10:42pm UTC](https://travis-ci.community/t/travis-builds-failing-even-previously-passing-builds/13517/15 "2023-01-11T22:42:43Z")

</div>

Hi @sakibahmed91,

Great to hear!
