nextcloud / contacts

📇 Contacts app for Nextcloud
https://apps.nextcloud.com/apps/contacts
GNU Affero General Public License v3.0
569 stars 173 forks source link

spinning wheel in contacts NC 11 #145

Closed wdehoog closed 7 years ago

wdehoog commented 7 years ago

Just upgraded to nextcloud 11 (from owncloud 9.1). Contacts app only shows the spinning wheel. Firefox web console shows exception thrown at line 488 of angular-cache.js from apps/contacts/js/vendor/angular-cache/dist.

When I set a breakpoint I see 'key' is an array. Looks like the UID from vcard data:

UID:cn=XXXX XXXX,ou=People,dc=exalondelft,dc=nl

(seen in vcards exported using remote.php/dav/addressbooks/users/exalon/contacts?export)

skjnldsv commented 7 years ago

Could you post the full error log please?

wdehoog commented 7 years ago

What error log do you mean? This is happening in the browser.

The console shows: Error: key must be a string! angular-cache.js:419:17

skjnldsv commented 7 years ago

The error in console should be much bigger. :)

wdehoog commented 7 years ago

Hopefully this is big enough for you then. contacts-err-1

wdehoog commented 7 years ago

Thisone is with the breakpoint. contacts-err-2

nomandera commented 7 years ago

Just updated from 10.0.1 and received the spinning loading wheel which appears to go on indefinitely.

If I click the "new contact" button I immediately reveal all contacts and wheel disappears. Pressing the "new contact" button again does nothing. Clicking on any of the now revealed contacts also does nothing.

No difference in behavior between FF 51.0.1 and Chrome 56.0.2924.87. No database bloat as reported in https://github.com/nextcloud/contacts/issues/153. I can see a nextcloud/apps/contacts/js/vendor/angular-cache/dist/angular-cache.js.map error in the nginx log.

Access is via a nginx SSL reverse proxy.

I have limited capability to provide logs as it is a private install but will do what I can.

irgendwie commented 7 years ago

@anoma

I can see a nextcloud/apps/contacts/js/vendor/angular-cache/dist/angular-cache.js.map error in the nginx log.

what kind of error?

wdehoog commented 7 years ago

To me the problem seems to be that the uid of the vcard is turned into an array so it cannot be used anymore as a string to identify the vcard. Sorry but I don't understand what additional logs could be needed.

nomandera commented 7 years ago

Since I was specifically asked

2017/03/07 15:21:02 [error] 304#0: *9406 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.0.1, server: _, request: "GET /nextcloud/apps/contacts/js/vendor/angular-cache/dist/angular-cache.js.map HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.yyy.zzz:443"

Domain redacted. However I have not seen this error since and @wdehoog seem far more on point.

nomandera commented 7 years ago

Given that I am in a fully broken webgui state can anyone suggest a means to backup the contacts, delete existing an re-import (in the context of this error).

wdehoog commented 7 years ago

I do not know how to remove all current vcards from the database but you can export from the commandline using for example:

curl -u http:///nextcloud/remote.php/dav/addressbooks/users//contacts?export > contacs-export.vcf

(replace , and with your local values.)

then fix the UIDs in contacs-export.vcf and then import them using the web interface. But the old ones really need to be removed first.

CamZie commented 7 years ago

One of our customers is also having the same issue. We have version 10.0.2 and the size of the contact affected is 34MB and occurs on the browser (spinning wheel) and DavDroid. The error message is the following:

[error] 9178#9178: *2948581 upstream timed out (110: Connection timed out) while reading response header from upstream

We are using the nextcloud recommended nginx configuration and added the following extra ones, which we thought would solve the timeout problem but it did not seem to do it:

fastcgi_read_timeout 300; fastcgi_connect_timeout 300;

Does anyone know a solution for this?

nomandera commented 7 years ago

@wdehoog

I managed to export one of my contact lists however the main contact list export fails with

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\VObject\ParseException</s:exception>
  <s:message>Unsupported CHARSET: utf-8</s:message>
</d:error>

anyone know if this is a red herring or relevant to this ticket.

nomandera commented 7 years ago

OK so I am at the point now where my only way forward is to remove NextCloud and try to recover contacts from client side contact exports. Given than my entire install exists only to share contacts and calendar I find this disappointing (although to be fair based on the volume of posts here I seem to have hit an edge case).

Last call for any information anyone wants before i kill this thing.

Update: I have recovered but in a really ugly way. In a roller coaster ride of using Thunderbird and SOGO connector along with overcoming vcard version incompatibility I managed to get my contacts out of NextCloud, delete all contacts and reimportied them. From a personal perspective I will be scripting a backup export of contacts now because that was a really unpleasant experience. Perhaps periodic vcard backups could be a feature.

wdehoog commented 7 years ago

We have exported all contacts (1068). Deleted them from nextcloud. Replaced all UID's in the vcards file and imported them back into nextcloud. Now the contacts app shows them.

(Some contacts could not be imported back but that is another subject.)

jancborchardt commented 7 years ago

@nextcloud/contacts @nextcloud/javascript can you help debug this please?

wdehoog commented 7 years ago

What else do you expect me to do? I showed where the error occurs, what causes the error and how we changed the data to prevent the error from happening. Do you want me to fix the contacts javascript? I took a quick look but it was not obvious where it goes wrong (why is the UID value parsed instead of treated a single string) and diving into the contacts code base is not something I would like to do.

jancborchardt commented 7 years ago

@wdehoog the info you supplied is good, I merely notified the relevant people who could help debugging or fixing this. :)

skjnldsv commented 7 years ago

uids are duplicate of #175 Closing this one for readability.