Travis intermittently not providing secret environment tokens

For the past week or two I’ve been getting intermittent errors on Travis builds because the secret environment tokens are not being provided. Here is an example:
https://travis-ci.com/amclin/react-project-boilerplate/jobs/246369749

If I restart the job, it will likely succeed.

Here is a passing example from the previous build on the same branch just an hour previously:
https://travis-ci.com/amclin/react-project-boilerplate/jobs/246348937

If I look in the setting for the Travis project, it does not show my secret environment keys. It’s like Travis periodically is unable to establish that I have secret keys on this project. I have definitely provided them as Travis has been able to execute these steps in the past (just an hour previous as I linked).

I’ve been seeing this issue over the last week or two on this repo.

I don’t see either of those variables set anywhere.

Your builds are only succeeding if they don’t actually publish anything:

The local branch master is behind the remote one, therefore a new version won’t be published.

Something is weird here - I’m trying to find an example in the history, but the packages are definitely getting published:

Git commit 54d00f9 is the one that triggered the release 2.6.0, but in Travis when I search for that commit, the only build I can find is this one: https://travis-ci.com/amclin/react-project-boilerplate/builds/132191064

And that one doesn’t show the build that actually completed the publishing steps.

It may be unrelated, but I’ve also gotten email notifications about a failed job and when I follow the link it takes me to a job that shows successful.

The symptoms seem like Travis is spawning up multiple instances of a job and then deciding which one to keep as the “authoritative” result.

Travis is now showing that my project has secret tokens:

I assure you that an hour ago when I opened this conversation, the Environment Variables section of Settings was blank, and I changed no project settings or travis configs in Travis on any project in the interim. The only thing that happened in the interim was that another build was triggered.

As originally reported, Build #79, the failed one we are discussing, that I luckily saved the link for:
https://travis-ci.com/amclin/react-project-boilerplate/builds/132200918

However, Travis Build history now lists #79 as successful and links to an entirely different build:
https://travis-ci.org/amclin/react-project-boilerplate/builds/598746153

If I navigate to Settings from the failed build, the Environment Variables section is unpopulated.

If I navigate to Settings from the passing build, the Environment Variables section is correctly populated.

The difference seems to be URL. The failing job and missing settings is on travis-ci.com and the passing job with correct settings is on travis-ci.org.

If there are 2 different profiles for my project, on on .com and one on .org that would explain the symptoms I’m seeing, as there would be inherent race conditions between the two. I certainly did not create the profiles twice, and am unsure on the proper way to clean this up.

This means that your repo has integration set up for both travis-ci.org and travis-ci.com. Pick one of them and disable Travis integration for the other in https://travis-ci.org/account/repositories or https://travis-ci.com/account/repositories, correspondingly.

Yes, that clears it up. Thanks for supporting my rubber duck troubleshooting.

1 Like