Bug 332224 - Google contacts sync one way only.
Summary: Google contacts sync one way only.
Status: RESOLVED FIXED
Alias: None
Product: libkgapi
Classification: Frameworks and Libraries
Component: contacts (show other bugs)
Version: 2.0.2
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Daniel Vrátil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-16 19:30 UTC by Jonathan Mast
Modified: 2023-04-27 22:11 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Mast 2014-03-16 19:30:47 UTC
The contacts sync fine from google to kaddressbook but when I make changes they don't show up on google. When I try to edit a contact the akonadi output is:
akonadi_googlecontacts_resource_1(5008)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "Premature end of file." ' 
 list is empty 


Reproducible: Always

Steps to Reproduce:
1. Setup google contacts account in kaddressbook
2. Edit Contact.
Actual Results:  
The contact wasn't edited on the server.

Expected Results:  
The changes would be synced to the server

My libkgapi version is actually 2.1.0 but that wasn't an option.
Comment 1 José Troncoso 2014-03-19 12:46:34 UTC
Same thing here, also on Archlinux with version 2.1.0 of libkgapi.

Whenever I edit a Google task, I get too error messages:
* Calendarios y tareas de Google (jstroncoso@gmail.com): Bad request.
* Calendarios y tareas de Google (jstroncoso@gmail.com): Invalid item payload.

When I edit an event, I only get the first message. In either case, events and tasks don't sync on the server.
Comment 2 Daniel Vrátil 2014-03-19 14:03:06 UTC
Please enable "LibKGAPI" and "LibKGAPI (rawdata)" in kdebugdialog, restart Akonadi from console (akonadictl restart), and reproduce the bug, then paste output from Akonadi console here. It should contain some debug lines starting with "akonadi_googlecontacts_resource".

José, this sounds like a different problem, please open a new bug.
Comment 3 José Troncoso 2014-03-19 16:36:46 UTC
(In reply to comment #2)

Ok, Daniel. This is the output to the console when dragging a Google task to a different day:

akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::TaskMoveJob::Private::processNextTask: ("Authorization: Bearer ya29.1.AADtN_XV7FsIeyKM7GIx7E1E__MdcVIzzPqbHnIHbs2vt_bu4C0DKnuzzdmCrvqmfqGC7-Re")
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy/move" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy/move" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: ""
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x2726550)
akonadi_googlecalendar_resource_0(2708)/kio (Slave) KIO::Slave::createSlave: createSlave "https" for KUrl("https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy/move")
akonadi_googlecalendar_resource_0(2708)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-pepe/akonadi_googlecalendar_resource_0Vs2708.slave-socket"
akonadi_googlecalendar_resource_0(2708)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy/move")
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x2726550) KIO::Slave(0x2855280)
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy/move" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "{
 "kind": "tasks#task",
 "id": "MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy",
 "etag": "\"yQuz3iwILoVDIM9RQAaVkkwlXiI/LTIwNzIwMDA0\"",
 "title": "Revisar FutureLearn ",
 "updated": "2014-03-19T12:33:59.000Z",
 "selfLink": "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy",
 "position": "00000000000119308178",
 "status": "needsAction",
 "due": "2014-03-19T00:00:00.000Z"
}
"
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::emitFinished:
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::TaskModifyJob::start: ("Authorization: Bearer ya29.1.AADtN_XV7FsIeyKM7GIx7E1E__MdcVIzzPqbHnIHbs2vt_bu4C0DKnuzzdmCrvqmfqGC7-Re")
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: "{ "due" : "2014-03-18T00:00:00.000Z", "id" : "MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy", "kind" : "tasks#task", "notes" : "", "status" : "needsAction", "title" : "Revisar FutureLearn" }"
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x285b130)
akonadi_googlecalendar_resource_0(2708)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy")
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x285b130) KIO::Slave(0x2855280)
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.googleapis.com/tasks/v1/lists/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDow/tasks/MDk4Mjk0NTkyMTk3MzczODgwNzM6MDoxNTAwMTY0NzMy" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}
"
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}
" ' 
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::emitFinished:
Comment 4 José Troncoso 2014-03-19 16:40:39 UTC
(In reply to comment #2)

And this is the output when I drag an event:

akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::EventModifyJob::start: ("Authorization: Bearer ya29.1.AADtN_XV7FsIeyKM7GIx7E1E__MdcVIzzPqbHnIHbs2vt_bu4C0DKnuzzdmCrvqmfqGC7-Re", "GData-Version: 3")
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.googleapis.com/calendar/v3/calendars/vci2oap96um4oe0luhsd7tpeco@group.calendar.google.com/events/krerslgp4dtkqg8cpkqb8v7hhc" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.googleapis.com/calendar/v3/calendars/vci2oap96um4oe0luhsd7tpeco@group.calendar.google.com/events/krerslgp4dtkqg8cpkqb8v7hhc" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: "{ "description" : "", "end" : { "date" : "2014-03-30" }, "id" : "krerslgp4dtkqg8cpkqb8v7hhc", "location" : "", "reminders" : { "overrides" : [  ], "useDefault" : false }, "start" : { "date" : "2014-03-29" }, "status" : "confirmed", "summary" : "Festa da Reconquista de Vigo", "transparency" : "opaque", "type" : "calendar#event" }"
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0x28b2160)
akonadi_googlecalendar_resource_0(2708)/kio (Slave) KIO::Slave::createSlave: createSlave "https" for KUrl("https://www.googleapis.com/calendar/v3/calendars/vci2oap96um4oe0luhsd7tpeco@group.calendar.google.com/events/krerslgp4dtkqg8cpkqb8v7hhc")
akonadi_googlecalendar_resource_0(2708)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-pepe/akonadi_googlecalendar_resource_0nt2708.slave-socket"
akonadi_googlecalendar_resource_0(2708)/kio (KIOJob) KIO::TransferJob::slotFinished: KUrl("https://www.googleapis.com/calendar/v3/calendars/vci2oap96um4oe0luhsd7tpeco@group.calendar.google.com/events/krerslgp4dtkqg8cpkqb8v7hhc")
akonadi_googlecalendar_resource_0(2708)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x28b2160) KIO::Slave(0x29e9880)
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.googleapis.com/calendar/v3/calendars/vci2oap96um4oe0luhsd7tpeco@group.calendar.google.com/events/krerslgp4dtkqg8cpkqb8v7hhc" )
akonadi_googlecalendar_resource_0(2708)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Missing end time."
   }
  ],
  "code": 400,
  "message": "Missing end time."
 }
}
"
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Missing end time."
   }
  ],
  "code": 400,
  "message": "Missing end time."
 }
}
" ' 
akonadi_googlecalendar_resource_0(2708)/LibKGAPI KGAPI2::Job::emitFinished:
Comment 5 Jonathan Mast 2014-03-22 15:00:46 UTC
When I edit a contact I get this:
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::ContactsService::contactToXML: ("http://www.google.com/m8/feeds/groups/jon%40padorpers.com/base/6", "http://www.google.com/m8/feeds/groups/jon%40padorpers.com/base/5980ed7a8b8eb6e8")
akonadi_googlecontacts_resource_0(23465)/LibKGAPI (raw data) KGAPI2::ContactModifyJob::Private::processNextContact: ()
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/contacts/<myemail>/full/62b3158f8d3b07a1" )
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/photos/media/<myemail>/62b3158f8d3b07a1" )
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.google.com/m8/feeds/contacts/<myemail>/full/62b3158f8d3b07a1" )
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.google.com/m8/feeds/photos/media/<myemail>/62b3158f8d3b07a1" )
akonadi_googlecontacts_resource_0(23465)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: ""
akonadi_nepomuk_feeder(23470) ItemQueue::batchJobResult: Error while storing graph:  "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#org has a max cardinality of 1. Provided 1 values - <nepomuk:/res/530bf5be-4ccb-41ce-a083-225b51a4e9e9>. Existing - <nepomuk:/res/46936da7-9408-498f-b100-752044473f75>, <nepomuk:/res/248d768d-9fd8-4887-aef2-cc23046a3a96>" 
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.google.com/m8/feeds/photos/media/<myemail>/62b3158f8d3b07a1" )
akonadi_googlecontacts_resource_0(23465)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "Invalid request URI"
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "Invalid request URI" ' 
akonadi_googlecontacts_resource_0(23465)/LibKGAPI KGAPI2::Job::emitFinished:

Or sometimes this:

akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::ContactsService::contactToXML: ("")
akonadi_googlecontacts_resource_2(25138)/LibKGAPI (raw data) KGAPI2::ContactModifyJob::Private::processNextContact: ()
akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/contacts/<myemail>/full/2a5e6b930c624d79" )
akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/photos/media/<myemail>/2a5e6b930c624d79" )
akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: Dispatching request to  QUrl( "https://www.google.com/m8/feeds/photos/media/<myemail>/2a5e6b930c624d79" )
akonadi_googlecontacts_resource_2(25138)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: ""
akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.google.com/m8/feeds/contacts/<myemail>/full/2a5e6b930c624d79" )
akonadi_googlecontacts_resource_2(25138)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "Premature end of file."
akonadi_googlecontacts_resource_2(25138)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "Premature end of file." '
Comment 6 Maciej Mrozowski 2015-09-16 22:54:40 UTC
I can reproduce as well.
libkgapi-2.2.0, kdepim-4.14.10

In log below I scrambled some personal data. You can find it by SCRAMBLED string.

QDBusObjectPath Akonadi::Server::NotificationManager::subscribeV2(const QString&, bool) Akonadi::Server::NotificationManager(0x1a87dd0) "kontact_21057_QrPE3i" true 
QDBusObjectPath Akonadi::Server::NotificationManager::subscribeV3(const QString&, bool, bool) Akonadi::Server::NotificationManager(0x1a87dd0) "kontact_21057_QrPE3i" true false 
QDBusObjectPath Akonadi::Server::NotificationManager::subscribeV2(const QString&, bool) Akonadi::Server::NotificationManager(0x1a87dd0) "kontact_21057_EU86e2" true 
QDBusObjectPath Akonadi::Server::NotificationManager::subscribeV3(const QString&, bool, bool) Akonadi::Server::NotificationManager(0x1a87dd0) "kontact_21057_EU86e2" true false 
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::ContactsService::contactToXML: ("http://www.google.com/m8/feeds/groups/reavertm%40gmail.com/base/6")
akonadi_googlecontacts_resource_5(21167)/LibKGAPI (raw data) KGAPI2::ContactModifyJob::Private::processNextContact: ()
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/contacts/reavertm@gmail.com/full/44977329085cbc8e" )
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::enqueueRequest: Queued  QUrl( "https://www.google.com/m8/feeds/photos/media/reavertm@gmail.com/44977329085cbc8e" )
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: KGAPI2::ContactModifyJob(0x26134e0) Dispatching request to  QUrl( "https://www.google.com/m8/feeds/contacts/reavertm@gmail.com/full/44977329085cbc8e" )
akonadi_googlecontacts_resource_5(21167)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: "<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gContact="http://schemas.google.com/contact/2008"><atom:category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/><gd:name><gd:givenName>*</gd:givenName><gd:familyName>*WÅaÅiciel/Owner*</gd:familyName><gd:fullName>* *WÅaÅiciel/Owner*</gd:fullName></gd:name><atom:content type='text'>SCRAMBLED</atom:content><gd:email rel='http://schemas.google.com/g/2005#home' address='SCRAMBLED' /><gd:email rel='http://schemas.google.com/g/2005#home' address='SCRAMBLED' /><gd:phoneNumber rel="http://schemas.google.com/g/2005#mobile">SCRAMBLED</gd:phoneNumber><gd:phoneNumber rel="http://schemas.google.com/g/2005#home">SCRAMBLED</gd:phoneNumber><gd:phoneNumber rel="http://schemas.google.com/g/2005#work">SCRAMBLED</gd:phoneNumber><gd:phoneNumber rel="http://schemas.google.com/g/2005#pager">SCRAMBLED</gd:phoneNumber><gContact:groupMembershipInfo deleted="false" href="http://www.google.com/m8/feeds/groups/reavertm%40gmail.com/base/6" /></atom:entry>"
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::Private::_k_dispatchTimeout: KGAPI2::ContactModifyJob(0x26134e0) Dispatching request to  QUrl( "https://www.google.com/m8/feeds/photos/media/reavertm@gmail.com/44977329085cbc8e" )
akonadi_googlecontacts_resource_5(21167)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_dispatchTimeout: "ÿØÿà
1;2c1;2cakonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Received reply from  QUrl( "https://www.google.com/m8/feeds/contacts/reavertm@gmail.com/full/44977329085cbc8e" )
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Status code:  400
akonadi_googlecontacts_resource_5(21167)/LibKGAPI (raw data) KGAPI2::Job::Private::_k_replyReceived: "Premature end of file."
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::Private::_k_replyReceived: Bad request, Google replied ' "Premature end of file." ' 
akonadi_googlecontacts_resource_5(21167)/LibKGAPI KGAPI2::Job::emitFinished:
Comment 7 Justin Zobel 2021-03-10 00:12:33 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 8 r.kunschke 2022-07-11 11:13:12 UTC
The problem still remains since months or longer.
There are lot of duplicated bug reports which shows the importance.

https://bugs.kde.org/show_bug.cgi?id=446580
https://bugs.kde.org/show_bug.cgi?id=451621
https://bugs.kde.org/show_bug.cgi?id=452322
https://bugs.kde.org/show_bug.cgi?id=359178
https://bugs.kde.org/show_bug.cgi?id=332224
Comment 9 Carl Schwan 2023-04-27 22:11:28 UTC
The google contact integration has been completely rewritten with the last version due to a lot of API change on google side