Skip to content

Better error messages when fetching a buildpack fails #24

Closed
uhoh-itsmaciek opened this Issue Jan 16, 2014 · 7 comments

4 participants

@uhoh-itsmaciek

If a buildpack URL is specified incorrectly (or if the fetch dies for another reason), the error message is pretty generic:

Fetching repository, done.
Counting objects: 43, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (25/25), done.
Writing objects: 100% (25/25), 3.86 KiB | 0 bytes/s, done.
Total 25 (delta 17), reused 0 (delta 0)

-----> Deleting 4 files matching .slugignore patterns.
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-toolbelt.git

! Push rejected, failed to compile Multipack app

Would something like

git clone $url $dir >/dev/null 2>&1 || { echo "Could not download buildpack"; exit 1 }

make sense? Ideally, we'd get distinguish a 404 from other errors, too, but this could help.

@wkschwartz

:+1:

I'm using a custom buildpack as part of my .buildpacks suite and I'm having a hard time debugging my detect script since it just fails silently:

=====> Downloading Buildpack: https://github.com/Psudonym/redacted-custom-buildpack.git

 !     Push rejected, failed to compile Multipack app

With that error message, all I know is that the failure occurred some time after extracting the (correct) URL from my .buildpacks file and before it gets to the compile script from the custom buildpack (which would have produced some output that never came).

@ddollar
Owner
ddollar commented Jan 22, 2014

@deafbybeheading That error message seems good to me, PR happily accepted

@wkschwartz wkschwartz added a commit to EconomistsInc/heroku-buildpack-multi that referenced this issue Jan 22, 2014
@wkschwartz wkschwartz Fix #24: improve error messages during compilation 7f931e7
@wkschwartz

@ddollar I definitely think @deafbybeheading's error message is a good start, but I would encourage you to take a look at my PR as well, as it adds some more detail that's been helpful in my debugging a detect script.

@uhoh-itsmaciek

I think something like #25 makes sense. I'm not familiar enough with buildpacks to follow everything that's going on there, but the additional verbosity in the main buildpack steps would be very helpful.

@ddollar ddollar closed this Nov 7, 2014
@rreusser
rreusser commented Jul 1, 2015

It looks like pull request #25 was not merged due to excessive visual pollution. I'm stuck though trying to use browserify-rails. As per instructions, I've added the heroku-buildpack-multi config and a .buildpacks file:

# .buildpacks
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/heroku/heroku-buildpack-ruby.git

I have a Gemfile and package.json with what appear to be the required fields (based on a bit of googling. Can paste if interested, but it's not strictly the point.) I just get:

Counting objects: 75, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (75/75), 9.86 KiB | 0 bytes/s, done.
Total 75 (delta 45), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Removing .DS_Store files
remote: -----> Fetching custom git buildpack... done
remote: -----> Multipack app detected
remote: =====> Downloading Buildpack: .buildpacks
remote: 
remote:  !     Push rejected, failed to compile Multipack app
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to app-name.
remote: 
To https://git.heroku.com/app-name.git
 ! [remote rejected] stage -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app-name.git'

From what I can tell and without an understanding of buildpack internals, this basically gives me nothing to go on. Please correct me if I'm missing something. Perhaps I need specific commit hashes in my .buildpacks as the README suggests? It's just guesswork. Is there any way to move forward?

@rreusser rreusser referenced this issue in browserify-rails/browserify-rails Jul 1, 2015
Closed

Heroku: Push rejected, failed to compile Multipack app #94

@uhoh-itsmaciek

@rreusser Heroku now supports multiple buildpacks natively--maybe try that instead?

@rreusser
rreusser commented Jul 1, 2015

Culprit: my unfamiliarity with buildpacks. Figured if nothing else, this'll be an easy google hit for someone else with the same issue. PR submitted for browserify-rails docs and issue solved. Thanks again for the prompt reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.