AdmitHub / meteor-buildpack-horse

Heroku buildpack for Meteor v1.0+. The horse one.
MIT License
641 stars 587 forks source link

Deployment timing out when upgrading Meteor from 1.2.1 to 1.3.2.4 #97

Closed acasas closed 8 years ago

acasas commented 8 years ago

Deployments used to work fine until I run meteor update and upgraded from 1.2.1 to 1.3.2.4. Since then, my deploys are timing out.

Output of heroku logs:

2016-05-02T21:59:34.531291+00:00 heroku[slug-compiler]: Slug compilation started
2016-05-02T21:59:34.531296+00:00 heroku[slug-compiler]: Slug compilation timed out: 1578.209133278 seconds.

And output of the deployment of my Meteor app to Heroku (with BUILDPACK_VERBOSE=1):

Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 1.28 KiB | 0 bytes/s, done.
Total 7 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Fetching set buildpack https://github.com/AdmitHub/meteor-buildpack-horse.git... done
remote: -----> Node.js app detected
remote: + dirname -- /tmp/buildpack20160502-168-1bdlxu5/bin/compile
remote: + cd -P -- /tmp/buildpack20160502-168-1bdlxu5/bin
remote: + cd ..
remote: + pwd -P
remote: + BUILDPACK_DIR=/tmp/buildpack20160502-168-1bdlxu5
remote: + APP_CHECKOUT_DIR=/tmp/build_8ec913602e892775fcbed40551946b64
remote: + APP_SOURCE_DIR=/tmp/build_8ec913602e892775fcbed40551946b64
remote: + [ -n  ]
remote: + [ ! -d /tmp/build_8ec913602e892775fcbed40551946b64/.meteor ]
remote: + [ ! -d /tmp/build_8ec913602e892775fcbed40551946b64/.meteor ]
remote: + mktemp -d /tmp/buildpack20160502-168-1bdlxu5/meteor-XXXX
remote: + METEOR_DIR=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx
remote: + COMPILE_DIR_SUFFIX=.meteor/heroku_build
remote: + COMPILE_DIR=/tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build
remote: + METEOR_PRETTY_OUTPUT=0
remote: + mkdir -p /tmp/build_8ec913602e892775fcbed40551946b64 /tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx /tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build
remote: + PATH=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor:/tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build/bin:/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin
remote: + [ -z https://xxxxx.herokuapp.com ]
remote: + [ -z https://xxxxx.herokuapp.com ]
remote: + echo -----> Installing node
remote: -----> Installing node
remote: + curl -sS --get https://semver.io/node/resolve/0.10.x
remote: + NODE_VERSION=0.10.44
remote: + NODE_URL=http://s3pository.heroku.com/node/v0.10.44/node-v0.10.44-linux-x64.tar.gz
remote: + + tar -zxf - -C /tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build --strip 1
remote: curl -sS http://s3pository.heroku.com/node/v0.10.44/node-v0.10.44-linux-x64.tar.gz -o -
remote: + export npm_config_prefix=/tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build
remote: + export CPATH=/tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build/include
remote: + export CPPPATH=/tmp/build_8ec913602e892775fcbed40551946b64/.meteor/heroku_build/include
remote: + echo -----> Installing meteor
remote: -----> Installing meteor
remote: + HOME=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx /bin/sh
remote: + curl -sS https://install.meteor.com
remote: Downloading Meteor distribution
remote: ######################################################################## 100.0%
remote: 
remote: Meteor 1.3.2.4 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/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor/packages/meteor-tool/1.3.2_4/mt-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: + METEOR=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor/meteor
remote: + HOME=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx+ sed -e s/Meteor /METEOR@/
remote:  /tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor/meteor --version
remote: + CUR_RELEASE=METEOR@1.3.2.4
remote: + cat /tmp/build_8ec913602e892775fcbed40551946b64/.meteor/release
remote: + APP_RELEASE=METEOR@1.3.2.4
remote: + test METEOR@1.3.2.4 != METEOR@1.3.2.4
remote: + echo -----> Bundling bundle
remote: -----> Bundling bundle
remote: + cd /tmp/build_8ec913602e892775fcbed40551946b64
remote: + echo -----> Checking if this meteor version supports --server-only
remote: -----> Checking if this meteor version supports --server-only
remote: + set +e
remote: + HOME=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx /tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor/meteor help build
remote: + grep -e --server-only
remote: + HAS_SERVER_ONLY=Usage: meteor build <output path> [--debug] [--directory] [--server-only]
remote: Pass `--server-only` to skip building mobile apps, but still build the
remote:   --server-only       Skip building mobile apps even if mobile platforms have
remote: + set -e
remote: + [ -n Usage: meteor build <output path> [--debug] [--directory] [--server-only]
remote: Pass `--server-only` to skip building mobile apps, but still build the
remote:   --server-only       Skip building mobile apps even if mobile platforms have ]
remote: + SERVER_ONLY_FLAG=--server-only
remote: + [ -z --server-only ]
remote: + [ -e /tmp/build_8ec913602e892775fcbed40551946b64/package.json ]
remote: + [ -n  ]
remote: + mktemp -d /tmp/buildpack20160502-168-1bdlxu5/build-XXXX
remote: + BUNDLE_DEST=/tmp/buildpack20160502-168-1bdlxu5/build-xcSz
remote: + echo -----> Building Meteor with ROOT_URL: https://xxxxx.herokuapp.com
remote: -----> Building Meteor with ROOT_URL: https://xxxxx.herokuapp.com
remote: + HOME=/tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx /tmp/buildpack20160502-168-1bdlxu5/meteor-dSfx/.meteor/meteor build --server https://xxxxx.herokuapp.com --server-only --directory /tmp/buildpack20160502-168-1bdlxu5/build-xcSz
remote: npm-container: updating npm dependencies -- open, softap-setup, spark,
remote: node-mandrill...
remote: Verifying deploy.......................................................................................................................................................................................................
remote: 
remote: !   Push rejected to xxxxx.
remote: 
To https://git.heroku.com/xxxxx.git
 ! [remote rejected] 3348c9f239f487f5577b89d585f0d1b6284f7eaa -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxx.git'

Any ideas why this might be happening? Is this a known issue?

yourcelf commented 8 years ago

@acasas have you learned anything more about this? I haven't been able to replicate it myself. Would you be able to share a repository that exhibits the problem?

acasas commented 8 years ago

@yourcelf Still experiencing the same issue. I downgraded to 1.2.1 and the deployment to Heroku worked like a charm. But if I run meteor update and deploy, then it times out.

Let me come up with a simple repo and get back to you.

acasas commented 8 years ago

The following project deploys well on 1.2.1, but times out in 1.3.2.4:

web.tar.gz

That file is the 1.3.2.4 version btw. Let me know if I can provide you with anything else that may help on this investigation. Thanks @yourcelf

yourcelf commented 8 years ago

Not sure why, but this appears to be related to materialize:materialize. Removing that from .meteor/packages in your example app allows the build to succeed normally. Adding materialize:materialize to a brand new vanilla meteor 1.3.2.4 project causes its build to fail.

When it times out, the call to meteor build is never returning -- meteor never finishes building.

jefflau commented 8 years ago

I have the same issue. It does verifying deploy for a long time and then it hangs up:

remote: Then to get started, take a look at 'meteor --help' or see the docs at
remote: docs.meteor.com.
remote: -----> Bundling bundle
remote: -----> Checking if this meteor version supports --server-only
remote: npm WARN deprecated react-paginate@1.0.5: This version of react-paginate is deprecated and will be removed. If you want to use react-paginate with react v0.14.*, please use react-paginate@1.0.4. If you want to use react-paginate with react@>15.0.0, please use react-paginate@>2.0.0.
remote: npm WARN peerDependencies The peer dependency react@^15.1.0 included from react-addons-pure-render-mixin will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react@^0.14.0 || ^15.0.0-0 included from react-redux will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react-addons-create-fragment@^15.0.1 included from react-paginate will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react-dom@^15.0.1 included from react-paginate will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react@^15.1.0 included from react-addons-create-fragment will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react@^15.1.0 included from react-dom will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: npm WARN peerDependencies The peer dependency react@^0.14.0 || ^15.0.0 included from react-router will no
remote: npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
remote: npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
remote: redux-thunk@2.1.0 node_modules/redux-thunk
remote: 
remote: classnames@2.2.5 node_modules/classnames
remote: 
remote: redux-logger@2.6.1 node_modules/redux-logger
remote: 
remote: react-router-redux@4.0.4 node_modules/react-router-redux
remote: 
remote: rupture@0.6.1 node_modules/rupture
remote: 
remote: react-addons-create-fragment@15.1.0 node_modules/react-addons-create-fragment
remote: 
remote: react-dom@15.1.0 node_modules/react-dom
remote: 
remote: react-paginate@1.0.5 node_modules/react-paginate
remote: └── classnames@1.2.2
remote: 
remote: react-router@2.4.1 node_modules/react-router
remote: ├── hoist-non-react-statics@1.0.6
remote: ├── invariant@2.2.1 (loose-envify@1.2.0)
remote: ├── warning@2.1.0 (loose-envify@1.2.0)
remote: └── history@2.1.1 (deep-equal@1.0.1, query-string@3.0.3)
remote: 
remote: redux-form@5.2.4 node_modules/redux-form
remote: ├── is-promise@2.1.0
remote: ├── deep-equal@1.0.1
remote: ├── react-lazy-cache@3.0.1
remote: └── hoist-non-react-statics@1.0.6
remote: 
remote: meteor-node-stubs@0.2.3 node_modules/meteor-node-stubs
remote: ├── https-browserify@0.0.1
remote: ├── tty-browserify@0.0.0
remote: ├── path-browserify@0.0.0
remote: ├── os-browserify@0.2.1
remote: ├── constants-browserify@1.0.0
remote: ├── string_decoder@0.10.31
remote: ├── process@0.11.2
remote: ├── punycode@1.4.1
remote: ├── querystring-es3@0.2.1
remote: ├── assert@1.3.0
remote: ├── timers-browserify@1.4.2
remote: ├── domain-browser@1.1.7
remote: ├── events@1.1.0
remote: ├── stream-browserify@2.0.1 (inherits@2.0.1)
remote: ├── vm-browserify@0.0.4 (indexof@0.0.1)
remote: ├── console-browserify@1.1.0 (date-now@0.1.4)
remote: ├── util@0.10.3 (inherits@2.0.1)
remote: ├── http-browserify@1.7.0 (inherits@2.0.1, Base64@0.2.1)
remote: ├── readable-stream@2.0.6 (process-nextick-args@1.0.6, inherits@2.0.1, util-deprecate@1.0.2, isarray@1.0.0, core-util-is@1.0.2)
remote: ├── url@0.11.0 (punycode@1.3.2, querystring@0.2.0)
remote: ├── buffer@4.5.1 (isarray@1.0.0, ieee754@1.1.6, base64-js@1.1.2)
remote: ├── crypto-browserify@3.11.0 (inherits@2.0.1, create-hmac@1.1.4, randombytes@2.0.3, pbkdf2@3.0.4, create-hash@1.1.2, diffie-hellman@5.0.2, browserify-cipher@1.0.0, create-ecdh@4.0.0, public-encrypt@4.0.0, browserify-sign@4.0.0)
remote: └── browserify-zlib@0.1.4 (pako@0.2.8)
remote: 
remote: react-redux@4.4.5 node_modules/react-redux
remote: ├── invariant@2.2.1
remote: ├── hoist-non-react-statics@1.0.6
remote: ├── loose-envify@1.2.0 (js-tokens@1.0.3)
remote: └── lodash@4.13.1
remote: 
remote: redux@3.5.2 node_modules/redux
remote: ├── symbol-observable@0.2.4
remote: ├── loose-envify@1.2.0 (js-tokens@1.0.3)
remote: ├── lodash-es@4.13.1
remote: └── lodash@4.13.1
remote: 
remote: react@15.1.0 node_modules/react
remote: ├── object-assign@4.1.0
remote: ├── loose-envify@1.2.0 (js-tokens@1.0.3)
remote: └── fbjs@0.8.3 (ua-parser-js@0.7.10, immutable@3.8.1, promise@7.1.1, isomorphic-fetch@2.2.1, core-js@1.2.6)
remote: 
remote: react-addons-pure-render-mixin@15.1.0 node_modules/react-addons-pure-render-mixin
remote: -----> Building Meteor with ROOT_URL: https://dao-verify.herokuapp.com
remote: Verifying deploy..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
yourcelf commented 8 years ago

@jefflau are you using materialize:materialize in your project?

jefflau commented 8 years ago

I'm not using materialize. I'm using react, redux, react-redux-router, redux-form, that's pretty much it.

jefflau commented 8 years ago

hi @yourcelf. I fixed my problem. I was using an npm package that didn't seem to play nice with meteor. But thankfully I wasn't actually using it at that point. They also had a meteor version, but I figured it would be okay to use the NPM version since everything seems to be heading in that direction. I removed it and everything works fine, but seems weird that the deploy would just not throw and error and just keep compiling until it times out. The package was web3 https://www.npmjs.com/package/web3 for ethereum development.

acasas commented 8 years ago

My project is not using web3. @yourcelf Is there anything that can be done in the buildpack to overcome the issue with offending packages?

yourcelf commented 8 years ago

@acasas I haven't found the source of the issue yet, so I don't yet know how to workaround. I can reproduce the failure with a minimal test project that just includes materialize:materialize, but I haven't been able to figure out why. I don't know if it's an architectural problem with compiling a package on heroku, or something else.

Any help you can offer in sleuthing this would be great. One thing you could do is try creating a test project and whittling down the dependencies until you identify the one or ones that prevent it from building correctly. Then we might be able to see if there's something in common between materialize and it.

yourcelf commented 8 years ago

er, nevermind @acasas, you were using materialize so we know that's a problem... So at this point, I don't think we know of any other dependency that's at issue. Still don't know why.

acasas commented 8 years ago

I followed a similar approach to what @jefflau did, and removed the meteor version of Materialize, and used the NPM version of that package. The build now succeeds in 1.3.2.4.

yourcelf commented 8 years ago

Alright, since this seems to be mostly worked-around, I'm going to close the issue. Please open a new issue if the problem crops in the future or the workaround no longer succeeds.