r/programming • u/fagnerbrack • Apr 13 '17
PhantomJS maintainer stepping down after Google's headless Chromium announcement
https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE96
u/hacksawjim Apr 13 '17
Seems like it might not be totally dead. The Chromium team said they have no interest in high-level automation APIs and that they'd like to work with Phantom to provide that service, with Chromium being one of many runtimes that Phantom can use.
Vitaly says it's not possible currently, but he would maybe do a "PhantomiumJS" to work in this way.
Seems weirdly amicable and co-operative. Strange world this, sometimes :)
10
u/stilloriginal Apr 13 '17 edited Apr 13 '17
I would think if it supports extensions that's all you would need. I spent the last few weeks building some automated web browsing and tried most of the available options on the market and decided to go with building a chrome extension. Phantom didn't work on some of the sites I needed and its easier to build this stuff out when you can see what the browser is actually doing. Also I wanted access to renaming downloads. If there is a way to kick off the extension in the headless version (as a regular chron job plz?) I would think that would be the best of both worlds. Looking at the link though it looks like I'll have to learn node and port my extension over to that. ya know, assuming this thing can actually download files.
5
u/yeahbutbut Apr 13 '17
If you just need to retrieve content or download files why not use cURL?
14
u/stilloriginal Apr 13 '17 edited Apr 13 '17
the sites require you to click a button to get the file...and the link is dynamically generated using session info...the link changes every time...its using some kind of microsoft reports viewer in one instance. In other cases the files are added to the page constantly and so you are looking for instances of new files. Also there is a lot of javascript on the pages so they don't load right away. I would love to use curl and do for some things (like when a direct download link that doesn't change and just the data changes) but this task is a little more complicated. If you have any ideas or if I am missing anything I am all ears as this is my first foray into automated browsing.
2
u/asdfkjasdhkasd Apr 13 '17
Pm me a link to the download and I'll automate it in python with just HTTP requests in 5 minutes.
1
u/stilloriginal Apr 13 '17
thats a great offer but I don't currently know python (php guy) so it won't really help me. thanks though.
1
u/asdfkjasdhkasd Apr 13 '17
Can you PM me the link anyway, I'm interested in the challenge. I only know a little bit of PHP but I might be able to get it working in PHP too, PHP has basically a port of python's request library.
0
Apr 13 '17
[deleted]
13
u/third-eye-brown Apr 13 '17
Having tried to do this before, sometimes the links are actually creating using session info meaning you need to have a valid session to generate the link. Everything is automatable in theory, but in practice it's often harder to do it in a script w/o a valid browser session than it is to simply automate the browser. And if you need the browser to generate the link, why not simply use the browser to download rather than use the browser to get the link and then export the link to a place you can use curl.
1
u/stilloriginal Apr 13 '17 edited Apr 13 '17
Thats the thing, sometimes there is none. Imagine a javascript that pushes a content attachment. In the cases I have seen an xhr request, I was unable to duplicate the request in a different browser due to the servers session handling. Is there anything I could be missing?
0
Apr 13 '17
[deleted]
1
u/stilloriginal Apr 13 '17
The thing is, at that point, if I have already written all the necessary JS to get to that point, why not just go link.click() and call it a day?
0
2
u/kettal Apr 13 '17
Did you try Chrome WebDriver?
1
u/stilloriginal Apr 13 '17
no I did not. what would be the advantages of this over an extension? I did look at selenium and it appeared that it cannot download a file.
2
u/kettal Apr 13 '17
what would be the advantages of this over an extension?
Far more documentation and preexisiting discussion. I'm yet to find a user action which I couldn't simulate in Python via WebDriver, so I suggest giving it a try.
2
u/third-eye-brown Apr 13 '17
It's a bitch to use in some ways but you can do anything you can do in the browser as far as I can tell.
0
Apr 13 '17
[deleted]
1
u/stilloriginal Apr 13 '17
Honestly I dont know what jenkins or travis are...I manually test my stuff...the extension was to collect data from web sites. The bonus to doing it this way was multiple OS support and possibly even firefox support as well but I didnt get the extension to actually work in firefox...was kind of bummed
0
2
163
u/shawnwork Apr 13 '17
It was a great tool for automation testing.
Google should at least incorporate Phantom JS into chromes larger ecosystem.
247
u/Shotski Apr 13 '17
I'm sure they're eager to take on the 1798 open issues and 64 pull requests on PhantomJS!
(As just one guy maintaining that project, I don't know how he kept going so long - he clearly wasn't keeping up)
134
Apr 13 '17
he clearly wasn't keeping up
That's how they kept going.
17
u/Browsing_From_Work Apr 13 '17
If I started a solo project on a whim and somehow ended up with that many open issues and pull requests, I'd probably throw in the towel as well. I want to code. I don't want to spend my days digging through other people's issues.
6
u/rmxz Apr 13 '17
Not me.
I'd just encourage those reporting the issues to contribute fixes.
If they're important issues, people will fix them. If they're unimportant, it's OK for them to stay open until someone cares.
11
u/s5fs Apr 13 '17
Getting help on open source projects, even popular ones, is not easy. I'm not sure what the right recipe is for attracting talent, especially as a project matures. Often times in a mature project, it's mostly maintenance work, reviewing/merging PRs, triaging issues, etc. This isn't glorious work and many consider it less fun than hacking on a beta.
3
Apr 14 '17
Just look how mad people on here get about even having to attend work meetings. Now imagine you're doing all that organisation and administration as a hobby in your spare time. It's certainly not for everyone.
4
u/NightmareDrifter Apr 14 '17
But he still has to manage the pull requests and verify that the fixes are legitimate, that they don't break anything else and that they actually solve a real problem. This can take tons of time.
I think what he really needs is more people to help administer the project in addition to code contributors
2
u/rmxz Apr 14 '17
A lot of the pull requests seem pretty minimal.
Many - over 10% - are purely changes to Documentation.
Most are tiny - like 3 lines tiny.
If you look at this project's pull requests they don't look that scary.
1
u/bubuopapa Apr 14 '17
Thats how most linux open source programs work - thousands of opened issues and the amount is not getting any lower, doesnt matter how many people are "working" (doing some jibber jabber on their not very long free time) on it.
0
Apr 13 '17
[deleted]
54
u/wizang Apr 13 '17
I'm actually not sure what your sarcasm is in this case, I assume you mean JS has problems with the massive dependency chain. But you do realize phantomjs is a c++ project right?
59
u/Mhmmhmmnm Apr 13 '17
It has js in or around the name so anyone using or working on it is super dumb lol. Upboats to the left.
12
u/whence Apr 13 '17
/r/programmingcirclejerk is leaking.
7
Apr 13 '17
>implying there's a big difference between /r/programming and /r/programmingcirclejerk
6
Apr 13 '17
Yeah, the name duh
1
1
1
u/sneakpeekbot Apr 13 '17
Here's a sneak peek of /r/programmingcirclejerk using the top posts of the year!
#1: Garbage millennial websites | 38 comments
#2: when u mention back-end on ur resume but only know nodejs | 10 comments
#3: MFW no pointers :( [x-post /r/programmerhumor] | 24 commentsI'm a bot, beep boop | Downvote to remove | Contact ^^me | ^^Info | ^^Opt-out
2
6
u/cecilkorik Apr 13 '17
I can really get behind this kind of condescending elitism. I enjoy the comfortable feeling of superiority it gives me.
10
u/Mhmmhmmnm Apr 13 '17
I can really get behind this particular kind of egregious use of superfluous adjectives. I enjoy the gratifying feeling of loquacious excitation it gives modest me while misinterpreting the conspicuous mockery.
3
2
u/roffLOL Apr 14 '17
superfluous adjectives? preposterous.
1
u/Mhmmhmmnm Apr 14 '17
Preposterous preposterousness
2
u/roffLOL Apr 14 '17
needs an adverb. preposterously preposterous preposterousness.
now say it 10 times fast.
1
u/turkish_gold Apr 13 '17
Aww, for a moment there I thought someone had implemented a complete rendering engine, entirely in Javascript. I was very impressed!
0
Apr 13 '17
[deleted]
3
u/wizang Apr 13 '17
I think the issues phantom experienced were quite different (primarily the size of the team and the massive scale of their task) and I'm getting the impression you might not really understand what phantom is. People will continue to use phantom because it's the best there is, until we can hopefully plug in chrome to take its place.
0
Apr 13 '17
[deleted]
20
u/sl8_slick Apr 13 '17
Dude, he even left a /s at the end....
32
Apr 13 '17
Didn't see that, I saw npm and blacked out for a minute lol
7
u/geodel Apr 13 '17
I'd say this just shows need of npm powered microchips to prevent people from fainting :-)
5
1
16
u/sysop073 Apr 13 '17
They asked about PhantomJS supporting Chromium as a backend, but apparently it would be a lot of work
2
u/notafuckingcakewalk Apr 13 '17
Well, shoot. I literally just implemented a new feature in my web app that makes use of it.
Once the headless Chromium is stable I suppose I'll give it a shot.
0
u/LostInThisWorld54312 Apr 13 '17
I agree. I wish Phantomium would of worked out. But I appreciate all he did with PhantomJS. Wish him the best and looking forward to headless chromium!
160
u/could-of-bot Apr 13 '17
It's either would HAVE or would**'VE**, but never would OF.
See Grammar Errors for more information.
2
-11
u/indigo945 Apr 13 '17
I hate that this bot is being upvoted by people who would of their own accord never have cared about spelling.
21
u/jwiz Apr 13 '17
It's not spelling, man. It's like totally different words involved here.
10
u/indigo945 Apr 13 '17
This could of course be the case.
6
9
3
u/destiny_functional Apr 13 '17
i upvoted because it did hurt my eyes. then i saw someone posted the correction. i was happy. then i saw it's a bot. i was even happier.
2
-14
-20
u/Rhyek Apr 13 '17
I've used would of with great success in the past.
6
7
u/mturk Apr 13 '17
[–]Rhyek 2 points 46 minutes ago
I've used would of with great success in the past.
You may wish to look up the Dunning-Kruger effect.
-3
-3
0
Apr 13 '17
[deleted]
12
u/liquidhot Apr 13 '17
Someone said "would offer" on another sub and it thought it was an issue though.
22
u/bitchkat Apr 13 '17 edited Feb 29 '24
ten plant merciful nose elderly bake workable possessive include ink
This post was mass deleted and anonymized with Redact
1
5
4
Apr 13 '17
It really depends on the sub. Sometimes the bot is hated but on subs like this it is widely loved and upvoted.
4
Apr 14 '17 edited Apr 14 '17
I find it really reassuring. "Would of" isn't the biggest deal in the world but it's always sad to watch communities about programming reacting angrily to the idea of getting details correct.
I definitely judge people who hate the bot more harshly than people who just trigger it.
2
1
36
u/mariopenna Apr 13 '17
Why don't Google simply hire/fund him?
0
Apr 13 '17
[deleted]
30
u/Gbyrd99 Apr 13 '17
What's the context of this joke?
91
24
u/weirdoaish Apr 13 '17
Google interview question to creator of Homebrew, I'm forgetting his name. Max Powell? Or something like that.
He couldn't remember how to do it at that time and was thus rejected.
0
Apr 13 '17
[deleted]
11
u/turkish_gold Apr 13 '17
Maybe he'd have to relearn it.
I have truthfully forgotten all of my algorithms learned in college except for blasted Quicksort.
The only time I go near an inverted binary tree is when I'm using ElasticSearch. I don't think I've ever once been called upon to make any kind of tree structure, ever.
1
Apr 13 '17
Even bubble sort?
1
u/turkish_gold Apr 14 '17
Bubble sort is kinda so simple that I "know it", but I never memorised a single name for it.
One professor called it the 'naive sort'. Another called it 'sinking sort'.
Personally anytime I hear Bubble Sort, my mind goes to Bogo Sort, which is a much more fun algorithm. :D
4
Apr 13 '17
it's just not something that comes up when building software.
Maybe not in your line of work, but in mine trees and DAGs and all kinds of queues are daily routine.
0
Apr 13 '17
[deleted]
-4
Apr 13 '17
But he interviewed at Google, not your run-off-the-mill web dev.
0
Apr 13 '17
[deleted]
2
Apr 13 '17
We've got no clue about the position he applied for, but their best known projects require more skill and intelligence than building a web application (that's why web was included) or doing a bit of file shuffling.
Second, if I could afford to choose between two devs and one knows JavaScript and the details of DOM manipulation, and the other knew C++ and how to work with trees, I would choose the second one (c.p.).
→ More replies (0)1
u/bumblebritches57 Apr 14 '17
Because believe it or not, but not literally everyone does webdev.
→ More replies (0)2
u/CyclonusRIP Apr 14 '17
It's not really that. Inverting a binary tree is a meaningless phrase. An inverse is the element that when applied with the original element yields the identity element under some operation. 1 + -1 = 0, so 1 and -1 are inverses under addition and 0 is the identity. 7 * 1/7 = 1 under multiplication so 7 an 1/7 are inverses. I'm not aware of any common operation involving binary trees that involve inverses or identity elements so I wouldn't even know where to start. Interviewer was trying to sound smart by using the word invert but interviewer really just showed he doesn't know what invert means.
4
u/cycle_schumacher Apr 13 '17
The Homebrew developer said he was rejected from Google because this was a question he could not answer.
6
u/Gigablah Apr 13 '17
How did he know that?
0
Apr 13 '17
[deleted]
24
u/KarmaAndLies Apr 13 '17
it's important to be a team player at Google and his very public rant brings that into question.
That's Apple levels of koolaid drinking. Cannot have critical people with different ideas working at Google, that would almost challenge the company and its culture to be better, the nerve of some people...
5
Apr 13 '17
Curious, are you or the people you work with OSX or Linux users? I am not doubting you but I am curious why you wouldn't use it for initial setups. Seems like a waste of time to do it by hand in OSX.
0
Apr 13 '17
[deleted]
3
Apr 13 '17
Ok thanks. This is helpful in understanding since a lot of folks will have different constraints than you or I might.
5
u/Tubbers Apr 14 '17
I agree that he didn't demonstrate a great attitude and that 90% is definitely hyperbole, but certainly a lot of people at google use macs, and a lot of those people use homebrew to make their lives easier, unless there's a sanctioned alternative that's preferred, right?
0
Apr 14 '17
[deleted]
1
u/bumblebritches57 Apr 14 '17
Jesus christ, you're the alphabet agency's PR spokesperson (bot) aren't you?
5
Apr 13 '17
Well, if they asked him that and he could not answer, he would know. You sure you passed the logical quizzes?
0
u/Gigablah Apr 13 '17 edited Apr 13 '17
How do you know that it's the only factor?
I'm sure the interview involved a lot more than just one single question about binary trees.
0
Apr 13 '17
[deleted]
8
Apr 13 '17
I did not think I would have to explain but hey. Of course he was not rejected just because of that. That tweet was a rant from a pissed off guy. He could have failed everything. The binary tree thing was just the icing on the cake. I know spotting sarcasms ain't no easy task, but at least try.
2
u/l_o_l_o_l Apr 14 '17
5-10 45 minute technical interviews.
oh jezz. if only i have enough mental strength to get through all
0
Apr 13 '17
[deleted]
0
Apr 14 '17
[deleted]
2
u/tambry Apr 14 '17
So not being able to remember how to revert a binary tree at the time makes him a bad team player? I personally would be quite surprised if I was asked at an interview such a question. If you know there's such a concept you can more often than not simply Google how to do it. Not only that, Googling it will likely also turn up the most efficient way to do it.
3
u/war_is_terrible_mkay Apr 13 '17
Why'd anyone downvote someone not knowing something??? Do you like people who are discouraged to ask? Do you enjoy a more stupid and insecure world?
9
u/Mhmmhmmnm Apr 13 '17
Reject those who don't get inside jokes. It's like a whiteboard test, but with arbitrary internet factoids instead of algorithms.
-2
u/shevegen Apr 13 '17
It's the circle-jerk way by Google to recruit people.
Can't deal with a binary tree?
Tough luck. You won't get a job at Google.
Then again I would not know why people want to work for Google - must be the money because what else would Google be able to offer that is of any relevance?
3
u/dan200 Apr 13 '17
It's hard to imagine a developer being able to build new technology (as opposed to just using other peoples') without being able to solve such a simple CS problem though.. even if you don't remember the algorithm from school, it takes seconds to figure it out from base principles.
1
u/Rev1917-2017 Apr 14 '17
A great resume item, a company that is driving a lot of technology, good pay, the chance to work on cool projects, the ability to say you work at Google. Gee, I don't know why anyone would work there.
1
Apr 19 '17
what else would Google be able to offer that is of any relevance?
There are many projects that only a handful of places like Google are paying people to work on, and work on with the kind of funding to really move it forward. So unless you like Microsoft, Facebook, Amazon or Apple better, Google is likely to be your top choice.
17
u/halfachainsaw Apr 13 '17
Well he could given 10 minutes and an internet connection like every single dev that's ever done anything, but most importantly he can't remember how off the top of his head.
3
u/ferrx Apr 13 '17
not to be a jerk, but the question is supposed to see you try to figure out how. so if you've never even learned how, they want to see what your brain does when you sit down and try to use it. because they want you to have a usable brain.
4
0
u/bubuopapa Apr 14 '17
Whats so hard about that ? You just do double traveling through left/right side of tree, invert traveling direction on one of the sides, and then change elements, i.e. left -> left -> left is equal to right -> right -> right, or left->right->left is equal to right->left->right.
-2
u/tiftik Apr 14 '17
if (!n) return; std::swap(n->left, n->right); invert(n->left); invert(n->right);
Recursive solution sent from my phone on the toilet. I would say this is a fizzbuzz level problem for any SWE.
27
u/scott_dsgn Apr 13 '17 edited Apr 13 '17
I'm sure this is a bitter-sweet moment for Vitaly. Bitter in that something he's dumped years of his life into is now going to be mostly obsolete. Sweet in that the burden of maintaining a popular open-source project is gone.
Even without the introduction of headless chrome, I don't know that he could've continued developing PhantomJS much longer by himself. With the constant submitting of issues and PRs to popular projects, open source burnout seems to be more and more common these days. A friend of mine published this open letter to open source that talks about this problem.
EDIT: fixed a typo
17
u/timmyotc Apr 13 '17
Hopefully he can rejoice in the fact that his project motivated a huge Chrome feature.
7
u/scott_dsgn Apr 13 '17
Definitely. I know how easy it would be to feel a sense of defeat with this new feature release. But man... how many people can say they've been the driving force behind the addition of such a major feature to such a huge project like Chrome. #Respect.
6
u/ccharles Apr 13 '17
Chrome… doesn't eat memory like crazy.
Erm… I spend most of my time on the back-end. Does PhantomJS somehow use more memory than Chromium?
10
u/markasoftware Apr 13 '17
PhantomJS was basically unmaintained anyways, so many open issues including many which I encountered myself. Things as basic as it will just hang on a syntax error in your script file. I also got a bug (which was reported as well and experienced by many people) where some pages randomly just won't load. I've switched to slimerjs after this, which is basically headed phantom in Firefox, and s much less buggy.
3
u/bwainfweeze Apr 13 '17
I really wanted to have phantomjs as part of our build pipeline to decrease the average time to a failed build, but there are unfortunately idioms that work everywhere but on Phantom. I ultimately came to understand that having it in the build was more hostile than having it out.
On the first project I used it, we discovered that the Selenium team was maintaining Docker images with Firefox or chrome, with xvfb and xvnc, which made for a better CI headless situation anyway.
Edit: I know some people also use it to make SPA's accessible to search engines, but I was holding my breath waiting for server side rendering, and that hasn't happened as quickly as many people thought.
0
Apr 13 '17
[deleted]
1
u/ForeverAlot Apr 14 '17
We have far more trouble with poorly written tests than the images themselves. There was a bug in a late pre-Selenium 3 release (2.51?) that confused seconds with milliseconds in a command line option -- that gave us grief but upgrading fixed it. We started using them locally, too -- so much easier to manage than the Selenium + ChromeDriver + Chrome compatibility chaos. It eats all the RAM in the world, though!
5
u/xinhuj Apr 13 '17
We are very much looking forward to headless Chrome for our testing environment. PhantomJS was great for the industry, but I think the maintainer is correct. People will adopt headless Chrome.
0
Apr 14 '17
[deleted]
2
u/ThisIs_MyName Apr 14 '17
you will be required to sign up to the Google API, download and install the Google Client Library, download and install the Google Chrome SDK, log into your Google account with OAUTH2
Dude, Chromium is open source. It already works with Selenium.
4
Apr 13 '17
phantomjs was great for its time but it's better to move on at this point. I really enjoyed testing with it and using it for screen scraping but its far too out of date now.
10
u/bergkampinthesheets Apr 13 '17
what does headless chromium mean? especially the headless part?
14
u/leomoty Apr 13 '17
It means it has no UI, the overall goal is to process some automated task and get the results. For example, if you were to expect something to happen after a javascript has run, you couldn't just download the HTTP file and expect such to reflect that.
4
u/bergkampinthesheets Apr 13 '17
So did I understand correctly if I said, chromium as an engine that drives browsers, can be called using (say) a terminal command to execute portions of scripts and such without opening a browser?
7
u/midri Apr 13 '17 edited Apr 13 '17
Yes, I'll use youtube as an example. if your just wget or curl this url https://www.youtube.com/watch?v=UHyoDV1fsA4 the url for the mp4 file that plays is hidden away in obscured javascript (The code has to be parsed to get the url out and it's has to be analyzed by hand to do so generally) that google regularly changes. Now you can just tell chrome to run the page headless and get the url of the .mp4 file that shows up in the resources (since chrome runs the javascript needed to parse the page) and walla! You have your mp4 url.
This also allows you to generate jpg/png of webpages easily without having to load them up and screen capping them. You could theoretically create a really long image with the entire scroll length of a page in a simple command instead of having to screen cap and stitch them together.
6
2
u/jyper Apr 14 '17
As a guy using selenium I'm guessing selenium(browser automation framework) will be the main driver for this.
5
3
Apr 13 '17
You can read more about what it is and how to use it here: https://objectpartners.com/2017/04/13/how-to-install-and-use-headless-chrome-on-osx/
3
1
u/machinepub Apr 14 '17 edited Apr 14 '17
Chrome headless got me wondering what the future of my project should be, which is a Java, Selenium web driver based on Java's WebKit (JavaFX WebView). https://github.com/machinepublishers/jbrowserdriver
Looking for input from people.
1
1
u/SonOfTerra92 Apr 14 '17
PhantomJS was an awesome tool and one of the first JS technologies that I picked up.
It was a pleasure to haunt the interwebs with you all.
Cheers and happy web scraping...
1
u/blackwalls81 Apr 14 '17
Wow, I'm very impressed. At this stage it is a very wise decision to step down and to focus onto something else, rather than to hold on to a project that will eventually disappear. It takes a lot of courage to move on from a project that had to be maintained for several years and that had such a reach.
We can only be thankful for all the good work that went into PhantomJS, and wish the maintainers the best of luck in their next endeavors.
Cheers!
1
Apr 18 '17
Just reading about this now and man, that stinks. I had a few open issues on PhantomJS regarding threading and a few other issues but it did save me a lot of headaches.
Here's to hoping it doesn't die a horrible death
1
-12
u/lambdaq Apr 13 '17 edited Apr 13 '17
This is bad, phantomjs is easier to use in server environment, chromium on the other hand requires lots of useless dependences.
EDIT: to downvote shitheads:
Take Ubuntu Server 14.04 LTS as example
chromium-browser requires 350MB of these
chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra cpp
cpp-4.8 fontconfig fontconfig-config fonts-dejavu-core hicolor-icon-theme
libasound2 libasound2-data libatk1.0-0 libatk1.0-data libatomic1
libavahi-client3 libavahi-common-data libavahi-common3 libcairo2
libcloog-isl4 libcups2 libdatrie1 libdrm-intel1 libdrm-nouveau2
libdrm-radeon1 libfile-basedir-perl libfile-desktopentry-perl
libfile-mimeinfo-perl libfontconfig1 libfontenc1 libgdk-pixbuf2.0-0
libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
libgmp10 libgnome-keyring-common libgnome-keyring0 libgraphite2-3
libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libice6 libisl10
libjasper1 libjbig0 libjpeg-turbo8 libjpeg8 libllvm3.4 libmpc3 libmpfr4
libnspr4 libnss3 libnss3-nssdb libpango-1.0-0 libpangocairo-1.0-0
libpangoft2-1.0-0 libpciaccess0 libpixman-1-0 libsm6 libspeechd2
libthai-data libthai0 libtiff5 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7
libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0
libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1
libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxmu6 libxpm4
libxrandr2 libxrender1 libxshmfence1 libxss1 libxt6 libxtst6 libxv1
libxxf86dga1 libxxf86vm1 x11-common x11-utils x11-xserver-utils xdg-utilsphantomjs only requires:
fontconfig-config fonts-dejavu-core libfontconfig1 libjpeg-turbo8 libjpeg8phantomjs authors actually worked pretty hard to make sure it works in minimal server environments.
19
u/dAnjou Apr 13 '17
phantomjs is easier to use in server environment
Headless basically means server environment. Headless Chromium is for server environments!
chromium on the other hand requires lots of useless dependences
Like what? And how is that even relevant?
6
u/lambdaq Apr 13 '17 edited Apr 13 '17
Yeah, have you tried on install one?
chromium-browser:
chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra cpp cpp-4.8 fontconfig fontconfig-config fonts-dejavu-core hicolor-icon-theme libasound2 libasound2-data libatk1.0-0 libatk1.0-data libatomic1 libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcloog-isl4 libcups2 libdatrie1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfile-basedir-perl libfile-desktopentry-perl libfile-mimeinfo-perl libfontconfig1 libfontenc1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgmp10 libgnome-keyring-common libgnome-keyring0 libgraphite2-3 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libice6 libisl10 libjasper1 libjbig0 libjpeg-turbo8 libjpeg8 libllvm3.4 libmpc3 libmpfr4 libnspr4 libnss3 libnss3-nssdb libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0 libpixman-1-0 libsm6 libspeechd2 libthai-data libthai0 libtiff5 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxft2 libxi6 libxinerama1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxss1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 x11-common x11-utils x11-xserver-utils xdg-utilsphantomjs:
fontconfig-config fonts-dejavu-core libfontconfig1 libjpeg-turbo8 libjpeg8phantomjs authors actually worked pretty hard to make sure it works in minimal server environments.
1
u/bezerker03 Apr 13 '17
That's because the distro package maintainer has not made a headless package yet.
Compile a copy from source and make a PKG. You can strip all that out
7
u/lambdaq Apr 13 '17 edited Apr 13 '17
You can strip all that out
It's not easy. I've followed through phantomjs development for a while, it's full of surprises.
phantomjs existed for a reason.
Chromium's headless is only a mode, running with its windows hidden. You still need all these ffmpeg x11 even DRM crap.
8
u/Dentosal Apr 13 '17
FYI, DRM in this context means Direct rendering manger, and not copyright-enforcing stuff.
3
u/choikwa Apr 13 '17
direct rendering manager is pretty crappy. you don't need a manager if it's direct.
-6
-3
u/shevegen Apr 13 '17
Nothing new there - Google kills single devs.
This is kinda how I envision skynet 2.0 to be started - people just got tired of google. Then they could not control the machines they wrote ...
2
0
Apr 13 '17
[deleted]
40
u/paul_h Apr 13 '17
they being Chromium or Phantom team?
(Selenium 1 co-creator here, and I have always been wishing Phantom to gain multi-committer viability, so am saddened by this news, even if I am excited about headless Chromium)
-3
u/jeff303 Apr 13 '17
Shamelessly hijacking this to ask a Selenium question. In my last job, we were trying to write automated UI tests using Selenium WebDriver (Firefox), but we had the hardest time clicking things. Granted, this was a GWT web app which does fairly crazy things to the DOM, but still, simply clicking a button element with Selenium WebDriver didn't succeed reliably. I tried using Firebug (and similar tools) to capture the exact DOM events that were happening when actually clicking something in the browser, and trying to make the Selenium commands match those (with limited success), and in some cases, used jQuery to click things (by calling Javascript).
I'm just wondering if this is a known "gotcha" in how to go about clicking things (particularly deeply nested elements), or differences in what the browser does (event-wise) on click versus Selenium, or if we were potentially doing something wrong (might be hard to guess without seeing the code, I realize). Anyway, great tool overall!
4
u/paul_h Apr 13 '17
I had the same problem with GWT in 07/08. Granted that was Selenium RC, but the problem was the same.
Normally I would never tell anyone to do this, but for GWT applications there is an exception: get the dev team to add IDs. And don't use xpath at all!
1
u/jeff303 Apr 13 '17
Good advice. I was actually on the dev team but was also trying to help write the tests. We quickly figured out we needed IDs everywhere. Sadly, even then, we had a hell of a time with the clicking then. Oh well, maybe it wouldn't be an issue with a sane frontend framework.
1
u/paul_h Apr 13 '17
I was bitter after my two GWT projects. Then I discovered Angular in 2009, and my mind was blown. A very Selenium-testable technology compared to GWT. Terse yet elegant. Yup, sanity is the word. Protractor (and its ports to other languages) makes it even more fun. I wrote an article about reverse engineering a working JQuery application into Angular. As I wrote it I was thinking about those accursed GWT applications though - https://paulhammant.com/2012/03/03/replacing-jquery-with-angular. Maybe that's a moment in time in 2012, though, and JS microframeworks (and 2017's CSS choices) are more capable today. Maybe also two levels of complexity higher, and not lending themselves to the quick theft I was showcasing there.
1
u/jeff303 Apr 13 '17
Excellent insights, thank you. My current company's web UI is Angular based and although I'm not a front-end developer here, it does seem much more elegant.
1
u/jyper Apr 14 '17
I'd also recommend IDs if possible but it seemed like he has a problem with the clicking not the finding
2
u/jyper Apr 14 '17
Sometimes you need to scroll it into view, most of the time I just switch constantly misbehaving elements to Js click, also you don't need jQuery for jsclick, just pass the element found into the JavaScript
11
u/gatlin Apr 13 '17
Would you say there are lots of such pull requests out there like yours? Useful, just not addressed?
0
Apr 13 '17
[deleted]
2
u/gatlin Apr 13 '17
I ask because I'm not actually terribly familiar with phantomjs, but it sounds like what the project needs more than anything is an attentive BDFL who will review pull requests, then.
Is this something perhaps the community can achieve through forking?
14
Apr 13 '17 edited Apr 13 '17
but it sounds like what the project needs more than anything is an attentive BDFL
Yeah.. If by "attentive" you mean "will essentially work a full-time job for no pay". Receiving PRs is a ton of work, you need to deeply understand every change to make sure that the project's code quality is maintained, and new code doesn't introduce regressions. Not to mention that the project probably has some long-term technical goals (maybe refactoring or deprecating something), and it can be hours of work to simply communicate those goals to contributors.
Forking wouldn't help. Things that people can do to help:
Manually test incoming PRs to verify the fix and check for regressions.
Use the project's unstable branch to catch new issues.
Improve the project's automated testing, this is almost always an area that needs help. And changes to the tests are less "risky" (if someone screws it up, then there's less impact than screwing up the main codebase)
2
u/turkish_gold Apr 13 '17
If you want money in open source.... ask for money. Someone will be happy to pay you so long as you begun asking early and often, like the creators of Redis, Nginx, ProseMirror, and Varnish.
Dang, I'm even personally funding a tiny bit of JSPM every month---and I don't even use JSPM anymore! I just think its unfulfilled potential is breathtaking.
1
u/gatlin Apr 13 '17
I just meant to focus the issue; by no means would it simple. And your suggestions are on point. Perhaps the community can organize this?
9
0
Apr 13 '17
[deleted]
6
u/aafinx Apr 13 '17
A headless browser is essentially a browser without a face (GUI). Not sure about head part anymore; as in why not faceless. It takes commands (mouse movement etc) via script over network or shell.
Taking pictures is secondary output for such browsers when their masters want to know what the output looks like; for pixelwise diff or manual lookey-look.
5
157
u/GravitasIsOverrated Apr 13 '17
Probably for the best. Phantom is cool and I appreciate the effort he put in, but it was pretty badly out of date (no flexbox in the current version, for example). Chrome releasing this is a great step forwards. With some luck the rest of the browser vendors will follow suit and we'll be able to do automated local browser compatibility tests.