# Odd error in one repo, works in another

**URL:** <https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [January 15, 2020, 4:05am UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859 "2020-01-15T04:05:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nemequ](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nemequ/32/3633_2.png) [@nemequ](https://travis-ci.community/u/nemequ)\
**Post date:** [January 15, 2020, 4:05am UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/1 "2020-01-15T04:05:57Z")

</div>

I’m getting a rather [unhelpful error message](https://travis-ci.org/nemequ/simde/jobs/637236163) from Travis:

> There was an error in the .travis.yml file from which we could not recover.
> 
> Unfortunately, we do not know much about this error.
> 
> Please review [https://docs.travis-ci.com](https://docs.travis-ci.com), or contact us at [support@travis-ci.com](mailto:support@travis-ci.com) with the error ID: a8a8adb30b6c4a65a2d4442534584721

The parser on [config.travis-ci.org](http://config.travis-ci.org) seems to deal with the file just fine, but the really weird thing is that I tested [the same commit (as in the commit IDs match) in a different repository](https://travis-ci.org/nemequ/ci-noise/builds/637233777) and it works perfectly.

---

<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 15, 2020, 8:18am UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/2 "2020-01-15T08:18:43Z")

</div>

Have you tried running the build in debug mode to see if you can get a more detailed error?

-Montana

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 15, 2020, 4:07pm UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/3 "2020-01-15T16:07:50Z")

</div>

It’s a bug on our code. I’ll take a look soon.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 15, 2020, 5:42pm UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/4 "2020-01-15T17:42:22Z")

</div>

OK. I’ve dug this a little deeper, and found the following. It’s not a bug, per se.

The problem here is that your configuration does not conform to the documented shape.

> **[Travis CI Documentation](https://docs.travis-ci.com/user/installing-dependencies#adding-apt-sources)**
>
> Installing Dependencies

It _should_ look like:

```auto
    addons:
      apt:
        sources:
          - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
            key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
        packages:
        - clang-9

```

Notice that `addons.apt.sources` is an array, not a hash/map, which is what you have in, e.g.,

> <https://github.com/nemequ/simde/blob/feaa0827374472105a9ea12b5793072ed562942f/.travis.yml#L34-L40>

It works in one of the repositories because that one has the configuration validator enabled, and it normalizes your configuration into something that we can use (see

> **[The Travis CI Blog: Build Config Validation now in beta](https://blog.travis-ci.com/2019-10-24-build-config-validation)**
>
> We are excited to announce the new Build Config Validation feature. It is now
> in beta, and available for you to activate.
> 
> When active, the build config validation
> feature will validate and normali...

  
for more information on this subject.), while the other does not use the validator, and it results in an error.

You should either fix your configuration, or enable the validator on the failing repo.

---

<div class="post-metadata">

**Author:** ![nemequ](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nemequ/32/3633_2.png) [@nemequ](https://travis-ci.community/u/nemequ)\
**Post date:** [January 15, 2020, 6:04pm UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/5 "2020-01-15T18:04:26Z")

</div>

Ah, that makes sense! I’ll fix my repo _and_ enable the validator.

It would be nice to have a better error message, but yeah that was a dumb mistake on my end. Sorry for the noise, but thank you very much for looking into this and explaining the problem.

Way off-topic: your name on here still says you’re on vacation until January 6.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 15, 2020, 6:18pm UTC](https://travis-ci.community/t/odd-error-in-one-repo-works-in-another/6859/6 "2020-01-15T18:18:28Z")

</div>

> [@nemequ](#):
>
> It would be nice to have a better error message

For a small class of configuration errors, we do. Other errors we have not seen, we unfortunately cannot. The validator will help us deal with this a little better.
