Author Topic: Issue with setting up Google Calendar with calendar (and calendar_plus) plugins  (Read 7505 times)

Offline entropicsinkhole

  • Jr. Member
  • **
  • Posts: 13
Plugins:  latest (downloaded via plugin manager with RC version 1.0): calendar, calendar_plus, google_oauth2, jquery

Issue:  Local calendar works fine, but cannot get google calendar to work/sync.  It give a 'replication successful' message but loads nothing and usually causes page to freeze.  If I add an event, the event disappears immediately after showing up on calendar.  I'm definitely open to the idea that the CalDav address I'm using is wrong--I had google calendar syncing fine in older versions of Roundcube (before google-oauth plugin was around), when the CalDav still used the old google address.  Maybe something else has changed I'm not aware of. 

I've tried many different file configurations.

Right or wrong, these are the settings in my current calendar\config.inc.php:

$config['default_caldav_backend'] = array(
 /*'user' => '%u',
  'pass' => '%p',
  'principals' => '',
  'home' => 'http://dav.domain.tld',
  'url' => 'http://dav.domain.tld/calendars/%u/events',
  'cat' => 'http://dav.domain.tld/calendars/%u/%c',
  'auth' => 'detect', //basic or detect
  'extr' => false,  */

   'user' => '%gu',
  'pass' => '%gp',
  'url' => 'https://apidata.googleusercontent.com/caldav/v2/%gu/events',
  'cat' => 'https://apidata.googleusercontent.com/caldav/v2/%gu/%c',
  'auth' => 'basic',
  'extr' => false,
);
 
These are my user settings once I log into the webmail as my user account (Settings > Calendar >)

Provider:  CalDAV
User:  mygmailemailaccount@gmail.com
Password:  password for mygmailemailaccount@gmail.com
CalDAV Url: https://apidata.googleusercontent.com/caldav/v2/mygmailemailaccount@gmail.com/events
Authentication method:  Detect automatically (I've tried Basic too)
 

cURL log gives an authentication error (but I'm definitely using the right username and pw) 
--> I've also tried with both http (which gives me an SSL error) and https (which is where I get the error below)

[27-Feb-2014 13:45:59 -0500]:
Method: PROPFIND
[27-Feb-2014 13:45:59 -0500]:
Request:
__________
https://apidata.googleusercontent.com:443/caldav/v2/heather.gilchrist@gmail.com/events/

<?xml version="1.0" encoding="utf-8" ?>
 <D:propfind xmlns:D="DAV:" xmlns:C="http://calendarserver.org/ns/">
     <D:prop>
             <D:displayname />
             <C:getctag />
             <D:resourcetype />
     </D:prop>
 </D:propfind>
[27-Feb-2014 13:45:59 -0500]:
__________
Response:
__________
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest"
Content-Type: application/vnd.google.gdata.error+xml; charset=UTF-8
Date: Thu, 27 Feb 2014 18:45:59 GMT
Expires: Thu, 27 Feb 2014 18:45:59 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic
Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
 <error>
  <domain>GData</domain>
  <code>required</code>
  <location type="header">Authorization</location>
  <internalReason>Login Required</internalReason>
 </error>
</errors>