Open technobly opened 9 years ago
Having the same problem. Which OS are you using?
OSX 10.10.5 Yosemite I have PhantomJS 2.0.0 installed via Homebrew Was using NodeJS v0.10.33 for above results
Now that I just upgraded to NodeJS v4.2.1 I'm not getting anything to work past were it says [LOGIN]. See the 3 trace logs here, only [LOGIN] is visible now. I used to get all of the way through the .login function in the past.
DubtrackAPI.prototype.login = function() {
console.log("[LOGIN]");
var self = this;
this.createPage(function(ph) {
console.log("[CREATE PAGE - THIS]");
self.ph = ph;
self.ph.createPage(function (page) {
console.log("[CREATE PAGE - SELF]");
Ok just ran these again in the bot directory, for some reason that made it work again. And by work I just mean it runs through and gives me the Tried to login but was not successful. error again. Here's my trace:
[LOGIN]
[CREATE PAGE - THIS]
[CREATE PAGE - SELF]
[LOGIN PAGE OPEN]
Resource requested..
Loading started
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource requested..
Resource requested..
Resource received!
Resource received!
Resource requested..
Resource requested..
Resource received!
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource requested..
Resource received!
Resource requested..
Resource received!
Resource received!
Resource received!
Resource requested..
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource received!
Resource requested..
Resource received!
Resource requested..
Resource received!
Resource received!
Resource received!
Loading finished
[LOGIN PAGE OPEN 1]success
[LOGIN PAGE OPEN after 3 seconds]
[CREDS] {
"username": "myusername",
"password": "mypassword"
}
[CHECK LOGIN]
Resource requested..
Loading started
Resource requested..
Resource requested..
Resource requested..
Resource received!
Resource requested..
Resource requested..
Resource received!
Resource received!
Resource received!
Resource received!
Loading finished
Resource received!
Tried to login but was not successful. Sorry.
So I just installed everything on Windows 8.1 Pro and it works. It did not work with an older version of NodeJS though. Sucks that you have to install 8GB worth of MS Visual Studio Crap (which I can probably delete now)... but interesting that it works there and not on Mac. I followed these steps: https://github.com/atomjack/dubtrackapi/issues/13#issuecomment-148935066
Here's my login screens now on Windows:
I'm guessing something with PhantomJS is not working... but unsure how to debug it.
More testing on Windows vs Mac I ran a native PhantomJS app and got the same halfway loaded Login screen on Mac, but it works on Windows.
var page = require('webpage').create();
page.viewportSize = {
width: 1280,
height: 720
};
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);
});
phantomjs load.js
Status: success
Exactly the same setup here and exactly the same output. Clearly an issue with OSX. I worked on this, same as you appear to have, for hours upon hours, but to no avail. Sadly, I'm not sure how to debug further (I finally hit that poing where I was making no progress or gaining any new info).
Submitted an issue to the PhantomJS repo: https://github.com/ariya/phantomjs/issues/13696
Thanks @technobly. I've subscribed to that issue. Hopefully they'll have a fix or some suggestions.
Getting this error trying to login, a render before and after the creds entry. Seems like the login modal hasn't loaded. I've changed the timeout to 30 seconds and nothing changes. Any ideas?