Bug 317974 - Can't fetch from Google Calendar: Invalid request, service is not registered
Summary: Can't fetch from Google Calendar: Invalid request, service is not registered
Status: CONFIRMED
Alias: None
Product: libkgapi
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR grave with 70 votes (vote)
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
: 318705 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-07 11:52 UTC by Mark Fraser
Modified: 2019-06-15 15:48 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
akonadi_googlecalendar (90.76 KB, text/plain)
2013-04-27 13:12 UTC, Mark Fraser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Fraser 2013-04-07 11:52:04 UTC
A few weeks after setting up a Google calendar resource, I will start to get errors stating that akonadi_googlecalendar_resource_x: Invalid request, service is not registered.
This will keep happening until I delete the resource and install it again and it isn't restricted to just one computer - all devices linked to that account get the same error.

Reproducible: Always

Steps to Reproduce:
1.Set up a Google calendar resource
2.Wait a few weeks
3.See that the error box starts to appear
Actual Results:  
Error box appears for each calendar in my account
Comment 1 Daniel Vrátil 2013-04-08 10:04:03 UTC
What version of LibKGAPI do you have?
Comment 2 Mark Fraser 2013-04-15 16:16:16 UTC
Sorry for not replying earlier, but KMail decided to filter the reply to my search box!

libkgapi0:amd64             0.4.4-0ubuntu1
Comment 3 Daniel Vrátil 2013-04-23 10:48:42 UTC
Sorry for taking so long with this. Although I know where the error comes from, I can't see any code path leading to it.

Could you enable akonadi_googlecalendar_* in kdebugdialog, restart Akonadi from console (akonadictl restart) and observe, whether any relevant output appears? Most interesting would be to have URL of the request that is sent before this error appears.

The good news is that this is fixed in KDE 4.11, where LibKGAPI and the resources were almost completely rewritten.
Comment 4 Daniel Vrátil 2013-04-23 10:49:05 UTC
One more thing: can you reproduce this problem with the Google Contacts resource, or is it Calendar-specific issue?
Comment 5 Thiago Jung Bauermann 2013-04-24 00:39:01 UTC
I get this error message too. My Google Calendar resource has been configured a long time ago, but only recently this error message started appearing, so I would say the problem was introduced in KDE 4.10 or one of its point releases.

This particular error message affects only Google Calendar, though a few days ago I tried to edit a Google contact and there was an error message displayed too, albeit a different one.

kdebugdialog doesn't list any akonadi_google* item. The closest ones are akonadiresource(ical) and akonadiserializer(calendar).

Here are the messages I have in ~/.xsession-errors:

akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_replyReceived: Unknown error 0 , Google replied ' "" ' 
akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_replyReceived: Unknown error 0 , Google replied ' "" ' 
akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_sendRequest: Failed to resolve service  "" 
akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_sendRequest: Failed to resolve service  "" 
akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_sendRequest: Failed to resolve service  "" 
akonadi_googlecalendar_resource_2(4307) KGAPI::AccessManagerPrivate::nam_sendRequest: Failed to resolve service  ""

The first two may not be related to this bug, but the following ones may be.
Comment 6 Daniel Vrátil 2013-04-24 13:20:09 UTC
Could you please additionally enable "kio (AccessManager)" and "kio_http" in kdebugdialog, restart your KDE session, reproduce the issue and check .xsession-errors again? Try to use grep -A5 -B5 to include 5 lines above and below the matching result, in case the "akonadi_google" is not mentioned in the debug output.

Remember to disable the debug areas after that, so that your .xsession-errors does not grow too much :-)
Comment 7 Thiago Jung Bauermann 2013-04-25 02:49:26 UTC
I did that and I have a log file with lots of debug output but I don't know what I should be looking for. What should be the search term in the grep -A5 -B5 command, if it is not akonadi_google?

It's hard to check the kio_http output since requests from rekonq, chokoq, desktop widgets etc are all  mixed together. I couldn't discern any from akonadi_googlecalendar though. What would a kio_http entry from akonadi_googlecalendar look like?

Here are the lines I found interesting:

akonadi_googlecalendar_resource_2(8999)/kio (AccessManager) KDEPrivate::AccessManagerReply::jobError: KIO::ERR_COULD_NOT_CONNECT -> QNetworkReply::ConnectionRefusedError
akonadi_googlecalendar_resource_2(8999) KGAPI::AccessManagerPrivate::nam_replyReceived: Unknown error 0 , Google replied ' "" ' 
Enchant dict for "en_US" 0xb023eb0 
akonadi_googlecontacts_resource_0(9000)/kio (AccessManager) KDEPrivate::AccessManagerReply::jobError: KIO::ERR_COULD_NOT_CONNECT -> QNetworkReply::ConnectionRefusedError
akonadi_googlecontacts_resource_0(9000) KGAPI::AccessManagerPrivate::nam_replyReceived: Unknown error 0 , Google replied ' "" ' 

akonadi_googlecalendar_resource_2(8999) KGAPI::AccessManagerPrivate::nam_sendRequest: Failed to resolve service  ""  
ItemRetrieverException :  Unable to retrieve item from resource: <html>Invalid item retrieved</html>
kontact(10008)/libakonadi Akonadi::EntityTreeModelPrivate::fetchJobDone: Job error:  "Unable to fetch item from backend (collection 419) : Unable to retrieve item from resource: <html>Invalid item retrieved</html>" for collection: 419
Comment 8 Stephan Wienczny 2013-04-25 22:41:16 UTC
I've got the same problem. When looking at .xsession-errors I found this:

"Cannot connect to agent instance with identifier 'akonadi_googlecalendar_resource_1', error message: 'Could not get owner of name 'org.freedesktop.Akonadi.Resource.akonadi_googlecalendar_resource_1': no such name'"
ItemRetrieverException :  Unable to contact resource
korgac(4275)/libakonadi Akonadi::EntityTreeModelPrivate::fetchJobDone: Job error:  "Unable to fetch item from backend (collection 119) : Unable to contact resource" for collection: 119

Could this bug be related to dbus?
Comment 9 Daniel Vrátil 2013-04-26 13:59:56 UTC
Stephan, this is indeed a message from D-Bus. It usually happens when the resource crashes. Anyway, it's unrelated to this particular bug. If you can get more information (ideally a backtrace), please open a new bug request.
Comment 10 Mark Fraser 2013-04-27 12:58:32 UTC
akonadi_googlecalendar_resource_5(3698)/kdepimlibs (kcalcore): parse error ; string is empty? true 
akonadi_googlecalendar_resource_5(3698)/akonadiserializer (calendar) Akonadi::SerializerPluginKCalCore::deserialize: Failed to parse incidence! Item id =  109572 Storage collection id  594 parentCollectionId =  -246 
akonadi_googlecalendar_resource_5(3698)/akonadiserializer (calendar) Akonadi::SerializerPluginKCalCore::deserialize: "" 
akonadi_googlecalendar_resource_5(3698)/libakonadi Akonadi::ItemSerializer::deserialize: Unable to deserialize payload part: "RFC822" 
akonadi_googlecalendar_resource_5(3698)/libakonadi Akonadi::ItemSerializer::deserialize: Payload data was:  "" 
akonadi_googlecontacts_resource_2(3699)/libakonadi Akonadi::ResourceBase::itemRetrieved: Item does not provide part "RFC822" 
kontact(3066)/akonadiserializer (addressee) Akonadi::SerializerPluginAddressee::deserialize: Empty addressee object!
Comment 11 Mark Fraser 2013-04-27 13:12:30 UTC
Created attachment 79494 [details]
akonadi_googlecalendar

xsesson_error output from when akonadi_googlecalendar_resource fails.
Comment 12 Bastian Machek 2013-05-04 13:28:48 UTC
I have the same problem. It seems that it started, when I tried to create a new appointment from  kontact.
Comment 13 Thiago Jung Bauermann 2013-05-08 17:58:10 UTC
Come to think of it, I believe I started to have this problem when I tried to edit an existing appointment from kontact. So it seems this bug is about not being able to sync local changes to the google server.
Comment 14 Daniel Vrátil 2013-05-14 12:26:43 UTC
*** Bug 318705 has been marked as a duplicate of this bug. ***
Comment 15 GK 2013-06-18 10:03:38 UTC
I also started to get to this issue these days all of a sudden.  The message is the same: "akonadi_googlecalendar_resource_2: Invalid request, service is not registered." 

So in akonadi I have the same problems as listed above and it is not yet clear to me whether the problem is with the D-Bus or elsewhere. Akonadi restart does not help -- I still have this repeatedly in several lines:
"Cannot connect to agent instance with identifier 'akonadi_googlecalendar_resource_2', error message: 'Could not get owner of name 'org.freedesktop.Akonadi.Resource.akonadi_googlecalendar_resource_2': no such name'" 
ItemRetrieverException :  Unable to contact resource 
"Cannot connect to agent instance with identifier 'akonadi_googlecalendar_resource_2', error message: 'Could not get owner of name 'org.freedesktop.Akonadi.Resource.akonadi_googlecalendar_resource_2': no such name'" 
ItemRetrieverException :  Unable to contact resource 

Meanwhile I noticed that if I enter a new event from another machine (or through web), and then restart akonadi, I see only this event. Any other past or future ones are not there. Strange.

Running kubuntu with kde 4.10.4
Comment 16 Knut Hildebrandt 2013-06-25 13:59:56 UTC
Got the same problem. Happens shortly after setting up a new google-resource, will say the same or next day. Don't know exactly what happens before. Defenitely could add and change entries from kontact, the google-website and my phone without problems. Last time I encountered the problem, I added and shortly after deleted google-contacts in kontact, which also provoked problems in mail-view. Deleting the resource and setting it up again brings all entries back. Only drawback, aconadi is busy for hours indexing.
Comment 17 Knut Hildebrandt 2013-06-25 14:02:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 18 Knut Hildebrandt 2013-06-25 18:12:49 UTC
Just deleted the corrupted google-calender-resource and added a new one. Can access and change all entries in my google calendar again. Even adding new events works fine. And the best, it took only a couple of minutes, not hours as the last time, to get it synchronised for the first time.

The bad news, after adding this new google-calender-resource the mail-view of kontact was corrupted again, as it was after adding the google-contact-resource before. Maybe that's the reason for all the problems, adding of any new google-resource somehow corruptes other google-resources and views.
Comment 19 Daniel Vrátil 2013-06-26 09:10:00 UTC
KMail folder-view corruption when adding/removing unrelated resources is a known issue and has been fixed in 4.11 (or maybe even 4.10.5, I don't remember whether the patch was backported). The problem is in the KMail folder-view itself, not in Akonadi (luckily)
Comment 20 Knut Hildebrandt 2013-06-27 06:14:14 UTC
Okay, once again the newly added google-calendar-resouse was corrupted. It happened after a restart of the computer and kontact. Before noticing it I got an error message, that the certificate for the secure connection to the google-server was invalid. Couldn't see any reason for this and thus accepted it.
Comment 21 Knut Hildebrandt 2013-06-27 06:19:17 UTC
BTW, deleting the corrupted resource and adding a new one made my google-calendar work again. Seems to be a - bit annoying - workaround.
Comment 22 Tom Kijas 2016-12-06 12:39:11 UTC
And it was working only for a limited time, right? :)