Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error deploying to Heroku, failed to run repack

I'm getting an error when deploying to Heroku after assets are compiled and the app is launched:

-----> Compiled slug size: 172.8MB
-----> Launching... done, v274
-----> Deploy hooks scheduled, check output in your logs
       http://mysite.com deployed to Heroku

Auto packing the repository for optimum performance.
error: Could not read ddb3b2358b3ea331cea15b03a8657f929364ec8c
fatal: Failed to traverse parents of commit c30cd906cd578d9618a4605cefa6e55ac535b42e
error: failed to run repack

The deploys appear to be finishing and the newest Ruby code is deployed, but my latest JS changes are not being served. Any thoughts on what might be happening?

like image 708
Peter Brown Avatar asked Nov 08 '13 18:11

Peter Brown


1 Answers

This is likely an issue caused by shallow clones. When you don't have a full history, the tree cannot be fully traversed resulting in dangling commits. This often occurs with CI systems where CI does a shallow clone to save on bandwidth and/or latency.

The best course of action to take is to avoid shallow clones.

If a full clone and force push doesn't do the trick, you may need to reset your repo. Resetting your repo re-initializes your app's repo to a bare repo. Your running application will not be affected. There is a utility plugin for resetting your repo on Heroku here:

https://github.com/heroku/heroku-repo

Once installed, run heroku repo:reset and then push again.

If the above techniques don't work, please log a support ticket.

like image 136
Naaman Newbold Avatar answered Oct 22 '22 15:10

Naaman Newbold