stomita / heroku-buildpack-phantomjs Goto Github PK
View Code? Open in Web Editor NEWThis project forked from heroku/heroku-buildpack-hello
This project forked from heroku/heroku-buildpack-hello
As of 74a4399 an error now occurs when using this buildpack on the heroku cedar platform.
Here is the output from when I run the command:
heroku run bash
Running `bash` attached to terminal... up, run.1
~ $ phantomjs --version
phantomjs: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
~ $ phantomjs vendor/phantomjs/examples/rasterize.js
phantomjs: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory
~ $ exit
This PhantomJS thread seems to discuss the issue: https://groups.google.com/forum/#!topic/phantomjs/tEBhnzTyuQg
Apparently 1.6.1 didn't include this commit ariya/phantomjs@fc35e69
Which fixes the issue, so it's necessary to build from https://github.com/ariya/phantomjs/tree/1.6
After I set
heroku config:add BUILDPACK_URL=https://github.com/stomita/heroku-buildpack-phantomjs.git
my dyno is crashing (at=error code=H10 desc="App crashed")
Just a question as to whether there are plans to add phantomjs v2.0 support here. Probably beyond my skill to do much to help, though I can have a go.
I'm getting this error now when I try to push a build.
Fetching repository, done.
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 695 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/stomita/heroku-buildpack-phantomjs.git
=====> Detected Framework: PhantomJS
-----> Extracting PhantomJS 1.9.2 binaries to /tmp/build_2890408b-d4be-4886-8406-c2054fc0f947/vendor/phantomjs
exporting PATH and LIBRARY_PATH
/tmp/buildpackqzcwp/bin/compile: 29: cannot create : Directory nonexistent
! Push rejected, failed to compile Multipack app
Got stuck on this until I found ddollar/heroku-buildpack-multi#16.
You need to use https for the buildpack URL otherwise it hangs on downloading the buildpack until it times-out.
I use the README commands
heroku config:add BUILDPACK_URL=https://github.com/stomita/heroku-buildpack-phantomjs.git
git push heroku master
but, If I connect to the app
heroku run bash
I don't find phamtomjs binary .
Hi!
When trying to access binaries from Bitbucket, I get this error message: "Rate limit for this resource has been exceeded". Could you please check...
Thanks, Elmar
I'm getting this:
remote: =====> Detected Framework: PhantomJS
remote: -----> Fetching PhantomJS 2.1.1 binaries at https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
remote: -----> Extracting PhantomJS 2.1.1 binaries to /tmp/build_b8c3631cd930837861d76051e5f17517/vendor/phantomjs
remote: bzip2: (stdin) is not a bzip2 file.
remote: tar: Child returned status 2
remote: tar: Error is not recoverable: exiting now
On closer inspection, I find that https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
is not predictable. Occasionally it returns a forbidden error xml file from S3.
Hello,
I am not sure if this is the place to ask. But since you'd have experience about the buildpack, I'll give a shot.
I have a NodeJS application that is also using the PhantomJS.
My set up is 1.x of PhantomJS and 1.x of the node module phantom
. And on Heroku I had multi-buildpacks heroku/node
and this buildpack.
PhantomJS updated to 2.x and the node module is updated with it. However this current change breaks my current code. I will be fixing it for the new version. But for now I would like to run an older version of PhantomJS on Heroku so my existing code will work until I fix it.
To do that I ran the following code on Heroku
$ heroku buildpacks:set heroku/nodejs
Buildpack set. Next release on tripfoldit-staging will use heroku/nodejs.
Run git push heroku master to create a new release using this buildpack.
$ heroku buildpacks:add https://github.com/stomita/heroku-buildpack-phantomjs.git#1.9.2
Buildpack added. Next release on tripfoldit-staging will use:
1. heroku/nodejs
2. https://github.com/stomita/heroku-buildpack-phantomjs.git#1.9.2
Run git push heroku master to create a new release using these buildpacks.
Then I git push my repo and watch it built as expected. However after that I run my code and got a message 'Phantom js is not installed!'
My assumption is that during the successful build the PhantomJS is installed. Am I missing anything? Any suggestions?
Cheers,
Doruk
I had to rollback to the previous build due a problem extracting the Phantomjs binaries to the tmp directory that couldn't get created. I did verify the setting of PATH and LIBRARY environment variables:
Freds-MacBook-Air:tweeter thoughtpoet$ heroku config:get PATH
/usr/local/bin:/usr/bin:/bin:/app/vendor/phantomjs/bin
Freds-MacBook-Air:tweeter thoughtpoet$ heroku config:get LD_LIBRARY_PATH
/usr/local/lib:/usr/lib:/lib:/app/vendor/phantomjs/lib
I looked at the diff, and failed to see why the new changes could be causing this issue. But pointing to the earlier version solves this problem for me:
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/stomita/heroku-buildpack-phantomjs.git#01db437f975657a703c7d9f78f3f1fff5748f663
Freds-MacBook-Air:tweeter thoughtpoet$ ./deploy
Fetching repository, done.
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 512 bytes | 0 bytes/s, done.
Total 6 (delta 4), reused 0 (delta 0)
-----> Deleting 1 files matching .slugignore patterns.
-----> Removing .DS_Store files
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
-----> Requested node range: 0.10.x
-----> Resolved node version: 0.10.26
-----> Downloading and installing node
-----> Restoring node_modules directory from cache
-----> Pruning cached dependencies not specified in package.json
-----> Exporting config vars to environment
-----> Installing dependencies
npm WARN package.json [email protected] crypto is also the name of a node core module.
> [email protected] postinstall /tmp/build_3616705d-1aa8-4adb-b0d2-74f277d55860
> node node_modules/bower/bin/bower install
-----> Caching node_modules directory for future builds
-----> Cleaning up node-gyp and npm artifacts
-----> Building runtime environment
=====> Downloading Buildpack: https://github.com/stomita/heroku-buildpack-phantomjs.git
=====> Detected Framework: PhantomJS
-----> Extracting PhantomJS 1.9.2 binaries to /tmp/build_3616705d-1aa8-4adb-b0d2-74f277d55860/vendor/phantomjs
exporting PATH and LIBRARY_PATH
/tmp/buildpacki16xr/bin/compile: 29: cannot create : Directory nonexistent
! Push rejected, failed to compile Multipack app
To [email protected]:streamestry.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:streamestry.git'
--Fred
I added it to heroku according to README and when I run heroku console, I get an error:
$ heroku config:add BUILDPACK_URL=https://github.com/stomita/heroku-buildpack-phantomjs.git
Setting config vars and restarting for_my_app... done, v7
BUILDPACK_URL: https://github.com/stomita/heroku-buildpack-phantomjs.git
$ heroku run phantomjs
Running `phantomjs` attached to terminal... up, run.7285
bash: phantomjs: command not found
I ran the build pack and get:
"Could not find an executable ["phantomjs"] on your path."
Where do I set the path and what path do I use to direct it to phantomjs when on heroku?
(Note: I am using gem capybara and gem Poltergeist, which I guess use phantomjs)
Hi,
How can I specify which version of phantomJS My app uses?
Tnx!
somebody has try to do it, facebook blocks the login because the heroku servers are in an unknown location?
I'm interested in creating a custom build of this branch, as I believe it will fix WOFF rendering with Phantom https://github.com/Vitallium/phantomjs/tree/fix-WOFF-file-support
Can you explain the process you use to build the tarballs for this buildpack? I'm attempting to use Vulcan but it seems like it might take a very long time to build.
how I can get webfonts support ?
Any chance you could bump up to 2.0?
Under Rails 4, when creating a buildpack I see that my web dynos are done.
If I try to add them back, I keep getting an "app crashed" error.
Easy to trouble shoot, just create a hello world app, and add Heroku cedar with:
$ heroku create --stack cedar --buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git
Any thoughts?
Hi, please can you check the following steps:
$ cat .buildpacks
https://github.com/heroku/heroku-buildpack-ruby
http://github.com/stomita/heroku-buildpack-phantomjs
mkdir app
cd app
heroku apps:create --app heroku-phantomjs-error
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
heroku config:add LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib:/app/vendor/phantomjs/lib
heroku config:add PATH=/app/bin:/app/vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:/app/vendor/phantomjs/bin
touch README.rdoc
git add .
git commit -am 'readme'
git push origin
heroku run bash
phantomjs
phantomjs> # here you can enter anything you like, and it will show the text but you will never be able to execute this
I believe this also causes poltergeist gem for ruby on rails to fail.
Please can you advise on how to fix this, as I'm struggling over this for the 3rd day in a row
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.