View Issue Details

IDProjectCategoryView StatusLast Update
0004176SOGo Connectorwith SOGopublic2017-06-14 12:31
Reportermacho Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSUbuntuOS Version17.04
Product Version31.0.3 
Summary0004176: Contacts don't upload, giving http 404 and 412 errors
Description

SOGo doesn't repopulate a remote WebDAV resource after it's reacreated empty based on contacts in Thunderbird.

Steps To Reproduce
  1. Set up a remote addressbook including contacts with photo and category fields filled in
  2. Replace the remote WebDAV resource with a new empty resource of the same name and url
  3. In Thunderbird, select "synchronize" on the existing remote addressbook to attempt to repopulate the remote addressbook
  4. It will fail to send these contacts. Based on the error output below, I believe it's failing on trying to "update" existing entries that are no longer there. Any workaround you could provide would be greatly appreciated, e.g. massaging my mab files to allow the upload to proceed. Thanks!
Additional Information

I see the following in the error log. I believe the repeating GET & PUT errors are the relevant ones, trying to upload each contact:

Error: sogoWebDAV could not download calendar. Try disabling proxy server. sogoWebDAV.js:256:7
<anonymous> chrome://inverse-library/content/sogoWebDAV.js:256:7
sogoWebDAV.prototype._sendHTTPRequest chrome://inverse-library/content/sogoWebDAV.js:219:28
sogoWebDAV.prototype.load chrome://inverse-library/content/sogoWebDAV.js:349:25
sogoWebDAV.prototype.put chrome://inverse-library/content/sogoWebDAV.js:404:9
GroupDavSynchronizer.prototype.uploadCards chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:1372:17
GroupDavSynchronizer.prototype.processCards chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:1345:13
GroupDavSynchronizer.prototype.onServerCheckComplete chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:907:37
GroupDavSynchronizer.prototype.onDAVQueryComplete chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:383:13
sogoWebDAV.prototype._handleHTTPResponse chrome://inverse-library/content/sogoWebDAV.js:315:17
sogoWebDAV.prototype._sendHTTPRequest/listener.onStreamComplete chrome://inverse-library/content/sogoWebDAV.js:236:21

GET
https://myserver/remote.php/dav/addressbooks/users/macho/All%20contacts/20c44f4e-af73-4068-aac6-96393efa45e3.vcf [HTTP/1.1 404 Not Found 14800ms]
Response headers:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Length: 206
Content-Security-Policy: default-src 'none';
Content-Type: application/xml; charset=utf-8
Date: Wed, 24 May 2017 17:40:21 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=98
Pragma: no-cache
Server: Apache/2.4.10 (Raspbian)
Set-Cookie: oc74t2jhp50m=26d0ohp608j8c9npvbh97ms301; path=/; HttpOnly
oc_sessionPassphrase=6RriWHfOowy6Vi3MYL4BOgaMoDdDSfzGAVR%2FTTr0otsX%2FFBiopeeOT1u1OEhuRK3donTUnqu3wK%2B2%2BZCGJ5r8RGr3uG7x6FYh6D1o7FDm2l2F8w3d%2FlttTB%2F8%2FKc6rIg; path=/; secure; httponly
oc74t2jhp50m=4najrpuqionk0hdi2pqbs791g4; path=/; secure; HttpOnly
cookie_test=test; expires=Wed, 24-May-2017 18:40:35 GMT; Max-Age=3600
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: Sameorigin
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
Request headers:
Accept: text/vcard
Accept-Charset: utf-8,*;q=0.1
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Authorization: Basic bWFjaG86VkVKTG9JMW1NRDd5Q3lidW1PUlc=
Cache-Control: no-cache
Connection: keep-alive
DNT: 1
Host: myserver
Pragma: no-cache
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Lightning/5.4

PUT
https://myserver/remote.php/dav/addressbooks/users/macho/All%20contacts/f878f02b-086c-40d8-afa8-8c255c23fb43.vcf [HTTP/1.1 412 Precondition failed 14784ms]
Response headers:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Length: 297
Content-Security-Policy: default-src 'none';
Content-Type: application/xml; charset=utf-8
Date: Wed, 24 May 2017 17:40:21 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=98
Pragma: no-cache
Server: Apache/2.4.10 (Raspbian)
Set-Cookie: oc74t2jhp50m=pdvgft61kdgdf7l1dghofbkjj3; path=/; HttpOnly
oc_sessionPassphrase=3YpDmbx5gWzwCGYaNjJn1LnNEhUOMMl8oMkrq12gih5%2BkHwj46%2F1cTEMu%2BBltuCw3f2ahqyJErszaXFUqGG9C%2BJxws4LQpv16GsHMiH4OzI5B2UFr4i%2BG2a5FaadkvK1; path=/; secure; httponly
oc74t2jhp50m=js8vtv8it2vtcapm7c1sipr784; path=/; secure; HttpOnly
cookie_test=test; expires=Wed, 24-May-2017 18:40:35 GMT; Max-Age=3600
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: Sameorigin
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: none
X-XSS-Protection: 1; mode=block
Request headers:
Accept: text/xml
Accept-Charset: utf-8,*;q=0.1
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Authorization: Basic bWFjaG86VkVKTG9JMW1NRDd5Q3lidW1PUlc=
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 7745
Content-Type: text/vcard; charset=utf-8
DNT: 1
Host: myserver
If-Match: "6328ad1b33f56acbf028878d5cf1625f"
Pragma: no-cache
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Lightning/5.4

[These GET & PUT errors repeat ad nauseum, and I also see the following:]

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Wed May 24 2017 13:40:49 GMT-0400 (EDT)
Full Message: TypeError: this.baseUri is null
Full Stack: etagsHandler.prototype.onStopRequest<@resource://calendar/modules/calUtils.jsm -> file:///home/macho/.thunderbird/macho.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calDavRequestHandlers.js:159:17
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:252:14
sogoWebDAV.prototype._sendHTTPRequest@chrome://inverse-library/content/sogoWebDAV.js:219:28
sogoWebDAV.prototype.load@chrome://inverse-library/content/sogoWebDAV.js:349:25
sogoWebDAV.prototype.put@chrome://inverse-library/content/sogoWebDAV.js:404:9
GroupDavSynchronizer.prototype.uploadCards@chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:1372:17
GroupDavSynchronizer.prototype.processCards@chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:1345:13
GroupDavSynchronizer.prototype.onServerCheckComplete@chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:907:37
GroupDavSynchronizer.prototype.onDAVQueryComplete@chrome://sogo-connector/content/general/sync.addressbook.groupdav.js:383:13
sogoWebDAV.prototype._handleHTTPResponse@chrome://inverse-library/content/sogoWebDAV.js:315:17
sogoWebDAV.prototype._sendHTTPRequest/listener.onStreamComplete@chrome://inverse-library/content/sogoWebDAV.js:236:21

TagsNo tags attached.

Activities

macho

macho

2017-05-24 19:07

reporter   ~0011833

I think my suspicion about the problem was correct. I notice that in the mab file, one of the fields is a "vcf" file, which seems to refer to something that was previously held on the server. This seems to be incorporated into each contact via field number "C4" according to the legend at the top of the file in the form (^C4^HEX).

So I just deleted all those fields using this vim regex: ":%s/(\^C4\^[A-F0-9]*)//"

Sure enough, the contacts then begin to propagate back to the server. I'm still getting the odd instance of the old error, so I may have to root through a bit more, but at least I can now restore the bulk of my contacts.

Issue History

Date Modified Username Field Change
2017-05-24 18:11 macho New Issue
2017-05-24 19:07 macho Note Added: 0011833
2017-06-14 12:31 ludovic Severity major => minor