Error after upgrading nextcloud

Hi everyone.

today I tried to upgrade from Nextcloud 20.0.12 to the current version 23.0.0.0 and ran into several errors.

I run nextcloud o a virtual ubuntu 20.04 server with Plesk, PHP 7.4 and with a sqlite database.
Strangely enough there is an apache and a ngix process running (A Plesk thing?)

First I made a copy of the whole nextcloud folder and then tried to upgrade via the browser, but as usual it ran into an error that I could not solve.
After restoring the nextcloud folder with the backup I tried to update the apps first and ran into an error with the mail app.

So i made a backup of the database the with

sudo -u eds-ftp php nextcloud/occ maintenance:mode --on
sqlite3 nextcloud/data/owncloud.db .dump > nextcloud-sqlbkup_`date +"%Y%m%d"`.bak

Then I deleted the whole nextcloud folder, downloaded and extracted the current nextcloud zip, went to the website and did the first init (creating an admin acount)

After that I did a

sudo -u eds-ftp php nextcloud/occ maintenance:mode --on
rm nextcloud/data/owncloud.db
sudo -u eds-ftp sqlite3 nextcloud/data/owncloud.db < nextcloud-sqlbkup_20211203.bak
sudo -u eds-ftp php nextcloud/occ maintenance:mode --off

Now I could login as a regular user, found my contacts, calendar and files.

I even can edit contacts and the calendar and sync it with my phone,

But I cannot upload files neither can I create a new file with the browser interface.

The output of your Nextcloud log in Admin > Logging:

I don't see **Logging** in the admin panel 

Here is what I found:

The Proxy error log:

cat /var/www/vhosts/system/nc.my_website.de/logs/proxy_error_log 
#4 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/vhosts/my_website.de/nc.my_website.de" while reading response header from upstream, client: 91.249.26.3, server: nc.my_website.de, request: "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/nc.my_website.de/php-fpm.sock:", host: "nc.my_website.de"

2021/12/03 02:40:21 [error] 445#0: *82 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php:82
Stack trace:

#0 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(82): PDO->query()
#1 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\Driver\PDO\Connection->query()
#2 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/lib/private/DB/Connection.php(236): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/vhosts/my_website.de/nc.my_website.de" while reading response header from upstream, client: 91.249.26.3, server: nc.my_website.de, request: "GET /ocs/v2.php/apps/spreed/api/v4/room HTTP/1.1", upstream: "fastcgi://unix:/var/www/vhosts/system/nc.my_website.de/php-fpm.sock:", host: "nc.my_website.de"

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocxvsby6213n',
  'passwordsalt' => 'sdfghjuik',
  'secret' => 'sdfghj',
  'trusted_domains' => 
  array (
    0 => 'nc.my_website.de',
  ),
  'datadirectory' => '/var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'https://nc.my_website.de',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The error log:

cat /var/www/vhosts/system/my_website.de/logs/error_log 
[Fri Dec 03 02:37:50.099759 2021] [access_compat:error] [pid 423] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/**htaccesstest.txt**
[Fri Dec 03 02:37:50.128944 2021] [access_compat:error] [pid 422] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:37:53.417725 2021] [access_compat:error] [pid 426] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:37:53.448475 2021] [access_compat:error] [pid 425] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:38:09.138545 2021] [access_compat:error] [pid 424] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:38:09.169988 2021] [access_compat:error] [pid 423] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:38:14.992674 2021] [access_compat:error] [pid 422] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt
[Fri Dec 03 02:38:15.025470 2021] [access_compat:error] [pid 426] [client 83.169.1.9:0] AH01797: client denied by server configuration: /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/htaccesstest.txt

Here I don’t understand what htaccesstest.txt means. there is no file with that name in tne data directory
The data directory only contains a .htaccess file but no htaccesstest.txt file.

cat  /var/www/vhosts/my_website.de/nc.my_website.de/nextcloud/data/.htaccess 
# Generated by Nextcloud on 2021-12-03 01:41:28
# Section for Apache 2.4 to 2.6
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>
<IfModule mod_access_compat.c>
  Order Allow,Deny
  Deny from all
  Satisfy All
</IfModule>

# Section for Apache 2.2
<IfModule !mod_authz_core.c>
  <IfModule !mod_access_compat.c>
    <IfModule mod_authz_host.c>
      Order Allow,Deny
      Deny from all
    </IfModule>
    Satisfy All
  </IfModule>
</IfModule>

# Section for Apache 2.2 to 2.6
<IfModule mod_autoindex.c>
  IndexIgnore *

I have no clue where to go from here.

Can I provide any further information?

Oh, my friend, you are not alone.
The same situation in my side, I installed NC 23.0 and it was running good, but I run the check in basic setting, and a warning shows:

MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this :arrow_upper_right:

So I followed the guide mentioned above, convert the table to enable 4-byte support, then it run worse: when I try to visit the site, exception occurs, and the log shows:

An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig"

Oh, I am so regret to make the conversion , really appreciate if any one can help and save me/us :sob:

Continue to update, I think I have solved it:
I get flash on this thread: Problems enabling MySQL 4-byte support for Nextcloud
So I run the occ command in nextcloud installation directory:
sudo -u www php occ maintenance:repair
In the official command it would be sudo -u www-data php occ maintenance:repair
Anyway, after run the repair flow successfully, my data is back, the table oc_appconfig is accessable.
So happy :grin:~~~~