Closed technobly closed 4 years ago
This is a bug tracker, not a support forum; please do not post this sort of help request here in the future.
For general question, code review request, build problem, or other related discussion, please post it to either:
phantomjs
tag)If you have not read it yet, please check also a few tips on Effective Q&A.
@zackw I posted this as a bug, with the intention that I was trying to help fix it. The login loads on Windows but not on Mac. PhantomJS is doing something different with the same code on two different systems. I though I created a nice minimum reproducible example.
I see there are thousands of issues here though, so perhaps only bugs that have root cause source code identified are allowed?
I have posted the same thing in the places as you have suggested: PhantomJS users group Stackoverflow
I'm sorry, I clearly need to work on the phrasing of that canned message some more.
I also didn't read your original post carefully enough. I see now that you do have a narrowed-down test case. (We get a lot of bug reports with no test case at all, just "PhantomJS crashes on my site, help" with no further information.) Unfortunately, it's not narrowed down enough, because it still depends on a third-party website that could change at any time and make the bug stop manifesting.
So the next thing we need you to do is snapshot www.dubtrack.fm/login
and start minimizing that until you have a set of HTML, JS and CSS files and maybe also web server configuration that reliably trigger the bug. That will also tell us whether this is a network-layer (Qt) issue or a Webkit issue.
... and then I'm probably going to tell you to report the problem directly to the Webkit developers, so let me point you at their bug writing guidelines now.
Oh, also, since you mention node, are you still on 1.x? We are not doing any further development on 1.x, and 2.0 has a much newer Webkit and Qt which may have resolved the problem. I know 2.0 is still not available as a node module; we keep poking them but they don't budge.
Thanks for reopening :)
This was with PhantomJS 2.0.0 on both systems. I had installed PhantomJS with Homebrew. On Windows I just dropped the exe in the directory with load.js. I also tried downloading the tar for Mac and putting the phantomjs binary in the directory with load.js and unlinking the phantomjs installed by Homebrew, but it just results in a weird output:
$ ./phantomjs load.js
Killed: 9
I'm not really a web developer, so it will be fairly hard for me to minimize the HTML, JS and CSS that is required to create the login modal and generate a bug. I was hoping some advanced PhantomJS developers have better debugging capabilities than I do using PhantomJS events, and see what the difference is between Windows and Mac in this particular test case.
As of today, I just verified that the modal still loads on Windows and not on Mac though.
Here's a log output from MAC: http://pastebin.com/DmQpcnVB and one from WINDOWS: http://pastebin.com/Tqn91wDn
var page = require('webpage').create();
page.viewportSize = {
width: 1280,
height: 720
};
function printArgs() {
var i, ilen;
for (i = 0, ilen = arguments.length; i < ilen; ++i) {
console.log(" arguments[" + i + "] = " + JSON.stringify(arguments[i]));
}
console.log("");
}
////////////////////////////////////////////////////////////////////////////////
page.onInitialized = function() {
console.log("page.onInitialized");
printArgs.apply(this, arguments);
};
page.onLoadStarted = function() {
console.log("page.onLoadStarted");
page.render("test-onLoadStarted.png");
printArgs.apply(this, arguments);
};
page.onLoadFinished = function() {
console.log("page.onLoadFinished");
page.render("test-onLoadFinished.png");
printArgs.apply(this, arguments);
};
page.onUrlChanged = function() {
console.log("page.onUrlChanged");
printArgs.apply(this, arguments);
};
page.onNavigationRequested = function() {
console.log("page.onNavigationRequested");
printArgs.apply(this, arguments);
};
page.onRepaintRequested = function() {
// console.log("page.onRepaintRequested");
// printArgs.apply(this, arguments);
};
if (true) {
page.onResourceRequested = function() {
console.log("page.onResourceRequested");
printArgs.apply(this, arguments);
};
page.onResourceReceived = function() {
console.log("page.onResourceReceived");
printArgs.apply(this, arguments);
};
}
page.onClosing = function() {
console.log("page.onClosing");
printArgs.apply(this, arguments);
};
page.onError = function() {
console.log("page.onError");
printArgs.apply(this, arguments);
};
page.onResourceError = function() {
console.log("page.onResourceError");
printArgs.apply(this, arguments);
};
page.onResourceTimeout = function() {
console.log("page.onResourceTimeout");
printArgs.apply(this, arguments);
};
// window.console.log(msg);
page.onConsoleMessage = function() {
console.log("page.onConsoleMessage");
printArgs.apply(this, arguments);
};
// window.alert(msg);
page.onAlert = function() {
console.log("page.onAlert");
printArgs.apply(this, arguments);
};
// var confirmed = window.confirm(msg);
page.onConfirm = function() {
console.log("page.onConfirm");
printArgs.apply(this, arguments);
};
// var user_value = window.prompt(msg, default_value);
page.onPrompt = function() {
console.log("page.onPrompt");
printArgs.apply(this, arguments);
};
page.open('https://www.dubtrack.fm/login', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('example1.png');
}
setTimeout(function(){
page.render('example2.png');
phantom.exit();
},3000);
});
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
Testing on Windows 8.1 Pro vs Mac OSX 10.10.5 I'm running a native PhantomJS app and getting a halfway loaded Login screen on Mac, but it works on Windows. Basically the initial page load works on both systems, but on Mac the javascript that loads resources to open the login modal never seems to run. How can I debug this further?
load.js
Run with:
Output:
example1.png Windows (initial page load)
example2.png Windows (wait 3 seconds for login modal)
example1.png Mac (initial page load)
example2.png Mac (even waiting 20 seconds, login doesn't load)