-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Rendering to stdout fails #14059
Comments
Sorry, I'm not sure what is happening, it seems it has worked but not anymore...
I'm running
|
Sorry I don't really understand what is happening there. It seems to fail when I install phantomjs with Note that I tried to launch phantomjs with sudo and did not work better. I also used in both cases the 1.9.0 version which is available on apt-get and npm, and got different results. Any idea why it fails when installed through npm (on ubuntu?). It was the case on my laptop, and on a remote server running a more recent version of ubuntu. |
The report is a bit confusing. I think you need to summarize it again so we all can understand clearly in which situation(s) the rendering does not as expected. In each situation, please provide the information on:
Also, if possible, eliminate the case where you install PhantomJS via npm because we do not own or control that module. You have to bring up any problem with npm package to https://github.com/Medium/phantomjs. Thank you! |
@ariya to sum it up, I don't exactly know what happens, but here are some insights: Script to run:
|
I am also suffering from this. This occurs with all writes to stdout, not just page.render. It is possible to "flush" the data out by writing more things to stdout/stdin. const sys = require('system');
const inp = sys.stdin;
const out = sys.stdout;
const wp = require('webpage');
var inst = new lorem ();
function lorem () {
this.run = function (inp) {
eval(inp);
};
this.ping = function () {
out.writeLine("pong");
}
this.Open = function (url) {
var page = wp.create();
page.open("http://example.com", function(status) {
out.writeLine("OK");
});
};
}
function listenIO () {
setTimeout(function () {
var ln = inp.readLine();
inst.run(ln);
// out.flush(); doesn't matter
listenIO();
}, 0);
}
listenIO(); $ phantomjs main.js
this.ping()
pong
this.ping()
pong
this.Open()
this.Open()
OK
this.Open()
OK
this.ping()
pong
OK
this.Open()
// lorem
OK
^C |
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
I run
phantomjs recorder.js >> test.png
This works with 1.9.7
This does not work with 2.1.1
In 2.1.1,
test.png
remains empty while content was expectedThe text was updated successfully, but these errors were encountered: