[Release] PhantomJS 2.5.0 Beta

6833 views
Skip to first unread message

Vitaly Slobodin

unread,
Jan 8, 2017, 10:21:28 AM1/8/17
to phantomjs
Hi,

I am really proud to announce that we are ready to ship binaries for 2.5.0 version!

What's inside:

- bug fixes
- new command line options (disabling local storage)
- upgraded Qt to 5.7.1
- ... Absolutely new and shiny QtWebKit! With full ES2015 support, native promises, JavaScript engine improvements and much more! Here is the comparison table  https://github.com/annulen/webkit/wiki/Comparison-with-QtWebKit-5.6
- Now you can build PhantomJS against the system-installed Qt
- support for WEBP format

More features incoming: updated Ghostdriver (finally!), more improvements on web engine, etc.

I've started uploading beta binaries to https://bitbucket.org/ariya/phantomjs/downloads I will upload binaries for popular platforms: macOS, Windows, Ubuntu Trusty and Xenial (both x86_x64).

For Ubuntu binaries you need to install some dependencies:
  • png
  • jpeg
  • webp
  • openssl
  • zlib
  • fontconfig and freetype
  • libicu
Thanks!

With regards,
Vitaly.

Vitaly Slobodin

unread,
Jan 8, 2017, 1:42:58 PM1/8/17
to phantomjs
And one more thing...

This release wouldn't happen without a HUGE help from Konstantin Tokarev (@annulen) and his resurrection of the QtWebKit project (https://github.com/annulen/webkit)

Thank you Konstantin!

With regards,
Vitaly.

Mark Theunissen

unread,
Jan 9, 2017, 8:42:45 AM1/9/17
to phantomjs
Thanks Vitaly, I think there is a problem on Mac OSX (not macOS):

$ ./phantomjs
Segmentation fault: 11

Is there a version planned for El Capitan?

thanks
Mark

Vitaly Slobodin

unread,
Jan 9, 2017, 8:46:09 AM1/9/17
to phantomjs
Hi,

The problem is I don't have a machine with El Capitan. But let check what we can do.

Thanks.

With regards,
Vitaly.

Pete Wright

unread,
Jan 9, 2017, 2:20:53 PM1/9/17
to phantomjs


On Sunday, January 8, 2017 at 7:21:28 AM UTC-8, Vitaly Slobodin wrote:
Hi,

I am really proud to announce that we are ready to ship binaries for 2.5.0 version!


Hey this is great news - thank you!
 
What's inside:

- bug fixes
- new command line options (disabling local storage)
- upgraded Qt to 5.7.1
- ... Absolutely new and shiny QtWebKit! With full ES2015 support, native promises, JavaScript engine improvements and much more! Here is the comparison table  https://github.com/annulen/webkit/wiki/Comparison-with-QtWebKit-5.6
- Now you can build PhantomJS against the system-installed Qt
- support for WEBP format

More features incoming: updated Ghostdriver (finally!), more improvements on web engine, etc.

I've started uploading beta binaries to https://bitbucket.org/ariya/phantomjs/downloads I will upload binaries for popular platforms: macOS, Windows, Ubuntu Trusty and Xenial (both x86_x64).


I'm working on porting this to FreeBSD now that we have decoupled QT from the PhantomJS source.  Am I correct to assume that this code is what is currently in the Master bitbuck repository?

Cheers,
-pete

Jimmy Multani

unread,
Jan 9, 2017, 6:30:25 PM1/9/17
to phantomjs
This is great! When can we expect this to be on brew for macOS?

Thanks!

Pete Wright

unread,
Jan 10, 2017, 7:11:16 PM1/10/17
to phantomjs
Wanted to follow-up on this. I've figured out how to mostly get a working build of PhantomJS working on FreeBSD.  The basic workflow (which works on ubuntu and centos) is:

- ensure QT5 is installed on your platform.
- ensure "qmake" and "moc" are installed as per above
- clone this repo (I think!)
- ensure master branch is checked out
- run "qmake" in root of checkout
- run "make"

I'm currently seeing the following compilation issue on FreeBSD/CentOS and Ubuntu:

webpage.cpp: In constructor 'WebPage::WebPage(QObject*, const QUrl&)':

webpage.cpp:369:28: error: 'WebSecurityEnabled' is not a member of 'QWebSetting'

     settings->setAttribute(QWebSettings::WebSecurityEnabled, phantomCfg->webSecurityEnabled());



Commenting out the offending line (369) in webpage.cpp allows the compile to work and I've done some testing with the resulting binary.  To be honest I'm not %100 sure about that line, and from what I can gather WebSecurityEnabled is toggled to "true" by default so some context here would be awesome.

Cheers,
-pete

Jack Fenton

unread,
Jan 13, 2017, 5:45:46 AM1/13/17
to phantomjs
Hi pete, is the master branch not 2.1.1?

pete wright

unread,
Jan 13, 2017, 12:53:06 PM1/13/17
to phan...@googlegroups.com
On Fri, Jan 13, 2017 at 2:45 AM, Jack Fenton <jfe...@bookingbug.com> wrote:
> Hi pete, is the master branch not 2.1.1?
>
>

That's what I'm trying to figure out - I'd appreciate any commiters to
clarify where the source for v2.5.0-BETA resides. I do see a branch
for 2.1.1, and the current master branch *does* allow me to use my
locally installed QT headers and libraries - so I guessing master is
where we should be testing...


-pete


--
pete wright
www.nycbug.org
@nomadlogicLA
Message has been deleted

Can Tonic

unread,
Jan 15, 2017, 6:01:31 AM1/15/17
to phantomjs
Thank you Vitaly! This could solve a bug I have. Is there a chance you could upload a version for Ubuntu 12.04 as well?

Cheers,
Can

Sean McNamara

unread,
Jan 15, 2017, 3:54:29 PM1/15/17
to phan...@googlegroups.com
Last time I looked into Ubuntu 12.04 + PhantomJS, it appeared that the compiler toolchain was too old to compile all the decencies. And that was with PhantomJS 2.0. 2.5 likely drives the compiler requirements forward, not backward.

You should be able to get a recent PhantomJS binary build running on 12.04 by snagging all the required system libraries from a 14.04 or newer box and setting LD_LIBRARY_PATH=. (Or use an absolute path or wherever you put these dependencies). The big one is libstdc++. You shouldn't need to bring over libc but it probably needs most everything else from an 'ldd phantomjs' that shows up as coming from /usr/lib. The kernel userland ABI and libc ABI haven't been broken since 12.04 so I see no reason that shouldn't work.


--


You received this message because you are subscribed to the Google Groups "phantomjs" group.


To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.


Visit this group at https://groups.google.com/group/phantomjs.


For more options, visit https://groups.google.com/d/optout.


servi...@gmail.com

unread,
Jan 19, 2017, 7:16:11 PM1/19/17
to phantomjs
Hello.Thank you for release..
Can't start on CentOS release 6.5 (Final) ( Linux htuidc.bgp.ip 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux )

phantomjs: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

Do you have a binary for Centos?

servi...@gmail.com

unread,
Jan 19, 2017, 7:20:40 PM1/19/17
to phantomjs
And can i use promises in that version?
:)

Sean McNamara

unread,
Jan 19, 2017, 8:14:06 PM1/19/17
to phan...@googlegroups.com
Grab a newer libjpeg from a modern system (like a supported release of
Fedora, if you want to stick with the Red Hat ecosystem) and chuck it
in a dir that libdl can find, or upgrade your CentOS. That's going to
be a lot easier for everyone than having to compile binaries to work
on each and every Linux distro and version released in the past 10
years. My instructions/advice from my previous post in this thread
(regarding Ubuntu 12.04, also a very old distro version) apply here
too.


Sean

>
> Do you have a binary for Centos?
>

Santosh Hegde

unread,
Feb 4, 2017, 5:08:51 AM2/4/17
to phantomjs
I'm using Redhat and im getting the same error. error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory.


Is there any way i can run this without these libraries. I don't have permission to install extra dependencies on the machine. Phantom 2.1.1 is not asking anything extra. 

Sean McNamara

unread,
Feb 4, 2017, 12:07:21 PM2/4/17
to phan...@googlegroups.com
You don't need "permission" to "install" anything. If you have the
ability to write files to any single directory on the system -- which
you would need to download the PhantomJS 2.5 binary in the first place
-- then you can do everything you need. You can download libjpeg.so.8
binaries from a newer distribution's package repositories, unpack the
rpm or deb file, and place the libjpeg.so.8 file in the same directory
as PhantomJS binary, then set the LD_LIBRARY_PATH environment variable
to include "." (the current directory) and run ./phantomjs .

Please do not be of the mindset that it is absolutely required to
always install everything in system directories like /usr/lib. A user
shell is perfectly sufficient for compiling or downloading and running
just about anything, regardless of the version of the OS you have
installed. It just might take a little more work than using the `yum`
or `dnf` command to install the right versions of the packages.

Your other alternative is to compile PhantomJS from source, which will
eliminate some of your dependency problems by using system libraries.
But you'd almost certainly need to upgrade your compiler, because
PhantomJS uses very new C++ constructs that won't compile on ancient
versions of Red Hat, for instance.

I think it is pretty unrealistic to expect the PhantomJS volunteer
developers to compile PhantomJS for zillions of different ancient
Linux distros that people use. There are too many different userspace
combinations out there to support them all, and that would take too
much developer time away from actually writing the code that makes
PhantomJS successful to begin with.

If you're going to run an ancient Linux distro, the onus is on you to
obtain the libraries needed to run modern software. That's how it's
always been.


Sean

Santosh Hegde

unread,
Feb 4, 2017, 1:36:44 PM2/4/17
to phantomjs
Yes, I had the mindset that extra permission required to install it.
But after doing  "download libjpeg.so.8 

binaries from a newer distribution's package repositories, unpack the 
rpm or deb file, and place the libjpeg.so.8 file in the same directory 
as PhantomJS binary, then set the LD_LIBRARY_PATH environment variable 
to include" i'm getting error while loading shared libraries: libssl.so.1.0.0: wrong ELF class: ELFCLASS32

I have Red Hat Enterprise Linux Server release 7.3 (Maipo) with gcc version 4.8.5 20150623 (Red Hat 4.8.5-11).
Can I build on this machine and use it across all other machines?

Because I cannot say to my clients to install so many things. Instead I can give them a package which does everything like phantomjs 2.1.1

Toni Lähdekorpi

unread,
Feb 4, 2017, 5:10:33 PM2/4/17
to phantomjs
I thought I was going mad when setting:
page.paperSize = {
  format: 'A4',
  orientation: 'landscape',
  margin: '1cm'
}

outputs a portrait PDF.

Setting
page.paperSize = {
  format: 'A4',
  orientation: 'portrait',
  margin: '1cm'
}

outputs a landscape PDF.

The same code with older versions work just fine.

Andargor

unread,
Feb 5, 2017, 10:20:13 PM2/5/17
to phantomjs
Glad to know I'm not the only one that is mad :)

Also, it seems I am unable to produce more than one page with the same settings as 2.1.1 and the default viewport is very small.

Sudheendra Hr

unread,
Feb 9, 2017, 6:01:19 PM2/9/17
to phantomjs
Hey Vitaly,

Thanks for the latest version, badly waiting for it as older version of phontom was not supporting some of the libraries that React uses.

My test project uses maven for building, I modified RepositoryMap.xml file to point to new file location  <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.5.0-beta-windows.zip</filelocation>  , now maven downloads the latest phantomjs, but selenium not finding the page elements ( Run fine on chrome), I thought this could be issue with phantomjsdriver ( but I think we won't need explicit Phatomjsdriver with latest PhantomJS ), still i modified my pom.xml and added dependency info as follows , but still no luck.Please guide me how to proceed.

<dependency>
            <groupId>com.github.jesg</groupId>
            <artifactId>phantomjsdriver</artifactId>
            <version>3.0.0-beta1</version>
        </dependency>


Thanks

ajith arthur

unread,
Feb 16, 2017, 6:44:31 AM2/16/17
to phantomjs
Hi Vitaly,

Is it the below mentioned issue fixed in this beta version?


Regards,
Ajith R

Abhinav Pandey

unread,
Feb 16, 2017, 5:01:57 PM2/16/17
to phantomjs
Yup same here. And I am unable to render more than 1 page ?

Ravi Sharma

unread,
Feb 25, 2017, 4:35:43 AM2/25/17
to phantomjs
Hi Vitaly,

i am getting below error while running a maven project on my office server. whereas the same project works fins on my VM installed on my laptop. the only difference is my VM has a UI where my office server dose not.

can you help me with this.

/home/mszymaniuk/.m2/repository/webdriver/phantomjs/linux-ubuntu-xenial-x86_64/2.5.0/phantomjs: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory


On Sunday, January 8, 2017 at 8:51:28 PM UTC+5:30, Vitaly Slobodin wrote:

Ravi Sharma

unread,
Feb 25, 2017, 4:36:51 AM2/25/17
to phantomjs


On Sunday, January 8, 2017 at 8:51:28 PM UTC+5:30, Vitaly Slobodin wrote:

Ravi Sharma

unread,
Feb 25, 2017, 4:38:06 AM2/25/17
to phantomjs
Hi Vitaly,
i am getting the error mentioned below. can you suggest something.


/home/mszymaniuk/.m2/repository/webdriver/phantomjs/linux-ubuntu-xenial-x86_64/2.5.0/phantomjs: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

On Sunday, January 8, 2017 at 8:51:28 PM UTC+5:30, Vitaly Slobodin wrote:

Santosh Hegde

unread,
Feb 27, 2017, 9:10:23 AM2/27/17
to phantomjs
Hi Vitaly,

Good to hear that. Memory related issues are fixed in this release?

Can you please build the binary with all dependencies like jpeg,png. Because when we are deploying our application to any remote VM to run the automation, we won't have root privileges to install these dependencies. 

Or let me know how to build with the dependencies. So that I can build on my own.


Thanks and Regards
Santosh Hegde

Mike Tsvietukhin

unread,
Mar 17, 2017, 8:55:08 PM3/17/17
to phantomjs
Hi,

Trying to build PhantomJS 2.5.0 for windows

I clone git and install latest Qt 5.8 in my system
I also for latest QtWebKit release files form here https://github.com/annulen/webkit/releases/tag/qtwebkit-tp5 for Qt5.8
I added file .qmake.config file in src dir of PhantomJS with command QMAKEPATH += C:/webkit
I run qmake && make and get this error:

C:\Users\PSMikeT\phantomjs>make
cd src\ && ( if not exist Makefile.phantomjs C:\Qt\Qt5.8.0\5.8\msvc2015_64\bin\qmake.exe -o Makefile.phantomjs C:\Users\PSMikeT\phantomjs\src\phantomjs.pro ) && make -f Makefile.phantomjs
make[1]: Entering directory `C:/Users/PSMikeT/phantomjs/src'
make -f Makefile.phantomjs.Release
make[2]: Entering directory `C:/Users/PSMikeT/phantomjs/src'
cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -DWIN32 -DWIN64 -DUSE_UTF8 -DSTATIC_BUILD -DQCOMMANDLINE_STATIC -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DQT_NO_DEBUG -DQ
T_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -I. -Imongoose -Ilinenoise\src -Iqcommandline -IC:\Qt\Qt5.8.0\5.8\msvc2015_64\include -IC:/Qt/Qt5.8.0/5.8/msvc2015_64/include/QtWebKit -IC:\Qt\Qt5.8.0\5.8\msvc2015_64\include\QtGui -IC:\Qt\Qt5.8.0\5.8\msvc2015_64\include\QtANGLE -IC:\
Qt\Qt5.8.0\5.8\msvc2015_64\include\QtNetwork -IC:\Qt\Qt5.8.0\5.8\msvc2015_64\include\QtCore -Irelease -IC:\Qt\Qt5.8.0\5.8\msvc2015_64\mkspecs\win32-msvc2015  -Forelease\ @<<
<< was unexpected at this time.
make[2]: *** [{linenoise\src}.cpp{release\}.obj] Error 255
make[2]: Leaving directory `C:/Users/PSMikeT/phantomjs/src'
make[1]: *** [release] Error 2
make[1]: Leaving directory `C:/Users/PSMikeT/phantomjs/src'

Any one tries to do like this? 

Mike Tsvietukhin

unread,
Mar 17, 2017, 9:04:15 PM3/17/17
to phantomjs
Here is a line 

{linenoise\src}.cpp{release\}.obj::
$(CXX) -c $(CXXFLAGS) $(INCPATH) -Forelease\ @<<
$<

Peter Bray

unread,
Mar 26, 2017, 3:40:21 AM3/26/17
to phantomjs

Anyone have a compiled 2.5 you've got running on AWS Lambda? Can you share, if so...

Teo

unread,
Mar 28, 2017, 10:19:51 AM3/28/17
to phantomjs
Some quick build instruction would be useful

Luis Miguel García

unread,
Mar 28, 2017, 11:50:43 AM3/28/17
to phantomjs
Yeah, or maybe a statically linked version. I'm trying to test it in Ubuntu Yakkety (latest stable) but it complains about libpng12.so.0 which I don't think is included in current version of Ubuntu.

me...@autopilothq.com

unread,
Apr 5, 2017, 4:17:32 AM4/5/17
to phantomjs
Tried to compile PhantomJS 2.5 on Amazon Linux AMI, didn't get any luck so far.
when running "phantomjs -v" I get the "This application failed to start because it could not find or load the Qt platform plugin "phantom"
in '' ". This solution didn't work me https://github.com/ariya/phantomjs/issues/14061

Did you manage to get it up and running?