Open weilun106 opened 7 years ago
Maybe SSL handshake issue, try this to debug:
page.onResourceError = function(resourceError) {
console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')');
console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString);
};
and you can see if this works to confirm:
phantomjs --ignore-ssl-errors=yes --ssl-protocol=tlsv1 ge-cancellation-checker.phantom.js
@jowilki Thanks for the response. I tried but it seems not the case. There's no error message after adding function(resourceError)
. I'm still getting Fatal error: Unable to find Manage Appointment button
.
Just curious if I'm the only one who cannot get the script running on OSX? Found another guy getting the same issue on El Cap as well.
This works for me as-is on OSX El Capitan (didnt need to change ssl params). What does the page.onResourceError return for you?
I don't think any of the html selectors have changed so it seems like there's some error with the request in your case. They did start using radial buttons instead of the dropdown, but that hasn't affected the script since the dom element is the same.
I added function(resourceError)
under function(msg, trace)
, like this,
if (!VERBOSE) { return; }
console.error('Error on page: ' + msg);
}
page.onResourceError = function(resourceError) {
console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')');
console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString);
};
Am I using it wrong? This is all I was getting and nothing really helps.
Please wait...
On GOES login page...
Error on page: TypeError: null is not an object (evaluating 'document.querySelector('form[action=j_security_check]').submit')
phantomjs://code/ge-cancellation-checker.phantom.js:55 in onError
Bypassing human check...
Fatal error: Unable to find Manage Appointment button
I'm using OSX Sierra 10.12.1 though. Can confirm that it was fine when I was using El Cap.
Has anyone found a fix for this yet? I can take a closer look at the bug, but was just wondering if someone else has already 😄
I see the same problem on Ubuntu, with slightly different output. Error discusses problem with loading local resource.
The name of the button looks fine, from perusing the console.
kevin@awabi:~/src/ge-cancellation-checker$ phantomjs ge-cancellation-checker.phantom.js -v Please wait... On GOES login page... Logging in... Bypassing human check... Not allowed to load local resource: file://ge-cancellation-checker.phantom.js/goes/HomePagePreAction.do Fatal error: Unable to find Manage Appointment button
Hi nereocystis,
I had an identical problem using ubuntu 16.04 PhantomJS 2.1.1 (from apt). What us happening is that this script is not actually bypassing the "I'm human" check box correctly. I was able bypass this following the suggestion in this issue ([https://github.com/davidofwatkins/ge-cancellation-checker/issues/20]). By replacing: (line 109ish?) - submitHome(); with window.location = "https://goes-app.cbp.dhs.gov/goes/HomePagePre Action.do";
Let me know if this helps. Cheers!
I also had to change the interval between steps from 100
ms to 200
ms, which is on the last line of the JS file.
I confirm having the same issue. I'm on Sierra 10.12.6 Tried @mbgearhead's suggestion on line 112 but that didn't fix the issue.
Hi @wzaatar, did you try @jondubin suggestion to change the interval? Perhaps DHS is getting ahead of these automation apps again... As both I and my significant other already have global-entry, I unfortunately cannot debug this issue any longer. If someone else wants to take a crack at this, I'm happy to help out as needed
Hi all. I'm trying to use the script for my friend, which was working couple months ago for me. I got the following error,
I can get around the
Can't find variable: submitHome
by manually calling window.location to the full URL, props to @iokevins shared in #20. However,.bluebutton[name=manageAptm]
does not seem to respond. Any ideas?Also they have updated the location selection page from drop down menu. Not sure if it's going to affect the script. Cannot get it tested at the moment.