Code Monkey home page Code Monkey logo

Comments (10)

carpii avatar carpii commented on July 30, 2024

Hi @Sc0th

Are you sure you copied your config.js over to the new VM?

Try changing get_combined_ofx.js, so casper outputs more debug info...

var casper = require('casper').create({
    verbose: true,
    logLevel: 'debug',
    etc

This should give you an idea of which step is not progressing properly.
I've confirmed it is still working ok for me

from barclayscrape.

Sc0th avatar Sc0th commented on July 30, 2024

Hey @carpii

config.js is present and correct, output from debug is as follows, hope this give you a clue as to what I have got wrong!

As an aside, I have checked the login manually using word & passcode, login without issue. I have also run a curl pull on the url below and can retrieve it successfully.

phantomjs - 1.9.6 (have also tried 2.2.1 with identical results)
casperjs - 1.1.4

[info]�[phantom] Starting...
[info]�[phantom] Running suite: 3 steps
[debug]�[phantom] opening url: https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do, HTTP GET
[debug]�[phantom] Navigation requested: url=https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do, type=Other, willNavigate=true, isMainFrame=true
[warning]�[phantom] Loading resource failed with status=fail: https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do
[debug]�[phantom] Successfully injected Casper client-side utilities
[debug]�[phantom] Login stage 1
[debug]�[phantom] Login stage 2 - Passcode and Memoerable word
[info]�[phantom] Step loginStageOne 2/3: done in 1044ms.
[info]�[phantom] Step _step 3/6: done in 1064ms.
[warning]�[phantom] Casper.waitFor() timeout
[error]�[phantom] Wait timeout of 5000ms expired, exiting.
�Wait timeout of 5000ms expired, exiting.�

from barclayscrape.

Sc0th avatar Sc0th commented on July 30, 2024

looks to be something related to ssl, can't quite see how to set the '--ignore-ssl-errors=true' option, will keep poking about...

from barclayscrape.

Sc0th avatar Sc0th commented on July 30, 2024

running with:

casperjs --ignore-ssl-errors=tue --ssl-protocol=any --debug=yes ./get_combined_ofx.js

provides:

[debug] [phantom] opening url: https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do, HTTP GET
[debug] [phantom] Navigation requested: url=https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do, type=Other, willNavigate=true, isMainFrame=true
2017-09-14T17:04:58 [DEBUG] Network - Resource request error: 6 ( "SSL handshake failed" ) URL: "https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do"
2017-09-14T17:04:58 [DEBUG] WebPage - updateLoadingProgress: 100
2017-09-14T17:04:58 [DEBUG] WebPage - evaluateJavaScript "(function() { return (function () {
return typeof utils === "object";
})(); })()"
2017-09-14T17:04:58 [DEBUG] WebPage - evaluateJavaScript result QVariant(bool, false)
[warning] [phantom] Loading resource failed with status=fail: https://bank.barclays.co.uk/olb/authlogin/loginAppContainer.do

from barclayscrape.

carpii avatar carpii commented on July 30, 2024

What version of phantomjs and casperjs?

Im not seeing SSL issues, although I'm running on a Mac (with casperjs 1.1.4 and phantomjs 2.1.1)

--ignore-ssl-errors=tue 

This was just a typo?

from barclayscrape.

Sc0th avatar Sc0th commented on July 30, 2024

Hi, yes it was a typo, does not work when my phat fingers get it right either.

[root@nox barclayscrape]# phantomjs --version
1.9.6
[root@nox barclayscrape]# casperjs --version
1.1.4
[root@nox barclayscrape]#

I have tried with 2.1.1 also, made no odds.

What is frustrating is that the arguments seem to be ignored, the head of the debug output states -

2017-09-14T18:58:35 [DEBUG] Phantom - execute: Configuration
2017-09-14T18:58:35 [DEBUG] 0 objectName : ""
2017-09-14T18:58:35 [DEBUG] 1 cookiesFile : ""
2017-09-14T18:58:35 [DEBUG] 2 diskCacheEnabled : "false"
2017-09-14T18:58:35 [DEBUG] 3 maxDiskCacheSize : "-1"
2017-09-14T18:58:35 [DEBUG] 4 ignoreSslErrors : "false"
2017-09-14T18:58:35 [DEBUG] 5 localToRemoteUrlAccessEnabled : "false"
2017-09-14T18:58:35 [DEBUG] 6 outputEncoding : "UTF-8"
2017-09-14T18:58:35 [DEBUG] 7 proxyType : "http"
2017-09-14T18:58:35 [DEBUG] 8 proxy : ":1080"
2017-09-14T18:58:35 [DEBUG] 9 proxyAuth : ":"
2017-09-14T18:58:35 [DEBUG] 10 scriptEncoding : "UTF-8"
2017-09-14T18:58:35 [DEBUG] 11 webSecurityEnabled : "true"
2017-09-14T18:58:35 [DEBUG] 12 offlineStoragePath : ""
2017-09-14T18:58:35 [DEBUG] 13 offlineStorageDefaultQuota : "-1"
2017-09-14T18:58:35 [DEBUG] 14 printDebugMessages : "true"
2017-09-14T18:58:35 [DEBUG] 15 javascriptCanOpenWindows : "true"
2017-09-14T18:58:35 [DEBUG] 16 javascriptCanCloseWindows : "true"
2017-09-14T18:58:35 [DEBUG] 17 sslProtocol : "sslv3"

I suspect getting the two ssl related variables to switch would fix the problem I am seeing. If I could figure out how... :)

from barclayscrape.

carpii avatar carpii commented on July 30, 2024

Do you get a different error if you prevent it trying to choose sslv3?

--ssl-protocol=tlsv1

For whatever reason, when I run your command, the ignore-ssl option does seem to be getting passed through to phantomjs properly.
I'd stick with trying to get phantomjs 2.1.1 working, I seem to recall it contains other unrelated fixes which are needed.

casperjs --ignore-ssl-errors=true --ssl-protocol=any --debug=yes ./get_combined_ofx.js
2017-09-14T12:02:31 [DEBUG] CookieJar - Created but will not store cookies (use option '--cookies-file=<filename>' to enable persistent cookie storage)
2017-09-14T12:02:32 [DEBUG] Set  "http"  proxy to:  "" : 1080
2017-09-14T12:02:32 [DEBUG] Phantom - execute: Configuration
2017-09-14T12:02:32 [DEBUG]      0 objectName : ""
2017-09-14T12:02:32 [DEBUG]      1 cookiesFile : ""
2017-09-14T12:02:32 [DEBUG]      2 diskCacheEnabled : "false"
2017-09-14T12:02:32 [DEBUG]      3 maxDiskCacheSize : "-1"
2017-09-14T12:02:32 [DEBUG]      4 diskCachePath : ""
2017-09-14T12:02:32 [DEBUG]      5 ignoreSslErrors : "true"

from barclayscrape.

Sc0th avatar Sc0th commented on July 30, 2024

Woooo Hoooo!

Blew it all away, pulled fresh from git, updated phantomjs to 2.1.1, and it bloomin' well works,

Thank you so much for your help and guidance!

from barclayscrape.

carpii avatar carpii commented on July 30, 2024

No probs. Glad you got it working, because I was just about out of ideas ;-D

from barclayscrape.

carpii avatar carpii commented on July 30, 2024

@russss Could we close this ticket please?

from barclayscrape.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.