Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Net::Google::AuthSub always fails to log in

by marvell (Pilgrim)
on Jul 11, 2012 at 14:47 UTC ( [id://981138]=perlquestion: print w/replies, xml ) Need Help??

marvell has asked for the wisdom of the Perl Monks concerning the following question:

Good Afternoon

I have this simple script:

#!/usr/bin/perl use Net::Google::AuthSub; use warnings; local $ENV{GOOGLE_DATAAPI_DEBUG} = 1; my $auth = Net::Google::AuthSub->new; my $response = $auth->login('person@place.com', 'xxxxxxxx'); if ($response->is_success) { print "Hurrah! Logged in\n"; } else { die "Login failed: ".$response->error."\n"; }

I have run the same script on two servers and have it logs in fine on one and not so on the other. I am attempting to debug this, but have had no luck. I have tried setting the appropriate variable in the Unix environment, exported it, used it on the same line and the like.

I have no idea how to proceed with finding why one server lets me log in and the other does not.

You assistance would be greatly appreciated.

--
¤ Steve Marvell

Replies are listed 'Best First'.
Re: Net::Google::AuthSub always fails to log in
by aitap (Curate) on Jul 11, 2012 at 15:14 UTC
    What error message ($response->error) do you receive? Have you tried running your script via perl -d and setting some breakpoints inside the Net::Google::AuthSub code?
    Sorry if my advice was wrong.

      I receive no error. I have since played with things and have come to the conclusion that something is up with Net:HTTPS.

      I have attempted a rebuild and got this:

      [root@mail t]# pwd /root/.cpan/build/Net-HTTP-6.03-vnUzN1/t [root@mail t]# ls apache-https.t apache.t http.t LIVE_TESTS [root@mail t]# /usr/bin/perl apache-https.t 1..8 # Running under perl version 5.008005 for linux # Current time local: Wed Jul 11 16:26:19 2012 # Current time GMT: Wed Jul 11 15:26:19 2012 # Using Test.pm version 1.25 # ---------------------------- # 200 OK # Content-Type: message/http # Date: Wed, 11 Jul 2012 15:26:20 GMT # Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g # Transfer-Encoding: chunked # # TRACE /libwww-perl HTTP/1.1 # Host: www.apache.org # User-Agent: Mozilla/5.0 # Accept-Language: no,en # Accept: */* # ok 1 ok 2 ok 3 ok 4 Status read failed: at /usr/lib/perl5/site_perl/5.8.5/Net/HTTP/Method +s.pm line 269.

      I am currently messing about with the test scripts to see what's occurring

      --
      Steve Marvell

        Tried to login myself, everything worked normally. Net::HTTP 6.00 is installed in my system, and I tried downloading 6.03, all tests succeeded:
        $ perl test.pl Hurrah! Logged in $ perl apache-https.t 1..8 # Running under perl version 5.014002 for linux # Current time local: Thu Jul 12 10:31:42 2012 # Current time GMT: Thu Jul 12 06:31:42 2012 # Using Test.pm version 1.25_02 # ---------------------------- # 200 OK # Content-Type: message/http # Date: Thu, 12 Jul 2012 06:31:47 GMT # Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g # Transfer-Encoding: chunked # # TRACE /libwww-perl HTTP/1.1 # Host: www.apache.org # User-Agent: Mozilla/5.0 # Accept-Language: no,en # Accept: */* # ok 1 ok 2 ok 3 ok 4 # ---------------------------- # 200 OK # Content-Type: message/http # Date: Thu, 12 Jul 2012 06:31:47 GMT # Server: Apache/2.4.1 (Unix) OpenSSL/1.0.0g # Transfer-Encoding: chunked # # TRACE /libwww-perl HTTP/1.1 # Host: www.apache.org # User-Agent: Mozilla/5.0 # Accept-Language: no,en # Accept: */* # ok 5 ok 6 ok 7 ok 8
        Perhaps the problem lies deeper in the system. Probably, it's related to system libssl?
        Sorry if my advice was wrong.
Re: Net::Google::AuthSub always fails to log in
by lothar4ever (Initiate) on Aug 14, 2012 at 20:33 UTC
    Same problem here. $response is empty so i can't see what is the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://981138]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found