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:

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:

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:

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:

However, Travis Build history now lists #79 as successful and links to an entirely different build:

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 and the passing job with correct settings is on

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 and Pick one of them and disable Travis integration for the other in or, correspondingly.

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

1 Like