Skip Menu |

This queue is for tickets about the Net-Google-Calendar CPAN distribution.

Report information
The Basics
Id: 49784
Status: rejected
Priority: 0/
Queue: Net-Google-Calendar

Owner: Nobody in particular
Requestors: davidp [...]

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

Subject: Fetching list of calendars fails with 'Authorization required' even after successful login() call
Download (untitled) / with headers
text/plain 1.5k
I'm hitting a problem with failed authorisation when trying to fetch a list of calendars, even after a (seemingly successful) login() call. An excerpt from my code: my $calendar = Net::Google::Calendar->new; say "Logging in as " . $config->{username}; $calendar->login(@$config{qw(username password)}) or die "Failed to log in to Google Calendar"; say "Looking for calendars.."; # Find and select the Squash calendar: say "Calendars: " . join ';', map { $_->title } $calendar->get_calendars; The call to $calendar->get_calendars fails, with: 401 Authorization required at /usr/local/share/perl/5.10.0/Net/Google/ line 577. This code worked perfectly before, but has recently stopped working, some time in the last few days (it's something that I only run periodically, so I can't pinpoint exactly when). Two things have happened around this time: * the machine it's on is a fresh Debian install - previously it was an old Slackware setup. This is quite probably the reason for the change. * Google released changes to their API: The changelog does not mention anything which seems pertinent. Through the debugger, I see that $self->{user} is being set correctly; looking at the code, login() should only do that if it's happy that the login succeeded. So - as far as I can tell, the login succeeded and all was well, but an attempt to fetch a list of calendars now fails. Just wondered if you'd experienced or heard of any similar problems, before I go digging through everything to figure out what's happening?
Download (untitled) / with headers
text/plain 353b
Whoops. After a bit more testing in the debugger, calling Net::Google::AuthSub->new direct, I found out the issue - LWP couldn't handle HTTPS URLs as I didn't have Crypt::SSLeay / IO::Socket::SSL installed :| It would have been nice if Net::Google::Calendar had reported the failure to log in, of course, but the problem was ultimately mine. Sorry :)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to