# Heroku Deployment Failure

**URL:** <https://travis-ci.community/t/heroku-deployment-failure/6881>\
**Category:** Deployment\
**Tags:** dpl-heroku\
**Created:** [January 16, 2020, 4:49am UTC](https://travis-ci.community/t/heroku-deployment-failure/6881 "2020-01-16T04:49:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drichards211](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/drichards211/32/3653_2.png) [@drichards211](https://travis-ci.community/u/drichards211)\
**Post date:** [January 16, 2020, 4:49am UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/1 "2020-01-16T04:49:32Z")

</div>

My app deployment to Heroku stopped working one day ago, (January 14th). I received the error: “API request failed. Message: Invalid credentials provided.”

This app has been online for many months and I’ve never had issues with deployment before. I use GitHub for version control. Testing and deployment to Heroku are automatically performed by Travis CI when any updates are pushed to the Master branch.

Here’s a link to the latest broken build: [https://travis-ci.org/drichards211/revuer/builds/637772527](https://travis-ci.org/drichards211/revuer/builds/637772527)

221 The command “npm test” exited with 0.  
222 store build cache  
224  
225 1.66s$ rvm $(travis\_internal\_ruby) --fuzzy do ruby -S gem install dpl  
226 Successfully installed dpl-1.10.14  
227 1 gem installed  
228  
229 Installing deploy dependencies  
230 Successfully installed multipart-post-2.1.1  
231 Successfully installed faraday-1.0.0  
232 Successfully installed rendezvous-0.1.3  
233 Successfully installed netrc-0.11.0  
234 Successfully installed dpl-heroku-1.10.14  
235 5 gems installed  
236  
237 API request failed.  
238 Message: Invalid credentials provided.  
239 Reference:  
240 Preparing deploy  
241  
242 failed to deploy

Nothing has changed on my end. I’ve updated all Node dependencies as a broad-spectrum inoculant, but the problem appears after the tests successfully complete and deployment is attempted by Travis. There appears to be a credentials handshake issue between Travis CI and Heroku.

Is there any chance this is a bug with the latest build?: “[skip ci] command is respected under all circumstances”

> **[Travis CI changelog](https://changelog.travis-ci.com/)**
>
> Travis CI changelog

---

<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 16, 2020, 1:32pm UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/2 "2020-01-16T13:32:23Z")

</div>

Thanks for the report. We will take a look. I don’t think that change is related to this issue.

---

<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 16, 2020, 2:49pm UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/3 "2020-01-16T14:49:24Z")

</div>

We took a look, but can’t quite reason about why it started failing for you. Could you try re-encrypting your API key and let us know how it works for you?

---

<div class="post-metadata">

**Author:** ![drichards211](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/drichards211/32/3653_2.png) [@drichards211](https://travis-ci.community/u/drichards211)\
**Post date:** [January 17, 2020, 2:43am UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/4 "2020-01-17T02:43:46Z")

</div>

Thank you for taking a look at this. I’ve updated my API Token with Heroku. I entered: “travis setup heroku --force” from the command line to encrypt and embed the new API key into .travis.yml

Pushed the changes to the master branch on GitHub and I’m still receiving the same error. The app won’t deploy. I’ve tried opening a ticket with Heroku, but they won’t accept tickets on free applications, even though I’m paying for enhanced Dyno access. 😕

---

<div class="post-metadata">

**Author:** ![drichards211](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/drichards211/32/3653_2.png) [@drichards211](https://travis-ci.community/u/drichards211)\
**Post date:** [January 17, 2020, 10:02pm UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/5 "2020-01-17T22:02:48Z")

</div>

After 24 hours, I re-encrypted the Heroku API token, again, and updated the value with .travis.yml. This time it actually worked; a successful deployment. No other changes. Mystifying.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [January 4, 2021, 2:50pm UTC](https://travis-ci.community/t/heroku-deployment-failure/6881/6 "2021-01-04T14:50:03Z")

</div>

2 posts were split to a new topic: [`travis encrypt` return a different secret value every time](https://travis-ci.community/t/travis-encrypt-return-a-different-secret-value-every-time/10960)
