Googlecal fails to connect

12 replies [Last post]
mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012

Here's hoping someone can help with this one. It's not a major problem but I would like to use GoogleCal.

When I run in debug mode I get the following report.

# xap-googlecal -i br0 -d 7

Google Calendar Connector for xAP v12
Copyright (C) DBzoo 2009-2010
[inf][init.c:117:discoverBroadcastNetwork] br0: address 192.168.1.9
[inf][init.c:129:discoverBroadcastNetwork] br0: netmask 255.255.255.0
[inf][init.c:136:discoverBroadcastNetwork] Autoconfig: xAP broadcasts on 192.168.1.255:3639
[ntc][init.c:53:discoverHub] Broadcast socket port 3639 in use
[inf][init.c:54:discoverHub] Assuming a hub is active
[ntc][init.c:63:discoverHub] Socket port 3640 in use
[ntc][init.c:63:discoverHub] Socket port 3641 in use
[ntc][init.c:63:discoverHub] Socket port 3642 in use
[ntc][init.c:63:discoverHub] Socket port 3643 in use
[ntc][init.c:63:discoverHub] Socket port 3644 in use
[inf][init.c:65:discoverHub] Discovered port 3645
[dbg][timeout.c:18:xapAddTimeoutAction] Add timeout. interval=60
[dbg][init.c:221:xapAddSocketListener] socket=5
[inf][googlecal.c:458:main] Connecting to google
[alr][googlecal.c:115:internalError] Failed to authenticate
[inf][tx.c:19:xapSend] send
xap-header
{
v=12
hop=1
uid=FF00DA00
class=google.calendar
source=dbzoo.livebox.GoogleCal
}
error
{
text=Failed to authenticate
}

[alr][googlecal.c:461:main] HTTP code: 403 Msg No error

 

Any ideas?

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Well it kind of looks like

Well it kind of looks like your username and/or password for authenticating isn't setup correctly.

Brett

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Web GUI edit cal link?

If you click the edit calendar link on the web GUI does it open up and login to your calendar?  Might help determine if login details stored correctly?

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
I have used the same login

I have used the same login details, I even copy and pasted just to make sure. I've tried the edit calendar function but that doesn't appear to use the stored settings, it is just a link to the google calender page.

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Try supplying the username/password on the command line

Looking at the xap-googlecal source, it seems that Brett has allowed for the specification of the username and password on the command line (as ever it's well engineered stuff). So, retry your interactive test and see how it goes.

Cheers,
Derek.

 

/// Display usage information and exit.
static void usage(char *prog)
{
        printf("%s: [options]\n",prog);
        printf("  -i, --interface IF     Default %s\n", interfaceName);
        printf("  -d, --debug            0-7\n");
        printf("  -u, --username\n");
        printf("  -p, --password\n");
        printf("  -f, --freq             Default: %d\n", DEF_POLL_FREQ);
        printf("  -h, --help\n");
        exit(1);
}
garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Possibly

You may be right about the caching of login details. Not much help then, sorry. 

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
To Derek...So when I run

To Derek...

So when I run xap-googlecal I need to include the username and password? I assumed it took it from the stored information.

I'll have another go...

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
It uses defaults

Most folks will 'never' run the xap-googlecal from the command line.

You don't 'need' to include the username/password on the command line. If you don't, it will lookup the info as specified in your .ini file. However, if you specify this directly ... it does reduce the variables. 

So, pop the username/password into the command line invocation & let us know how it goes.

As ever, I'm away from my home setup, so can't do a specific test. However, xap-googlecal is terribly flexible for folks who enjoy a solid internet feed. I wouldn't want anybody to miss the goodness that this can deliver.

Derek.

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
I've tried entering the user

I've tried entering the user and pass in the command line but still get the failed to authenticate error.

Could it be something to do with google new 2 step verification process? http://support.google.com/accounts/bin/answer.py?hl=en&answer=185833

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Works fine for me

Mark,

I ran a check to make sure that google was still using username/password and I didn't find any problem so I can only assume the issue must be on your end.   I did however find one minor wart which I corrected.  If you don't have a username and password in your ini file you can't override the settings from the command line.

Sample from a success connection

[brett@wombat xap-googlecal]$ ./xap-googlecal -u dbzoo.com@gmail.com -p xxx -d 7

Google Calendar Connector for xAP v12
Copyright (C) DBzoo 2009-2010
[inf][init.c:118:discoverBroadcastNetwork] eth0: address 192.168.1.9
[inf][init.c:130:discoverBroadcastNetwork] eth0: netmask 255.255.255.0
[inf][init.c:137:discoverBroadcastNetwork] Autoconfig: xAP broadcasts on 192.168.1.255:3639
[inf][init.c:74:discoverHub] Acquired broadcast socket, port 3639
[inf][init.c:75:discoverHub] Assuming no local hub is active
[dbg][timeout.c:18:xapAddTimeoutAction] Add timeout. interval=60
[dbg][init.c:222:xapAddSocketListener] socket=4
[inf][googlecal.c:461:main] Connecting to google
[inf][filter.c:34:xapAddFilter] section=xap-header key=target value=dbzoo.livebox.GoogleCal
[inf][filter.c:34:xapAddFilter] section=xap-header key=class value=google.calendar
[inf][filter.c:34:xapAddFilter] section=event key=title value=XAP_FILTER_ANY
[inf][filter.c:34:xapAddFilter] section=event key=start value=XAP_FILTER_ANY
[inf][filter.c:195:xapAddFilterAction] section=event key=start value=XAP_FILTER_ANY data=0
[dbg][timeout.c:18:xapAddTimeoutAction] Add timeout. interval=60
[dbg][timeout.c:18:xapAddTimeoutAction] Add timeout. interval=60
[dbg][googlecal.c:200:googlePeriodEventCheck] Google query params: start-min=2012-06-21T01:20:00Z&start-max=2012-06-21T01:21:00Z&singleevents=true
[inf][tx.c:19:xapSend] send

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Ditto

I've just replicated the test that Brett conducted. Works fine for me too.

Perhaps try creating a brand new gmail account?

Cheers,
Derek.

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
That sounds like a plan :)

That sounds like a plan :) better to keep things separate anyway.

I'll let you know how I go on.

mark_baldwin
Offline
Blackburn, United Kingdom
Joined: 19 May 2012
New account seems to have

New account seems to have cured the problem...

Strange :) thanks for the tips, onwards and upwards :)

Hardware Info