Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot load url and then, cannot send login parameters

I'm trying to login automatically in tumblr, running the script proposed here but phantomjs only shows failed attempts:

[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://tumblr.com/login, HTTP GET
[debug] [phantom] Navigation requested: url=https://tumblr.com/login, type=Other,willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://tumblr.com/login
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] Logging in
[info] [remote] attempting to fetch form element from selector: '#signup_form'
[info] [phantom] Step anonymous 2/3: done in 2899ms.
[info] [phantom] Step _step 3/3: done in 2912ms.
[warning] [phantom] Casper.waitFor() timeout  
[error] [phantom] Wait timeout of 100000ms expired, exiting.
Wait timeout of 100000ms expired, exiting.

I increased the original timeout script without success, my workstation uses: - Windows 7 64bits - Casperjs 1.1.0 - Phantomjs 1.9.1

thanks.

like image 742
Julian Avatar asked Sep 13 '13 00:09

Julian


People also ask

How do you solve the can't load URL the domain of this URL isn't included in the app's domains Facebook login error?

To be able to load this URL, add all domains and sub-domains of your app to the App Domains field in your app settings.

How do I change my callback URL on Facebook app?

In the "Facebook Login" tab under your app, enter all valid callback URL's, such as http://localhost/callback, http://productionUrl/callback, etc. If you don't see "Facebook Login" tab under your app, click "Add Product-> Facebook Login->Get Started" Enter the Valid Callback Urls -> Save changes.

Where is client OAuth settings in Facebook?

In the App Dashboard, choose your app and scroll to Add a Product Click Set Up in the Facebook Login card. Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.

What is valid OAuth redirect URIs Facebook?

A valid redirect URI is the URI within your application where Facebook will send you “stuff.” Meaning, the URI within your application where Facebook may send you an authorization code and an access token.


2 Answers

I finally found a solution for this issue. Tumblr is using the TLSv1.2 encryption for their site while PhantomJS defaults to SSLv3.

To fix this, you can either call CasperJS with either:

casperjs tumblr.js --ssl-protocol=tlsv1

or

casperjs tumblr.js --ssl-protocol=any
like image 153
hexid Avatar answered Oct 21 '22 16:10

hexid


With my version of casperjs and phantomjs, the cli ssl protocol parameter was being ignored, I had to put it in a config file instead:

casperjs browse.js --config=<(echo '{"sslProtocol": "any"}') --ignore-ssl-errors=true
like image 22
AXE Labs Avatar answered Oct 21 '22 17:10

AXE Labs