Skip Menu |

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

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

People
Owner: mincus [...] cpan.org
Requestors: simonw [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.05
Fixed in: (no value)



Subject: Unable to login
I had to use the patch located at http://unixbeard.net/svn/simon/Net-FS-Gmail/mail_webmail_gmail.patch to log-in I've also attached the patch.
Subject: mail_webmail_gmail.patch
--- /usr/local/perl580/lib/site_perl/5.8.0/Mail/Webmail/Gmail.pm 2006-03-10 16:11:00.000000000 +0000 +++ Gmail.pm 2006-03-22 16:30:10.000000000 +0000 @@ -102,7 +102,7 @@ if ( !$res->is_success() ) { $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials\n"; + $self->{_err_str} .= "Error: Could not login with those credentials - the request was not a success\n"; $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; return; } @@ -110,7 +110,7 @@ update_tokens( $self, $res ); if ( $res->content() !~ /var url = "(.*?)"/ ) { $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials\n"; + $self->{_err_str} .= "Error: Could not login with those credentials - could not find final url\n"; $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; return; } @@ -122,10 +122,10 @@ $req->header( 'Cookie' => $self->{_cookie} ); $res = $self->{_ua}->request( $req ); if ( $res->content() !~ /<a href="http:\/\/mail.google.com\/mail\?view=pr&amp;fs=1" target="_blank"> Gmail <\/a>/ ) { - $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials\n"; - $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; - return; + #$self->{_error} = 1; + #$self->{_err_str} .= "Error: Could not login with those credentials - could not find find redirect url in \n\n".$res->content()."\n"; + #$self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; + # return; } update_tokens( $self, $res ); @@ -134,7 +134,7 @@ $res = $self->{_ua}->request( $req ); if ( $res->content() !~ /top.location="(.*?)"/ ) { $self->{_error} = 1; - $self->{_err_str} .= "Error: Could not login with those credentials\n"; + $self->{_err_str} .= "Error: Could not login with those credentials - couldn't find top.location\n"; $self->{_err_str} .= " Additionally, HTTP error: " . $res->status_line . "\n"; return; }
Subject: Works for me + Your Patch is unnecessary
From: shlomif [...] iglu.org.il
On Thu Mar 23 05:23:44 2006, SIMONW wrote: Show quoted text
> I had to use the patch located at > > http://unixbeard.net/svn/simon/Net-FS-Gmail/mail_webmail_gmail.patch > > to log-in > > I've also attached the patch. >
I was able to successfully use an unpatched version of Mail-Webmail-Gmail 1.05 to login to gmail.com now. Your patch doesn't do anything except changing the error strings, so why is it required? Regards, -- Shlomi Fish
Subject: Re: [rt.cpan.org #18305] Works for me + Your Patch is unnecessary
Date: Fri, 24 Mar 2006 17:42:30 +0000
To: via RT <bug-Mail-Webmail-Gmail [...] rt.cpan.org>
From: Simon Wistow <simon [...] thegestalt.org>
On Fri, Mar 24, 2006 at 12:22:46PM -0500, via RT said: Show quoted text
> I was able to successfully use an unpatched version of > Mail-Webmail-Gmail 1.05 to login to gmail.com now.
Congratulations, that's wonderful for you. You must be very proud. I, on the other hand, get a failure to login Couldn't log into gmail : Error: Could not login with those credentials Additionally, HTTP error: 200 OK With my patch but without the return commented out in the third test [*] I get Couldn't log into gmail : Error: Could not login with those credentials - could not find find redirect url. Additionally, HTTP error: 200 OK Which told me that it was the third test that was failing. Show quoted text
> Your patch doesn't do anything except changing the error strings, so > why is it required?
The error string changing tells me which one of the four checks it's failing. What I don't think you noticed was that the patch also comments out the error string setting return from the third test because, for me, that's the one that's failing yet the module works fine without it. Simon [*] I.e the one checking for <a href="http:\/\/mail.google.com\/mail\?view=pr&amp;fs=1" target="_blank"> Gmail <\/a>
This bug resulted from "Gmail" not being called such in every country. For example, Gmail is called "Google Mail" in the UK. Changed the logon script to not care what the name was, just to make sure that the user had a Gmail account before proceeding. Resolved in Mail::Webmail::Gmail version 1.06
From: skramadhyani [...] gmail.com
On Fri Mar 24 12:42:56 2006, simon@thegestalt.org wrote: Show quoted text
> On Fri, Mar 24, 2006 at 12:22:46PM -0500, via RT said:
> > I was able to successfully use an unpatched version of > > Mail-Webmail-Gmail 1.05 to login to gmail.com now.
> > Congratulations, that's wonderful for you. You must be very proud.
I, Show quoted text
> on the other hand, get a failure to login > > Couldn't log into gmail : Error: Could not login with those
credentials Show quoted text
> Additionally, HTTP error: 200 OK > > With my patch but without the return commented out in the third test > [*] I get > > Couldn't log into gmail : Error: Could not login with those
credentials Show quoted text
> - could not find find redirect url. > Additionally, HTTP error: 200 OK > > > Which told me that it was the third test that was failing. > >
> > Your patch doesn't do anything except changing the error strings,
so Show quoted text
> > why is it required?
> > The error string changing tells me which one of the four checks it's > failing. > > What I don't think you noticed was that the patch also comments out
the Show quoted text
> error string setting return from the third test because, for me,
that's Show quoted text
> the one that's failing yet the module works fine without it. > > Simon > > > > > > > [*] I.e the one checking for > > <a href="http:\/\/mail.google.com\/mail\?view=pr&amp;fs=1" > target="_blank"> Gmail <\/a>
Hi, This module was working for me up until last week, however something went wrong when I tried to use it today. Code: #!/usr/bin/perl -w use strict; use Mail::Webmail::Gmail; print("Sending..."); my $g = Mail::Webmail::Gmail->new(username => 'XXXX', password => 'XXXX'); $g->send_message(to => 'XXXX', subject => 'test subj', msgbody => 'test body'); print($g->error_msg) if($g->error); print("done\n"); Error: Sending...Error: Could not login with those credentials - could not find Gmail account. Additionally, HTTP error: 200 OK Error: Could not Login. done On Sat Apr 15 01:02:58 2006, guest wrote: Show quoted text
> > I, > > on the other hand, get a failure to login > > > > Couldn't log into gmail : Error: Could not login with those > > credentials > > Additionally, HTTP error: 200 OK > >
Subject: Re: [rt.cpan.org #18305] Unable to login
Date: Wed, 19 Apr 2006 09:55:59 -0400
To: bug-Mail-Webmail-Gmail [...] rt.cpan.org
From: mincus <mincus [...] gmail.com>
Please provide some more information. What OS, version of perl, and version of Mail::Webmail::Gmail are you using? Thanks --mincus On 4/18/06, Guest via RT <bug-Mail-Webmail-Gmail@rt.cpan.org> wrote: Show quoted text
> > Queue: Mail-Webmail-Gmail > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18305 > > > Hi, > > This module was working for me up until last week, however something > went wrong when I tried to use it today. > > > Code: > > #!/usr/bin/perl -w > use strict; > use Mail::Webmail::Gmail; > > print("Sending..."); > my $g = Mail::Webmail::Gmail->new(username => 'XXXX', password => 'XXXX'); > $g->send_message(to => 'XXXX', subject => 'test subj', msgbody => 'test > body'); > print($g->error_msg) if($g->error); > print("done\n"); > > > Error: > > Sending...Error: Could not login with those credentials - could not find > Gmail account. > Additionally, HTTP error: 200 OK > Error: Could not Login. > done > > On Sat Apr 15 01:02:58 2006, guest wrote:
> > > I, > > > on the other hand, get a failure to login > > > > > > Couldn't log into gmail : Error: Could not login with those > > > credentials > > > Additionally, HTTP error: 200 OK > > >
> >
Dear Mincus, I'm so sorry, I didn't see your message and had infact forgotten about the whole project up until today. Ok, so the OS is Gentoo running on an AMD Athlon 1700, Perl version is 5.8.7 built for i686-linux-thread-multi, and it's version 1.07 of Mail::Webmail::Gmail. I just tried the very same gmail script again and now it seems to be working. Hmmmm.... could they be trying to detect and prevent automation? I wonder. Lovecoder On Wed Apr 19 09:56:32 2006, mincus@gmail.com wrote: Show quoted text
> Please provide some more information. What OS, version of perl, and > version of Mail::Webmail::Gmail are you using? > > Thanks > --mincus > > On 4/18/06, Guest via RT <bug-Mail-Webmail-Gmail@rt.cpan.org> wrote:
> > > > Queue: Mail-Webmail-Gmail > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18305 > > > > > Hi, > > > > This module was working for me up until last week, however something > > went wrong when I tried to use it today. > > > > > > Code: > > > > #!/usr/bin/perl -w > > use strict; > > use Mail::Webmail::Gmail; > > > > print("Sending..."); > > my $g = Mail::Webmail::Gmail->new(username => 'XXXX', password =>
'XXXX'); Show quoted text
> > $g->send_message(to => 'XXXX', subject => 'test subj', msgbody => 'test > > body'); > > print($g->error_msg) if($g->error); > > print("done\n"); > > > > > > Error: > > > > Sending...Error: Could not login with those credentials - could not find > > Gmail account. > > Additionally, HTTP error: 200 OK > > Error: Could not Login. > > done > > > > On Sat Apr 15 01:02:58 2006, guest wrote:
> > > > I, > > > > on the other hand, get a failure to login > > > > > > > > Couldn't log into gmail : Error: Could not login with those > > > > credentials > > > > Additionally, HTTP error: 200 OK > > > >
> > > >
Resolved in 1.08