Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contacts app doesn't show anything after Upgrade to NC 11.0 #66

Closed
nursoda opened this issue Dec 25, 2016 · 43 comments
Closed

Contacts app doesn't show anything after Upgrade to NC 11.0 #66

nursoda opened this issue Dec 25, 2016 · 43 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@nursoda
Copy link

nursoda commented Dec 25, 2016

Since you state "migration issues belong in the server repo", but also ask for "Updated from an older Nextcloud or fresh install", I'm unsure if this should be here or in server. Please point me there if you feel it should be elsewhere.

I upgraded three NC installations from 10.0.2 to 11.0 and all went smooth. In two of them, all apps work flawless, in one the calendar app no longer works at all: It no longer shows any contacts in the web interface (idles, see screenshot), and clients (DAVdroid, CardDAV) show error "not found".

contacts

Any hint appreciated on how to recover from this (preferrably without loosing contact data), or how to reset.

These seem to be a similar issues:

Notes:

  • In the problematic installation, I use a user name that does not contain spaces (but a dot).
  • In one of the working installations, I use a username containing a space character but in that account, all contacts work fine.
  • Contacts in both installations contain pictures.

System parameters

OS: debian stable, Web server: apache2, Database: MySQL 5.5, PHP 5.6, Nextcloud 11.0.0.10, Contacts: 1.5.2, UPDATED FROM 10.0.0.2, Signing: No errors in Admin check, /settings/integrity/failed yields "No errors have been found.", NOT using external storage, encryption or external user-backend.

List of activated apps:
Enabled:

  • activity: 2.4.1
  • announcementcenter: 3.0.0
  • apporder: 0.3.3
  • bookmarks: 0.9.1
  • calendar: 1.4.1
  • comments: 1.1.0
  • contacts: 1.5.2
  • dav: 1.1.1
  • direct_menu: 0.9.3
  • federatedfilesharing: 1.1.1
  • federation: 1.1.1
  • files: 1.6.1
  • files_pdfviewer: 1.0.1
  • files_sharing: 1.1.1
  • files_texteditor: 2.2
  • files_trashbin: 1.1.0
  • files_versions: 1.4.0
  • files_videoplayer: 1.0.0
  • gallery: 16.0.0
  • keeweb: 0.3.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • mail: 0.6.2
  • nextcloud_announcements: 1.0
  • notifications: 1.0.1
  • ownbackup: 16.11.0
  • ownpad: 0.5.7
  • password_policy: 1.1.0
  • provisioning_api: 1.1.0
  • serverinfo: 1.1.1
  • sharebymail: 1.0.1
  • systemtags: 1.1.3
  • tasks: 0.9.4
  • templateeditor: 0.2
  • theming: 1.1.1
  • twofactor_backupcodes: 1.0.0
  • twofactor_totp: 0.5.0
  • twofactor_u2f: 0.1.0
  • updatenotification: 1.1.1
  • workflowengine: 1.1.1

Disabled:

  • admin_audit
  • audioplayer
  • encryption
  • external
  • files_accesscontrol
  • files_automatedtagging
  • files_external
  • files_retention
  • firstrunwizard
  • richdocuments
  • spreed
  • spreedme
  • survey_client
  • user_external
  • user_ldap
  • user_saml

The content of config/config.php:
{
"system": {
"instanceid": "",
"trashbin_retention_obligation": "auto,90",
"versions_retention_obligation": "90,auto",
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"filelocking.enabled": "true",
"redis": {
"host": "localhost",
"port": 6379,
"timeout": 0
},
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
""
],
"datadirectory": "/",
"overwrite.cli.url": "https:///cloud",
"dbtype": "mysql",
"version": "11.0.0.10",
"dbname": "",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "Europe/Berlin",
"installed": true,
"mail_from_address": "",
"mail_smtpmode": "php",
"mail_domain": "",
"defaultapp": "calendar",
"maintenance": false,
"loglevel": 2,
"theme": "",
"updater.release.channel": "stable"
}
}

Client configuration

Browser: Firefox 50, OS: ApricityOS, CardDAV-clients: DAVdroid, CardDAV.

Logs

Web server error log

- [25/Dec/2016:00:44:29 +0100] "PROPFIND /cloud/remote.php/webdav/ HTTP/1.1" 207 2231 "-" "Mozilla/5.0 (Linux) mirall/2.2.4"
- - [25/Dec/2016:00:44:34 +0100] "GET /cloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 913 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0"

Nextcloud log (data/nextcloud.log)

{"reqId":"","remoteAddr":"","app":"core","message":"Login failed: '' (Remote IP: '')","level":2,"time":"2016-12-25T01:25:59+01:00","method":"PROPFIND","url":"/cloud/remote.php/webdav/","user":"--","version":"11.0.0.10"}
{"reqId":"","remoteAddr":"","app":"core","message":"Login failed: '' (Remote IP: '')","level":2,"time":"2016-12-25T01:25:59+01:00","method":"GET","url":"/cloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json","user":"--","version":"11.0.0.10"}

Browser JS log

Sending message that cannot be cloned. Are you trying to send an XPCOM object? MessageChannel.jsm:504:4
JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542
Sending message that cannot be cloned. Are you trying to send an XPCOM object? MessageChannel.jsm:504:4

@skjnldsv
Copy link
Member

@nursoda Could you try #73 please?

@nursoda
Copy link
Author

nursoda commented Dec 31, 2016

Sorry for the delay, I'm moving my office.
I tried #73 - seems to be exactly the same behavior.
I tried master - shows even less: there is no idle, no "Alle Kontakte"/"Nicht gruppiert", no dummy user logo on the right. All plain white (except for the header).

@skjnldsv
Copy link
Member

Any log in the console?

@nursoda
Copy link
Author

nursoda commented Jan 1, 2017

In Firefox Developer Panel / Console I see CSS warnings, but no JS warnings/errors at all.

Unbekannte Eigenschaft 'zoom'. Deklaration ignoriert. select2.css:9:8
Deklaration erwartet, aber '*' gefunden. Übersprungen bis zur nächsten Deklaration select2.css:10:4
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. select2.css:49:25
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. select2.css:53:78
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:55:12
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. select2.css:65:78
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:67:12
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:128:12
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. select2.css:193:78
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:195:12
Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. select2.css:239:114
Fehler beim Verarbeiten des Wertes für 'background'. Deklaration ignoriert. select2.css:251:116
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. select2.css:275:78
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:277:12
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. select2.css:287:75
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:289:12
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. select2.css:350:25
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. select2.css:529:25
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. select2.css:532:12
Name einer Medienfunktion erwartet, aber '-webkit-min-device-pixel-ratio' gefunden. select2.css:633:24
Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar'. Regelsatz wegen ungültigem Selektor ignoriert. styles.css:93:2
Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar-track-piece'. Regelsatz wegen ungültigem Selektor ignoriert. styles.css:96:2
Unbekannte Pseudoklasse oder Pseudoelement '-webkit-scrollbar-thumb'. Regelsatz wegen ungültigem Selektor ignoriert. styles.css:99:2
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. styles.css:150:12
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. styles.css:280:12
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. styles.css:300:12
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. styles.css:361:12
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. styles.css:404:12
Unbekannte Eigenschaft 'list-style-indent'. Deklaration ignoriert. styles.css:407:87
Name einer Medienfunktion erwartet, aber '-webkit-max-device-pixel-ratio' gefunden. fonts.css:2:8
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. apps.css:30:12
Farbe erwartet, aber 'top' gefunden. Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. apps.css:140:35
Fehler beim Verarbeiten des Wertes für 'background-image'. Deklaration ignoriert. apps.css:142:19
Fehler beim Verarbeiten des Wertes für 'text-overflow'. Deklaration ignoriert. apps.css:274:17
Unbekannte Eigenschaft '-moz-filter'. Deklaration ignoriert. apps.css:300:12
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. apps.css:336:9
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. apps.css:343:9
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. apps.css:651:9
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. apps.css:659:9
Unbekannte Eigenschaft '-moz-box-shadow'. Deklaration ignoriert. multiselect.css:22:16
Fehler beim Verarbeiten des Wertes für 'display'. Deklaration ignoriert. mobile.css:23:10
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:49:8
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:538:9
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:918:8
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:925:8
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:929:8
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:1177:9
'none', URL oder Filterfunktion erwartet, aber 'Alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. jquery-ui.css:1184:9
Unbekannte Eigenschaft 'line-break'. Deklaration ignoriert. tooltip.css:13:12
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. tooltip.css:27:10
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. tooltip.css:31:10
Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. apporder.css:13:19
Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. apporder.css:24:19
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. versions.css:20:9
'none', URL oder Filterfunktion erwartet, aber 'alpha(' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. versions.css:31:9
Unbekannte Eigenschaft 'user-select'. Deklaration ignoriert. style.css:75:4494
Unbekannte Pseudoklasse oder Pseudoelement '-webkit-full-screen'. Regelsatz wegen ungültigem Selektor ignoriert. style.css:75:4793
'none', URL oder Filterfunktion erwartet, aber 'progid' gefunden. Fehler beim Verarbeiten des Wertes für 'filter'. Deklaration ignoriert. style.css:91:9
Unbekannte Eigenschaft 'appearance'. Deklaration ignoriert. inputs.css:214:11
Unbekannte Eigenschaft '-moz-border-radius'. Deklaration ignoriert. styles:108:20
Unbekannte Eigenschaft '-moz-filter'. Deklaration ignoriert. styles:117:13
Unbekannte Pseudoklasse oder Pseudoelement '-webkit-input-placeholder'. Regelsatz wegen ungültigem Selektor ignoriert. style.css:49:47
Unbekannte Pseudoklasse oder Pseudoelement '-ms-input-placeholder'. Regelsatz wegen ungültigem Selektor ignoriert. style.css:61:46
Unbekannte Pseudoklasse oder Pseudoelement 'placeholder-shown'. Regelsatz wegen ungültigem Selektor ignoriert. style.css:67:46
Unbekannte Eigenschaft 'column-count'. Deklaration ignoriert. style.css:201:14
JQMIGRATE: Migrate is installed, version 1.4.0 jquery-migrate.min.js:2:542

@nursoda
Copy link
Author

nursoda commented Jan 2, 2017

Can I do anything else?

@skjnldsv
Copy link
Member

skjnldsv commented Jan 2, 2017

Do you have access to your database?

Could you send an export of oc_cards to [email protected]?
If not, you can always try to send an export of your addressbooks to the same email.

I can't really debug remotely, and since you don't have any errors, it seems to be the best way (like I did in #53 with op)

@skjnldsv
Copy link
Member

Okay, so I tried importing your data with the app and this literally took like 15 mins..
So we really need to optimise that, but that's another issue.

After importing you rdata works fine.
My bet is a failed upgrade when we transitioned from a different table (maybe a failed process or your installation blocked while migrating) to oc_cards.

Please use your dump file and import it directly into the app file. Should do the trick. :)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

I restored oc_cards via ownbackup and get the error below. Don't know what to do next.

Tables restored

Table(s) could not be restored: Inserting data row failed: An exception occurred while executing 'INSERT INTO `oc_cards` (`id`,`addressbookid`,`carddata`,`uri`,`lastmodified`,`etag`,`size`) SELECT ?,?,?,?,?,?,? FROM `oc_cards` WHERE `id` = ? AND `addressbookid` = ? AND `carddata` = ? AND `uri` = ? AND `lastmodified` = ? AND `etag` = ? AND `size` = ? HAVING COUNT(*) = 0' with params ["5", "1", "BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID:-\/\/Sabre\/\/Sabre VObject 3.5.0\/\/EN\r\nUID:olav.seyfarth\r\nFN:Olav Seyfarth\r\nCLOUD:[email protected]\/cloud\r\nPHOTO;ENCODING=b;TYPE=image\/jpeg:\/9j\/4AAQSkZJRgABAQEAYABgAAD\/\/gA+Q1JFQVRPUj\r\n ogZ2QtanBlZyB
]...]
GEQNl\r\n hnbgY6dc9T0p0sX2iX5XCKx3Et7Z4OB833etBWKCMJvyVHCogbGe36UAf\/\/Z\r\nN:Seyfarth;Olav;;;\r\nEMAIL:[email protected]\r\nEND:VCARD\r\n", "Database:olav.seyfarth.vcf", "1473203029", "9d399baa474d74d34d719982dc84fd6f", "114261"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'carddata' in 'where clause'

@skjnldsv
Copy link
Member

No, I meant import it from the import function of the contacts app :)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

I can't, since my contacts app is not responsive at all (idle only). How to reset it?

@skjnldsv
Copy link
Member

Create a new addressbook and delete the old ones.

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

I cannot access the app settings! So I cannot delete any address book (IF it is still there).

@skjnldsv
Copy link
Member

This is strange. Could your remove it from your database directly?

@skjnldsv
Copy link
Member

Okay, I just deleted my old addressbook and I found out what is your issue.
The app can't load without addressbook.

capture d ecran_2017-01-10_12-11-49

@skjnldsv
Copy link
Member

When you click the Settings in the bottom left, what's in there?

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

Sure, how? Could you provide the correct SQL statements?

This is what I see:
settings

I can enter a new addressbok name, but cannot create it.

@skjnldsv
Copy link
Member

You can't create a new addressbook?
Because I can.

When clicking the arrow, do you get a failed request in your network debug tab?

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

I did try that of course, but nothing happens (no visible feedback). Would it help to use the master app? Or should I add some debugging somewhere in the code?

@skjnldsv
Copy link
Member

skjnldsv commented Jan 10, 2017

I need to see if the dav core is blocking the creation. :)
You need to open the console, click the network tab and try to create an addressbook
capture d ecran_2017-01-10_13-17-03
capture d ecran_2017-01-10_13-17-21

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

No, only when opening settings, I see network activity. And (periodically) notifications (not related to klicking the right-arrow):
network

BTW: Would it help to uninstall and reinstall the app? I guess not since the data in the DB is not modified, is it?

@skjnldsv
Copy link
Member

You could try the latest master release (don't forget to compile it).
Stupid question, but did you try with the enter key? 😛
In case of the arrow didn't work (which I don't understand)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

No, Enter also does not do anything.

@skjnldsv
Copy link
Member

See #91 :)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

thumbup - so if I understand the process correctly, I must wait for review before I could download master. Could you send me a compiled version to test/verify?

@skjnldsv
Copy link
Member

Added a tar.gz for testing :)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

I moved app/contacts, extracted .tar.gz, copied it from contacts-73 to contacts, checked ownership and permissions (was OK), shift-reloaded contacts, tried to add an addressbook. Same as before!

@skjnldsv
Copy link
Member

skjnldsv commented Jan 10, 2017

Could you try again the network tab?
This contact app should automatically create an addressbook if there isn't one available. SO in theory we should see something. :)

ps: for easy check, use the "xhr" filter on the network debug tab. 😉

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

network-73

@skjnldsv
Copy link
Member

You got indeed an error 500. Mind to check your logs? 😄

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

Sorry, should have done that right away. Since it contains more personal data, I sent it to protonet.

@skjnldsv
Copy link
Member

Perfect!
This is indeed a different issue. Your database seemed invalid.
Could you output your oc_cards and oc_addressbooks table structure and post it here please?

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

Do you mean these? I use the latest ownbackup copy - OK?

oc_cards/structure.xml:
<database><name>*dbname*</name><create>true</create><overwrite>false</overwrite><charset>utf8</charset><table><name>oc_cards</name><declaration><field><name>id</name><type>integer</type><default>0</default><notnull>true</notnull><autoincrement>1</autoincrement><unsigned>true</unsigned><length>8</length></field><field><name>addressbookid</name><type>integer</type><default>0</default><notnull>true</notnull><length>4</length></field><field><name>uri</name><type>text</type><default/><notnull>false</notnull><length>255</length></field><field><name>lastmodified</name><type>integer</type><default>0</default><notnull>false</notnull><unsigned>true</unsigned><length>8</length></field><field><name>etag</name><type>text</type><default/><notnull>false</notnull><length>32</length></field><field><name>size</name><type>integer</type><default>0</default><notnull>true</notnull><unsigned>true</unsigned><length>8</length></field></declaration></table></database>

oc_addressbooks/structure.xml
<database><name>*dbname*</name><create>true</create><overwrite>false</overwrite><charset>utf8</charset><table><name>oc_addressbooks</name><declaration><field><name>id</name><type>integer</type><default>0</default><notnull>true</notnull><autoincrement>1</autoincrement><unsigned>true</unsigned><length>8</length></field><field><name>principaluri</name><type>text</type><default/><notnull>false</notnull><length>255</length></field><field><name>displayname</name><type>text</type><default/><notnull>false</notnull><length>255</length></field><field><name>uri</name><type>text</type><default/><notnull>false</notnull><length>255</length></field><field><name>description</name><type>text</type><default/><notnull>false</notnull><length>255</length></field><field><name>synctoken</name><type>integer</type><default>1</default><notnull>true</notnull><unsigned>true</unsigned><length>4</length></field><index><name>addressbook_index</name><unique>true</unique><field><name>principaluri</name><sorting>ascending</sorting></field><field><name>uri</name><sorting>ascending</sorting></field></index></declaration></table></database>

@skjnldsv
Copy link
Member

skjnldsv commented Jan 10, 2017

This seems to be the problem. You need to fix your database.
I don't think this is related to the contacts app anymore.
This is what I got:

CREATE TABLE `oc_addressbooks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `principaluri` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `displayname` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `synctoken` int(10) UNSIGNED NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE `oc_cards` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `addressbookid` int(11) NOT NULL DEFAULT '0',
  `carddata` longblob,
  `uri` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `lastmodified` bigint(20) UNSIGNED DEFAULT NULL,
  `etag` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  `size` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

OK, so I need to DROP tables before that, right? Anything else I must do prior to importing cards via the app?

@skjnldsv
Copy link
Member

The app can easily become unresponsive (I opened an issue about that)
But since your got ownbackups ready, you can try restoring the tables after fixing them, should do the trick I hope :)

@nursoda
Copy link
Author

nursoda commented Jan 10, 2017

Dropping and creating tables allows me to create a new addressbook. But if I import cards, they aren't associated to any addressbook, even if there's only one. So, I cannot delete these cards by deleting the addressbook (after adding a second one). There seems to be more corrupt. Would you recommend to setup from scratch?

@skjnldsv
Copy link
Member

skjnldsv commented Jan 11, 2017

SELECT * FROM `oc_addressbooks`;
+----+--------------------------+-------------+----------+-----------------------------------------------------------+-----------+
| id | principaluri             | displayname | uri      | description                                               | synctoken |
+----+--------------------------+-------------+----------+-----------------------------------------------------------+-----------+
|  2 | principals/system/system | system      | system   | System addressbook which holds all users of this instance |        27 |
| 23 | principals/users/admin   | Contacts    | Contacts | NULL                                                      |         1 |
+----+--------------------------+-------------+----------+-----------------------------------------------------------+-----------+

Get your addressbook id (here 23) and then update your cards:

UPDATE `oc_cards` SET `addressbookid`=YOURID

@skjnldsv
Copy link
Member

skjnldsv commented Feb 6, 2017

@nursoda Can we close?

@skjnldsv skjnldsv added bug Something isn't working invalid This doesn't seem right labels Feb 6, 2017
@nursoda
Copy link
Author

nursoda commented Feb 7, 2017

Sorry I did not respond earlier. I had no time to solve this out since I see similar issues in multiple NC instances each supporting multiple users and NC does not provide tools or documentation that allows me to fix things myself.

Due to time constraints, I did not try your last recommendation. Yet I will one day in the near future.

Sure, you may close the bug, I'll ask to reopen if necessary. But does label "invalid" suggest that this bug that was not caused by software but by me. If so, I'm irritated, since all I did was to upgrade from NC10 to NC11. Before the upgrade, all was fine, after the upgrade, I had trouble getting things back to a usable state.

@skjnldsv
Copy link
Member

skjnldsv commented Feb 7, 2017

Well, this isn't related to the contacts app, this is why I added the invalid label.
Your database error comes from server.

@nursoda
Copy link
Author

nursoda commented Feb 7, 2017

OK, Thanks.

@skjnldsv
Copy link
Member

skjnldsv commented Feb 7, 2017

I'm closing this, so if you got any more issues, let me know :)

@skjnldsv skjnldsv closed this as completed Feb 7, 2017
@nursoda
Copy link
Author

nursoda commented Feb 7, 2017

I will.
Thanks a lot for your kind support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants