Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push rejected, failure creating release #13

Closed
RickvdP opened this issue Jan 8, 2015 · 18 comments
Closed

Push rejected, failure creating release #13

RickvdP opened this issue Jan 8, 2015 · 18 comments

Comments

@RickvdP
Copy link

RickvdP commented Jan 8, 2015

Hi,

I'm for the first time trying to deploy a Meteor app to Heroku. I just started out with the todos example, added the buildpack and tried to push the comitted code. Everything seems to go fine, but somehow the push is rejected and the build fails.

Rick:todos rkplas$ git push heroku master
Counting objects: 113, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (108/108), done.
Writing objects: 100% (113/113), 247.42 KiB | 0 bytes/s, done.
Total 113 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Fetching custom git buildpack... done
remote: -----> Node.js app detected
remote: -----> Installing node
remote: -----> Installing meteor
remote: Downloading Meteor distribution
remote: ######################################################################## 100.0%
remote: 
remote: Meteor 1.0.2.1 has been installed in your home directory (~/.meteor).
remote: 
remote: Now you need to do one of the following:
remote: 
remote:   (1) Add "$HOME/.meteor" to your path, or
remote:   (2) Run this command as root:
remote:         cp "/tmp/buildpack_60aea2829a59bc7586e9d5738213406b/meteor-eDih/.meteor/packages/meteor-tool/1.0.38/meteor-tool-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
remote: 
remote: Then to get started, take a look at 'meteor --help' or see the docs at
remote: docs.meteor.com.
remote: -----> Bundling bundle
remote: ios: removed platform
remote: android: removed platform
remote: npm WARN package.json meteor-dev-bundle@0.0.0 No description
remote: npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
remote: npm WARN package.json meteor-dev-bundle@0.0.0 No README data
remote: 
remote: > fibers@1.0.1 install /tmp/build_60aea2829a59bc7586e9d5738213406b/.meteor/heroku-build/app/programs/server/node_modules/fibers
remote: > node ./build.js
remote: 
remote: `linux-x64-v8-3.14` exists; testing
remote: Binary is fine; exiting
remote: underscore@1.5.2 node_modules/underscore
remote: 
remote: semver@4.1.0 node_modules/semver
remote: 
remote: chalk@0.5.1 node_modules/chalk
remote: ├── escape-string-regexp@1.0.2
remote: ├── ansi-styles@1.1.0
remote: ├── supports-color@0.2.0
remote: ├── strip-ansi@0.3.0 (ansi-regex@0.2.1)
remote: └── has-ansi@0.1.0 (ansi-regex@0.2.1)
remote: 
remote: eachline@2.3.3 node_modules/eachline
remote: └── type-of@2.0.1
remote: 
remote: source-map-support@0.2.8 node_modules/source-map-support
remote: └── source-map@0.1.32 (amdefine@0.1.0)
remote: 
remote: fibers@1.0.1 node_modules/fibers
remote: -----> Adding PATH environment
remote: -----> Running extras
remote: -----> Adding MONGOHQ_URL -> MONGO_URL env
remote: -----> Adding MONGOLAB_URI -> MONGO_URL env
remote: -----> Installing phantomjs.
remote: -----> Discovering process types
remote:        Procfile declares types   -> (none)
remote:        Default types for Node.js -> web
remote: 
remote: -----> Compressing... done, 26.4MB
remote: -----> Launching... 
remote:  !     Push rejected, failure creating release
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to salty-tundra-1782.
remote: 
To https://git.heroku.com/salty-tundra-1782.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/salty-tundra-1782.git'
@RickvdP
Copy link
Author

RickvdP commented Jan 8, 2015

Okay so the push rejected was an easy fix: I simply forgot to add the mongolabs addon before pushing, you might want to add that to the docs...

The app now pushes and the app seems to build and deploy, but unfortunately it seems to crash because it cannot find the build somehow?

2015-01-08T09:23:47.568375+00:00 heroku[api]: Release v9 created by *@*.com
2015-01-08T09:23:48.114057+00:00 heroku[web.1]: State changed from crashed to starting
2015-01-08T09:23:58.055221+00:00 heroku[web.1]: Starting process with command `.meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js`
2015-01-08T09:23:59.770127+00:00 app[web.1]: bash: .meteor/heroku_build/bin/node: No such file or directory
2015-01-08T09:24:00.555113+00:00 heroku[web.1]: Process exited with status 127
2015-01-08T09:24:00.575553+00:00 heroku[web.1]: State changed from starting to crashed
2015-01-08T09:24:11.657902+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=salty-tundra-1782.herokuapp.com request_id=4eae4ec1-c01c-4e4b-8ce0-6de788820ed7 fwd="84.241.200.153" dyno= connect= service= status=503 bytes=
2015-01-08T09:24:12.202303+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=salty-tundra-1782.herokuapp.com request_id=9baa3c58-ad0e-4b43-adf0-673cd663d7c3 fwd="84.241.200.153" dyno= connect= service= status=503 bytes=
2015-01-08T09:24:30.819388+00:00 heroku[web.1]: State changed from crashed to starting
2015-01-08T09:24:37.582433+00:00 heroku[web.1]: Starting process with command `.meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js`
2015-01-08T09:24:40.481135+00:00 app[web.1]: bash: .meteor/heroku_build/bin/node: No such file or directory
2015-01-08T09:24:41.332962+00:00 heroku[web.1]: Process exited with status 127
2015-01-08T09:24:41.340369+00:00 heroku[web.1]: State changed from starting to crashed

@nspangler
Copy link

@RickvdP I am having the same problem as the first log. How did you add the mongolabs addon?

@RickvdP
Copy link
Author

RickvdP commented Jan 8, 2015

Hi @nspangler, I added the addon by simply running

heroku addons:add mongolab

@hvtor
Copy link

hvtor commented Jan 8, 2015

Have you gone through Heroku, to the MongoLabs add on config page and configured a user and password for the database?

Then set the MongoURL with the db user and password?

On Jan 8, 2015, at 9:30 AM, RickvdP notifications@github.com wrote:

Hi @nspangler, I added the addon by simply running

heroku addons:add mongolab

Reply to this email directly or view it on GitHub.

@RickvdP
Copy link
Author

RickvdP commented Jan 8, 2015

Hi @hvtor, no I haven't done that as a 'heroku_app33102xxx' user and password where automatically created and a MongoDB connection string was already inserted in the MONGOLAB_URI env variable.

@jacksondc
Copy link

I'm having a similar problem to @RickvdP. I'm on Meteor 1.0.3.1, I've added mongolab, and MONGOLAB_URI is set, but I still get this:

Initializing repository, done.
Counting objects: 204, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (146/146), done.
Writing objects: 100% (204/204), 28.01 KiB | 0 bytes/s, done.
Total 204 (delta 51), reused 159 (delta 40)

-----> Fetching custom git buildpack... done
-----> Node.js app detected
-----> Installing node
-----> Installing meteor
Downloading Meteor distribution
######################################################################## 100.0%

Meteor 1.0.3.1 has been installed in your home directory (~/.meteor).

Now you need to do one of the following:

  (1) Add "$HOME/.meteor" to your path, or
  (2) Run this command as root:
        cp "/tmp/buildpack_4679c59dc34866638a0b1d6c8da2c424/meteor-YANI/.meteor/packages/meteor-tool/1.0.40/meteor-tool-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor

Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
-----> Bundling bundle
ios: platform is not in this project
android: platform is not in this project
npm WARN package.json meteor-dev-bundle@0.0.0 No description
npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle@0.0.0 No README data

> fibers@1.0.1 install /tmp/build_4679c59dc34866638a0b1d6c8da2c424/.meteor/heroku_build/app/programs/server/node_modules/fibers
> node ./build.js

`linux-x64-v8-3.14` exists; testing
Binary is fine; exiting
underscore@1.5.2 node_modules/underscore

semver@4.1.0 node_modules/semver

eachline@2.3.3 node_modules/eachline
└── type-of@2.0.1

source-map-support@0.2.8 node_modules/source-map-support
└── source-map@0.1.32 (amdefine@0.1.0)

fibers@1.0.1 node_modules/fibers

chalk@0.5.1 node_modules/chalk
├── escape-string-regexp@1.0.2
├── ansi-styles@1.1.0
├── supports-color@0.2.0
├── has-ansi@0.1.0 (ansi-regex@0.2.1)
└── strip-ansi@0.3.0 (ansi-regex@0.2.1)
-----> Adding PATH environment
-----> Running extras
-----> Adding MONGOHQ_URL -> MONGO_URL env
-----> Adding MONGOLAB_URI -> MONGO_URL env
-----> Installing phantomjs.
-----> Discovering process types
       Procfile declares types   -> (none)
       Default types for Node.js -> web

-----> Compressing... done, 22.8MB
-----> Launching... 
 !     Push rejected, failure creating release

To git@heroku.com:example.git
 ! [remote rejected] master -> master (pre-receive hook declined)

@RobertLowe
Copy link

@jacksondc can confirm I get the same error when pushing a fresh repo

@nickbw
Copy link

nickbw commented Jan 28, 2015

i was getting the same error when pushing to Heroku, changed to this buildpack https://github.com/jordansissel/heroku-buildpack-meteor.git and it worked

@RobertLowe
Copy link

@nickbw I literally just used that package, can confirm, works great.

@jacksondc
Copy link

@nickbw but it doesn't have horse in the name... 😢

@nickbw
Copy link

nickbw commented Jan 28, 2015

that's true but at least it works

@yourcelf
Copy link
Collaborator

Sorry for the delay, folks: I've documented the step requiring mongolab. Thanks @RickvdP for pointing that out.

@jacksondc it sounds like you might have a separate issue, if you've added mongolab via heroku addons:add mongolab and it still doesn't work. I've just tried the following which works for me. Can you tell me more about the steps you're trying which resulted in the failure you're seeing?

This works:

meteor create --example todos
cd todos
git init .
git add .
git commit -a -m "First commit"
# Create an app on heroku
heroku git remote -a <appname>
heroku config:set BUILDPACK_URL=https://github.com/AdmitHub/meteor-buildpack-horse.git
heroku config:set ROOT_URL=http://<appname>.herokuapp.com
heroku addons:add mongolab
git push heroku master

@pauldowman
Copy link
Contributor

I don't think this issue is related to MongoLab vs Compose. It should work with either. (BTW @yourcelf the README says you need to use a branch for MongoHQ/Compose, that should not be necessary since 804aea2).

@yourcelf
Copy link
Collaborator

@pauldowman I think the issue people were having in this thread is not having added mongolab via heroku addons:add mongolab for new projects that were using mongolab, though @nickbw and @jacksondc seemed to have another problem.

As to whether a different branch is necessary for mongohq/compose: the release file for master asserts that mongolab addon is used. This will work fine for existing apps that use mongohq/compose, as the addons section of the release file only runs or the first deploy, but it could mess up a first run of a project that is using mongohq/compose. I'm not sure why the release file isn't adding mongolab for first deployers in this thread -- if anyone has a clue for that we could remove that step from the README.

804aea2 is great for making sure people who were using this buildpack before don't break their production apps, but if you're going to use something other than mongolab it's probably best to use the branch or a fork so that mongolab in release doesn't trip you up.

@pauldowman
Copy link
Contributor

@yourcelf yes, the release file adds the mongolab add-on only the first time an app is deployed. So you're saying the issue could be that you manually added Compose first? Right that could be an issue. But if you have an existing app that uses Compose which was installed by this buildpack there's no problem since 804aea2 ensures that MONGO_URL is set to either MONGOHQ_URL or MONGOLAB_URI.

So I think the documentation should just warn that mongolab is installed on the first deploy, so remove it if you've manually added Compose? I assume you don't want to maintain a branch. 😄

I just tested deploying a Meteor 1.0.3.1 app for the each of the following:

  1. Existing app with MongoLab
  2. Existing app with Compose
  3. New app with neither added

All worked.

I hadn't noticed that ROOT_URL isn't automatically set, this is an annoying gotcha that should be fixed (I'll try to find time for it soon).

@pauldowman
Copy link
Contributor

Can someone who's having this problem describe their app?

  1. Is it a new app?
  2. Does it have Compose or MongoLab?
  3. Did you add the Mongo service yourself or did the build back add it?
  4. Meteor version
  5. git push log
  6. heroku log (heroku logs --tail before you deploy)

@nickbw
Copy link

nickbw commented Feb 9, 2015

I created a new app using this build pack and followed the instructions and confirm that I got no errors

@yourcelf
Copy link
Collaborator

yourcelf commented Feb 9, 2015

Thanks @nickbw -- I'm going to close this issue now. If you, @jacksondc, or others see problems again, please open a new issue with more info.

@yourcelf yourcelf closed this as completed Feb 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants