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

Contacts do not show in web app for all users any more #3253

Open feutl opened 1 year ago

feutl commented 1 year ago

Describe the bug

I assume since the last version of contacts got installed, the contacts app is empty for all users. DAVx seems to synronize without errors, so I must assume that the contacts are still stored in the DB but the web app cannot read the information.

https://sub.exampel.com/apps/contacts/Alle%20Kontakte

image

Steps to reproduce

  1. Go to Contacts
  2. Empty

Expected behavior

I should see my few hundred contacts and groups

Actual behavior

empty contact list, except the circles nothing shows up

Contact version

5.1.0

Operating system

NCP (https://hub.docker.com/r/ownyourbits/nextcloudpi)

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database

MariaDB

Additional info

This is what I see in the docker log when opening the contacts app, even though it makes no sense because everything else works.

2023-02-27 13:22:59 650 [Warning] Aborted connection 650 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)

2023-02-27 13:22:59 651 [Warning] Aborted connection 651 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)
ChristophWurst commented 1 year ago

is the address book disabled in the bottom left settings menu?

feutl commented 1 year ago

This is all I see if I click there image

As I said, DAVx on any mobile does not complain yet. I could also have a DB lookup to verify if the tables or entries are still there if someone guides me, but for me this seems to have happened with the upgrade to the latest contacts app.

I also tested the NC Mail App, and it proposes me contacts when entering names. So the contact information seems available, somewhere :D

ChristophWurst commented 1 year ago

Right, we moved the menu to a modal.

I would expect to see your ABs in the modal shown in your screenshot :thinking:

ChristophWurst commented 1 year ago

Check the oc_addressbooks table. do you still have your ABs?

feutl commented 1 year ago

There is an entry for at least every user and also for my user wit "principals/users/herbert" if that is what you are referring too

feutl commented 1 year ago

Any news on this, it is a little frighting if contacts are somehow gone and I do not know what happens next ;)

ChristophWurst commented 1 year ago

I don't know yet

feutl commented 1 year ago

do you need access to my instance somehow or any "special" data? just let me know.

feutl commented 1 year ago

Seems like I am not the only one having the issue, someone reported this already in January https://help.nextcloud.com/t/contacts-menu-links-to-contacts-app-with-no-contacts/153092 https://help.nextcloud.com/t/contacts-menu-links-to-contacts-app-with-no-contacts/153092/3

feutl commented 1 year ago

I have updates to this. Today after I updated my letsencrypt certificate, updating the user migration app and rebooting the the docker image I thought it is a good idea to look at the contacts again. I had no high hopes, I mean nothing really changed - and I did some reboots previously already, but surprise the contacts app showed the contacts for me and my users - AGAIN.

I have no clue why and what has changed except the mentioned things above.

feutl commented 1 year ago

Ok, after everything worked - I ended up with not contacts again.

I have not touched anything up to now on my server, except using NC, but I do see the following error in the server overview page. I have not seen this error, when I reported that everything is working. So whatever has changed during runtime - is the reason.

Es gibt einige Warnungen bei deiner Systemkonfiguration.

    Dein Webserver ist nicht richtig konfiguriert, um "/.well-known/webfinger" aufzulösen. Weitere Informationen hierzu findest du in unserer [Dokumentation ↗](https://docs.nextcloud.com/server/25/go.php?to=admin-setup-well-known-URL).
    Dein Webserver ist nicht richtig konfiguriert, um "/.well-known/nodeinfo" aufzulösen. Weitere Informationen hierzu findest du in unserer [Dokumentation ↗](https://docs.nextcloud.com/server/25/go.php?to=admin-setup-well-known-URL).

Bitte überprüfe noch einmal die [Installationsanleitungen ↗](https://docs.nextcloud.com/server/25/go.php?to=admin-install) und kontrolliere das [Protokoll](https://cloud.feutl.com/settings/admin/logging) auf mögliche Fehler oder Warnungen.

Überprüfe die Sicherheit deiner Nextcloud über den [Sicherheitsscanner der Nextcloud GmbH ↗](https://scan.nextcloud.com/).
feutl commented 1 year ago

I rebooted the server, system overview is showing a green checkmark - contacts are empty. This is starting to get annoying, especially because it worked for years ;)

feutl commented 1 year ago

I removed the two lines for testing purposes and for now it seems to work again. Now I am struggling if and why this problem appeared and if it should be fixed bei NCP or the Contacts app. Perhaps someone can help me a little on this

"memcache.locking" => "\\OC\\Memcache\\Redis"
"memcache.local" => "\\OC\\Memcache\\Redis"

https://github.com/nextcloud/nextcloudpi/issues/1608

feutl commented 1 year ago

Ok, I turn back - tested removing the memcache option and it did not fix it. I had high hopes, but perhaps it is still somehow a hint? So from today, the contacts app is again empty showing the error mentioned already every time I do open it. Once again - clueless.

feutl commented 1 year ago

Anything new, I played around. Fixed what I thought could be an issues with Redis but no changes. Everytime I open the contact app, I do get the DB errors mentioned at the beginning of the ticket.

szaimen commented 1 year ago

https://dba.stackexchange.com/questions/19135/mysql-error-reading-communication-packets

feutl commented 1 year ago
MariaDB [(none)]> SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| max_allowed_packet | 16777216 |
+--------------------+----------+

Mine says 16MB - but I never changed it and therefor I wondered was has changed with the update of the contact app?! Especially only the contacts web app raises this error, no davx sync or news sync, file upload etc only opening the contacts web app ?

I raised it to 256MB. I will investigate the behavior over time, for now it seems to fix the issue, but this also would imply that the contacts web app has changed the DB communication and creates bigger packets than previous versions in my situation.

feutl commented 1 year ago

The last 5 days I had not problem with the contacts app loading, any more. Seems that the initial error

2023-02-27 13:22:59 650 [Warning] Aborted connection 650 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)
2023-02-27 13:22:59 651 [Warning] Aborted connection 651 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)

Gets solved by @szaimen idea of raising the max_allowed_packet value. I raised it to 256MB but I cannot say if it is too much or not enough. I am still wondering what has changed from the previous contacts web app to the one raising the error in my setup. Perhaps this could be checked by nextcloud to have a proper max_allowed_packet value.