CONTACTS are not working (endless loading loop)

Hello,

After gradually migrating from owncloud to nextcloud 29, the contacts app is not working.
In my test account, I have one added contact (imported from previous NC updates).
However, the contacts app does not display the contacts right frame (main page) and it stucks in a continuously loading state.
Interestingly, when I reload the browser tab, instantly my contact is shown before the browser refreshes the page.
It seems like some kind of GUI bug or…?
I have tested it with the federation app enabled and disabled, no difference.
Please give me some light here, what to check to fix the problem.

Here is the output of the console log in the browser:

session heartbeat polling started
NotificationsApp.vue:497 Notifications permissions not yet requested
contacts/All%20contacts:1 Error while trying to use the following icon from the Manifest: https://myurl.gr/index.php/apps/theming/icon/contacts?v=20 (Resource size is not correct - typo in the Manifest?)
addressbooks.js:411 RangeError: Maximum call stack size exceeded
    at _.value (dist.js:1:144257)
    at _.<anonymous> (dist.js:1:205039)
    at d (dist.js:1:80785)
    at Generator._invoke (dist.js:1:80573)
    at Generator.next (dist.js:1:81214)
    at Fr (dist.js:1:200311)
    at o (dist.js:1:200517)
(anonymous) @ addressbooks.js:411
Promise.catch (async)
getContactsFromAddressBook @ addressbooks.js:406
(anonymous) @ vuex.esm.js:851
US.dispatch @ vuex.esm.js:516
US.dispatch @ vuex.esm.js:406
(anonymous) @ Contacts.vue:356
fetchContacts @ Contacts.vue:355
(anonymous) @ Contacts.vue:265
Promise.then (async)
(anonymous) @ Contacts.vue:254
Promise.then (async)
beforeMount @ Contacts.vue:251
En @ vue.runtime.esm.js:3033
Ar @ vue.runtime.esm.js:4048
e @ vue.runtime.esm.js:3870
da.$mount @ vue.runtime.esm.js:8797
init @ vue.runtime.esm.js:4427
n @ vue.runtime.esm.js:4581
(anonymous) @ vue.runtime.esm.js:6591
m @ vue.runtime.esm.js:6545
to.nodeOps @ vue.runtime.esm.js:7095
e._update @ vue.runtime.esm.js:3781
r @ vue.runtime.esm.js:3891
e.get @ vue.runtime.esm.js:3462
e @ vue.runtime.esm.js:3452
e @ vue.runtime.esm.js:3908
da.$mount @ vue.runtime.esm.js:8797
init @ vue.runtime.esm.js:4427
(anonymous) @ vue.runtime.esm.js:6591
m @ vue.runtime.esm.js:6545
to.nodeOps @ vue.runtime.esm.js:7133
e._update @ vue.runtime.esm.js:3781
r @ vue.runtime.esm.js:3891
e.get @ vue.runtime.esm.js:3462
e @ vue.runtime.esm.js:3452
e @ vue.runtime.esm.js:3908
da.$mount @ vue.runtime.esm.js:8797
e._init @ vue.runtime.esm.js:5724
da @ vue.runtime.esm.js:5785
(anonymous) @ main.js:78
(anonymous) @ main.js:83
(anonymous) @ main.js:83
Show 30 more frames
Show less
validate.js:48 The following contact has been repaired: invalid REV Ix {jCal: Array(3), addressbook: {…}, vCard: e, conflict: false, dav: o}
validate.js:48 The following contact has been repaired: invalid REV Ix {jCal: Array(3), addressbook: {…}, vCard: e, conflict: false, dav: o}
4:1 
        
        
       GET https://myurl.gr/remote.php/dav/addressbooks/users/admin/1-1/4?photo 404 (Not Found)
Image (async)
updateImageIfValid @ NcAvatar-MHywJkM4.mjs:432
loadAvatarUrl @ NcAvatar-MHywJkM4.mjs:381
url @ NcAvatar-MHywJkM4.mjs:331
En @ vue.runtime.esm.js:3033
e.run @ vue.runtime.esm.js:3550
Sr @ vue.runtime.esm.js:4141
(anonymous) @ vue.runtime.esm.js:3159
Bn @ vue.runtime.esm.js:3081
Promise.then (async)
Dn @ vue.runtime.esm.js:3106
Yn @ vue.runtime.esm.js:3171
xr @ vue.runtime.esm.js:4227
e.update @ vue.runtime.esm.js:3529
e.notify @ vue.runtime.esm.js:732
set @ vue.runtime.esm.js:976
ea.set @ vue.runtime.esm.js:5376
(anonymous) @ Contacts.vue:359
Promise.then (async)
fetchContacts @ Contacts.vue:358
(anonymous) @ Contacts.vue:265
Promise.then (async)
(anonymous) @ Contacts.vue:254
Promise.then (async)
beforeMount @ Contacts.vue:251
En @ vue.runtime.esm.js:3033
Ar @ vue.runtime.esm.js:4048
e @ vue.runtime.esm.js:3870
da.$mount @ vue.runtime.esm.js:8797
init @ vue.runtime.esm.js:4427
n @ vue.runtime.esm.js:4581
(anonymous) @ vue.runtime.esm.js:6591
m @ vue.runtime.esm.js:6545
to.nodeOps @ vue.runtime.esm.js:7095
e._update @ vue.runtime.esm.js:3781
r @ vue.runtime.esm.js:3891
e.get @ vue.runtime.esm.js:3462
e @ vue.runtime.esm.js:3452
e @ vue.runtime.esm.js:3908
da.$mount @ vue.runtime.esm.js:8797
init @ vue.runtime.esm.js:4427
(anonymous) @ vue.runtime.esm.js:6591
m @ vue.runtime.esm.js:6545
to.nodeOps @ vue.runtime.esm.js:7133
e._update @ vue.runtime.esm.js:3781
r @ vue.runtime.esm.js:3891
e.get @ vue.runtime.esm.js:3462
e @ vue.runtime.esm.js:3452
e @ vue.runtime.esm.js:3908
da.$mount @ vue.runtime.esm.js:8797
e._init @ vue.runtime.esm.js:5724
da @ vue.runtime.esm.js:5785
(anonymous) @ main.js:78
(anonymous) @ main.js:83
(anonymous) @ main.js:83
Show 42 more frames
Show less
index.js:314 OC.requestToken changed YBLpedUmUPv3Vmeh3G4L9hAW6rqXkGYw8q5lWY4Gu2s=:Bny5N49BJY+vJ1eOugFtmXhzpMjD5y5GkcgUDuVF8CE=
index.js:314 OC.requestToken changed JxGbXpdxHEn3/m/UQL0kJtPttKpwrp2ggH7Zm3KLQuc=:QX/LEM0WaT2vj1/7JtJCSbuI+tgk2dXW4xiozBnICa0=
index.js:314 OC.requestToken changed /Xg/3GLv26co1ck0bpp9+jw9CPrWinrbwXf0zI4yVZI=:mxZvkjiIrtNwpPkbCPUblVRYRoiC/TKtohGFm+VxHtg=
index.js:314 OC.requestToken changed YaOzccj1kbRutXsYoBGUe1//TEv8YSRNBNiC03VmpGA=:B83jP5KS5MA2xEs3xn7yFDeaAjmoFmw7Z77zhB4l7yo=
index.js:314 OC.requestToken changed NtI6dTbF/ilVI6v24PFJjEddAaFgoyKtU0hFkUR1ZK8=:ULxqO2yii10NUpvZhp4v4y84T9M01GrbMC40xi82L+U=

I enabled the slow mysql queries and noticed a query that takes several 5-10 minutes to finish!

SELECT id, uri, lastmodified, etag, size, carddata, uid FROM oc_cards WHERE addressbookid = ‘10809’;

I run the query manually from the command line and it takes 5-10 minutes to run.

The results of this query are like it is displaying all addressbooks in the instance and not just the one addressbook.

What is going on here?

Problem solved!

We were using LDAP backend, which caused thousands of contacts to be automatically created in the contacts app tables in the database for the System address book.

To debug it, we enabled slow queries and found the query that was trying to load all of those contacts, when a used opened the contacts app:

SELECT id, uri, lastmodified, etag, size, carddata, uid FROM oc_cards WHERE addressbookid = ‘10809’;

To fix the problem, we run on the ssh terminal the next command:

sudo -u apache php occ config:app:set dav system_addressbook_exposed --value=“no”

(apache is our webserver user)

The contacts app is now fully working because the system address book is not exposed anymore, therefore not called.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.