Skip Menu |

This queue is for tickets about the Mail-Webmail-Gmail CPAN distribution.

Report information
The Basics
Id: 19102
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Mail-Webmail-Gmail

People
Owner: mincus [...] cpan.org
Requestors: nick.spacek [...] unb.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.07
Fixed in: (no value)



Subject: Unable to connect
Hi there, I seem to be having trouble today as I'm attempting to demo this module. I'm getting the same error that others have reported earlier, but was apparently fixed: Couldn't log into gmail : Error: Could not login with those credentials - could not find Gmail account. Additionally, HTTP error: 200 OK I just downloaded the module today (1.07), and I'm running on Perl 5.8. Maybe Google's trying to block this again? I also was trying out libgmailer (PHP), though it was working fine. Thanks, Nick Spacek
From: Eric Wong <eric [...] petta-tech.com>
On Fri May 05 11:30:15 2006, guest wrote: Show quoted text
> Hi there, > I seem to be having trouble today as I'm attempting to demo this module. > I'm getting the same error that others have reported earlier, but was > apparently fixed: > Couldn't log into gmail : Error: Could not login with those credentials > - could not find Gmail account. > Additionally, HTTP error: 200 OK > > I just downloaded the module today (1.07), and I'm running on Perl 5.8. > Maybe Google's trying to block this again? I also was trying out > libgmailer (PHP), though it was working fine. > > Thanks, > Nick Spacek
I've been using this for the past few weeks or so, but it broke today with the same error. Looks like something changed today...
Subject: [PATCH] this seems to fix the login error
From: Eric Wong <eric [...] petta-tech.com>
On Fri May 05 18:30:02 2006, guest wrote: Show quoted text
> On Fri May 05 11:30:15 2006, guest wrote:
> > Hi there, > > I seem to be having trouble today as I'm attempting to demo this module. > > I'm getting the same error that others have reported earlier, but was > > apparently fixed: > > Couldn't log into gmail : Error: Could not login with those credentials > > - could not find Gmail account. > > Additionally, HTTP error: 200 OK > > > > I just downloaded the module today (1.07), and I'm running on Perl 5.8. > > Maybe Google's trying to block this again? I also was trying out > > libgmailer (PHP), though it was working fine. > > > > Thanks, > > Nick Spacek
> > I've been using this for the past few weeks or so, but it broke today > with the same error. Looks like something changed today...
Simply removing this extra call seems to have worked. YMMV. --- a/lib/Mail/Webmail/Gmail.pm +++ b/lib/Mail/Webmail/Gmail.pm @@ -116,19 +116,6 @@ sub login { } my $final_url; - ( $final_url = $1 ) =~ s/\\u003d/=/; - - $req = HTTP::Request->new( GET => $final_url ); - $req->header( 'Cookie' => $self->{_cookie} ); - $res = $self->{_ua}->request( $req ); - if ( ( $res->content() !~ /<a href="http:\/\/mail\.google\.com\/mail\?view=(?:.*?)&amp;fs=(?:.*?)" target="_blank"> (?:.*?) <\/a>/ ) && - ( $res->content() !~ /<a href="http:\/\/mail\.google\.com\/mail">(?:.*?)<\/a>/ ) ) { - $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials - could not find Gmail account.\n"; - $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; - return; - } - update_tokens( $self, $res ); $req = HTTP::Request->new( GET => 'http://mail.google.com/mail?view=pr&amp;fs=1' ); $req->header( 'Cookie' => $self->{_cookie} );
Subject: [PATCH] this seems to fix the login error (attachment)
From: Eric Wong <eric [...] petta-tech.com>
--- a/lib/Mail/Webmail/Gmail.pm +++ b/lib/Mail/Webmail/Gmail.pm @@ -116,19 +116,6 @@ sub login { } my $final_url; - ( $final_url = $1 ) =~ s/\\u003d/=/; - - $req = HTTP::Request->new( GET => $final_url ); - $req->header( 'Cookie' => $self->{_cookie} ); - $res = $self->{_ua}->request( $req ); - if ( ( $res->content() !~ /<a href="http:\/\/mail\.google\.com\/mail\?view=(?:.*?)&amp;fs=(?:.*?)" target="_blank"> (?:.*?) <\/a>/ ) && - ( $res->content() !~ /<a href="http:\/\/mail\.google\.com\/mail">(?:.*?)<\/a>/ ) ) { - $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials - could not find Gmail account.\n"; - $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; - return; - } - update_tokens( $self, $res ); $req = HTTP::Request->new( GET => 'http://mail.google.com/mail?view=pr&amp;fs=1' ); $req->header( 'Cookie' => $self->{_cookie} );
Fixed in 1.08