Hi,
I’m running NextCloudPi on a Raspberry Pi for my family. Unfortunately, a recent update of the Contacts and Calendar App seems to lose the table of contacts and calendar events for every family members on the instance.
Yesterday I noticed an app update prompt for Contacts 5.3.0 and Calendar 4.4.0 after logging as Admin in NextCloud from Web interface. I switched to browser other tabs after clicking the “Update All” button. Due to my sometimes wacky internet connection to App Store, it could take some time.
After a while, I notice NextCloud Android client notified me the server is in maintenance mode, which is I didn’t notice during prior experience of updating apps. Hence I switched back to Web interface and noticed that only Contacts app was updated while Calendar was not, due to slow internet connection.
Normally under this situation in the past, I would simply try again in another time.
It didn’t take long for me to notice the contacts and calendar events were all gone from my mobile, synced with NextCloud via DAVroid. And the same for other family members as well!
Login via Web interface, something weird can be seen from Contact App from the top left corner menu area:
In Calendar App, the circle in front of my calendar seemed to spin forever:
On a desperate attempt to fix all these(imaging the pressure from family members ), I switched to a regional mirror of the AppStore and performed the app update via CLI:
$ sudo ncp-config
Running nc-update-nc-apps
Cannot load Zend OPcache - it was already loaded
calendar new version available: 4.4.0
Error: Database error when running migration 4004Date20230414163505 for app calendar
Migration step 'OCA\Calendar\Migration\Version4004Date20230414163505' is unknown
carnet new version available: 0.24.7
carnet updated
Done. Press any key...
Mirror certainly works as another Carnet App was upgraded successfully. For the Calendar, I guess I was hit by the bug mentioned here: Updating Calendar App breaks NextCloud 26.0.2
Followed the instruction in comment, I did below:
$ sudo -u www-data php /var/www/nextcloud/occ upgrade
Cannot load Zend OPcache - it was already loaded
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <calendar> ...
Updated <calendar> to 4.4.0
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Calendar App was upgraded successfully, too!
Unfortunately, the errors in Contacts and Calendar app remain and all my users on this NextCloud instances had lost access to contacts and calendar events.
Thanks in advance for any advice or guidance on how to fix those issue and restore the functionality!
Additional system info below:
NextcloudPi version v1.52.0
NextcloudPi image NextCloudPi_03-02-22
OS Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount yes
USB devices none
datadir /mnt/ncdata/data
data in SD yes
data filesystem ext2/ext3
data disk usage 228G/361G
rootfs usage 228G/361G
swapfile /swapfile
dbdir /var/lib/mysql
Nextcloud check ok
Nextcloud version 26.0.1.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
HPB service up
Postfix service up
Internet check ok
Public IPv4 XXX.XXX.XXX.XXX
Public IPv6 not found
Port 80 closed
Port 443 closed
IP 192.168.199.181
Gateway 192.168.199.1
Interface eth0
Certificates none
NAT loopback no
Uptime 5:57
Version: 8.1.18
Memory limit: 682.2 MB
Max execution time: 3600
Upload max size: 10 GB
Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, intl, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
Type: mysql
Version: 10.5.19
Size: 24.4 MB