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

[Bug]: After upgrade to NC v27.0.1, cannot sync to server. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list' #39548

Closed
5 of 8 tasks
andrew-jolley opened this issue Jul 23, 2023 · 9 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug needs info

Comments

@andrew-jolley
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

After upgrading to Nextcloud v27.0.1 on my Raspberry Pi 4, I get an "Internal Server Error" on my desktop client
I have reinstalled both the server, the client and the configuration on the desktop client.

Steps to reproduce

  1. Upgrade from v26.x to v27.0.1
  2. Sync using macOS (only one tested) Desktop Client
  3. See "X" in the Menu Bar

Expected behavior

Client to sync to server

Installation method

Other Community project

Nextcloud Server version

27

Operating system

Other

PHP engine version

PHP 8.2

Web server

Other

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "*"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.0.1.2",
        "hashingThreads": 4,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "overwrite.cli.url": "http:\/\/localhost\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "GB",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "admin_notifications"
        ],
        "updater.release.channel": "stable",
        "maintenance": false,
        "theme": "",
        "loglevel": 2
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - announcementcenter: 6.6.1
  - calendar: 4.4.3
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - event_update_notification: 2.2.0
  - external: 5.2.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - registration: 2.2.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - side_menu: 3.10.2
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0
  - encryption: 2.15.0
  - files_external: 1.19.0
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"cFbsqOl9G2BZsv788NeG","level":3,"time":"2023-07-23T16:14:07+00:00","remoteAddr":"192.168.0.18","user":"AndrewJ","app":"webdav","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/AndrewJ/","message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.9.0git (build 16016) (Nextcloud, osx-23.0.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"27.0.1.2","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":295,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":289,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":188,"function":"cacheDirectory","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropertyStorage/Plugin.php","line":84,"function":"propFind","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\PropertyStorage\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\InvalidFieldNameException","Message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1814,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1749,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1055,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":289,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":188,"function":"cacheDirectory","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropertyStorage/Plugin.php","line":84,"function":"propFind","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\PropertyStorage\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":69,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":103,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1045,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":289,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":188,"function":"cacheDirectory","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropertyStorage/Plugin.php","line":84,"function":"propFind","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\PropertyStorage\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":30,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","Code":"42S22","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":101,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1045,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":262,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":293,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":289,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":188,"function":"cacheDirectory","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropertyStorage/Plugin.php","line":84,"function":"propFind","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"Sabre\\DAV\\PropertyStorage\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":101}}},"message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'","exception":[],"CustomMessage":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list'"},"id":"64bd51cf7e98d"}

Additional info

OS: DietPi v8.19.1
Webserver: llighttpd
Installed from DietPi software

@andrew-jolley andrew-jolley added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 23, 2023
@solracsf solracsf changed the title [Bug]: After upgrade to NC v27.0.1, cannot sync to server [Bug]: After upgrade to NC v27.0.1, cannot sync to server. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'valuetype' in 'field list' Jul 23, 2023
@joshtrichards
Copy link
Member

Hi @andrew-jolley - Thanks for reporting. That's a little weird though. The valuetype column has existed in the properties table since NC25 (via #30368). In v27.0.1 there is a new code path (by way of cacheDirectory() via #39292) that uses it, but you should already have the column in your database.

Given how it's being triggered for you and there haven't any other reports, I suspect something else is going on here (but anything is possible).

Any chance you can provide the output of DESCRIBE oc_properties from your Nextcloud database? That would tell us, with certainty, what columns you actually have.

Also, what version of NC did you upgrade from?

@andrew-jolley
Copy link
Author

Hello.
Where would I run the DESCRIBE oc_properties?

@joshtrichards
Copy link
Member

@andrew-jolley - The general approach would be to do it from the command line using mysql/mariadb client. Something like:

mysql --host=<dbhost> --user=<dbuser> --password <dbname>
(enter password from dbpass field as password when prompted for it)
DESCRIBE oc_properties;

...executed from your NC (or DB) server.

If you're using a UNIX socket to connect to your db modify it slightly to something like:

mysql --host=localhost -S /usr/local/run/mysql.sock --user=ncuser --password ncdb

Example:

xxx@node2:~/src/infrastructure/test/test-nc26$ docker compose exec -u33 db bash
www-data@c2c62d7cbd2a:/$ mysql --host=localhost -S /usr/local/run/mysql.sock --user=ncuser --password ncdb
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3380
Server version: 10.6.14-MariaDB-1:10.6.14+maria~ubu2004-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [ncdb]> describe oc_properties;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| id            | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| userid        | varchar(64)  | NO   | MUL |         |                |
| propertypath  | varchar(255) | NO   | MUL |         |                |
| propertyname  | varchar(255) | NO   |     |         |                |
| propertyvalue | longtext     | NO   |     | NULL    |                |
| valuetype     | smallint(6)  | YES  |     | 1       |                |
+---------------+--------------+------+-----+---------+----------------+
6 rows in set (0.002 sec)

MariaDB [ncdb]> 

@andrew-jolley
Copy link
Author

andrew-jolley commented Jul 28, 2023

Hi there,
Below is the result of that command:
MariaDB [nextcloud]> DESCRIBE oc_properties; +---------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | userid | varchar(64) | NO | MUL | | | | propertypath | varchar(255) | NO | MUL | | | | propertyname | varchar(255) | NO | | | | | propertyvalue | longtext | NO | | NULL | | +---------------+--------------+------+-----+---------+----------------+ 5 rows in set (0.001 sec)

image

@joshtrichards
Copy link
Member

Yes, definitely missing. Haven't seen any other reports of this. This would have been something that somehow got skipped or failed when upgrading/installing NC v25.0.0.

No idea why/how. Do you recall any weird things that happened when you upgraded to NC25? Or any chance your database was restored from an earlier backup at some point or something?

Would possibly have broken some aspects of CalDav (Calendar, Tasks) too.

Since you're already up to NC27, the cause is probably going to remain a mystery. I can help you repair it manually, but first let's check one more thing. Provide the output of the following from your server command-line:

sudo -u www-data NC_debug=1 php /var/www/nextcloud/occ migrations:status dav

Example (adjusted for my environment which isn't a DietPi but similar idea):

www-data@eb887ee23ab9:~/html$ NC_debug=1 ./occ migrations:status dav
    >> App:                                                dav
    >> Version Table Name:                                 oc_migrations
    >> Migrations Namespace:                               OCA\DAV\Migration
    >> Migrations Directory:                               /var/www/html/apps/dav/lib/Migration
    >> Previous Version:                                   1024Date20211221144219
    >> Current Version:                                    1027Date20230504122946
    >> Next Version:                                       Already at latest migration step
    >> Latest Version:                                     1027Date20230504122946
    >> Executed Migrations:                                22
    >> Executed Unavailable Migrations:                    22
    >> Available Migrations:                               22
    >> New Migrations:                                     22
    >> Pending Migrations:                                 None
www-data@eb887ee23ab9:~/html$ 

@andrew-jolley
Copy link
Author

Hi there,
The attached is the result of that.
Thanks
Screenshot 2023-07-29 at 13 08 28

@joshtrichards
Copy link
Member

Well that's certainly interesting. It certainly thinks the appropriate migration ran successfully.

How to manually fix

This should re-run that specific migration manually. It should be as safe as any typical NC upgrade run so handle it however you do so when upgrading.

My standard suggestion: Backup your database first

Warning: This will temporarily prevent users from connecting to Nextcloud during maintenance mode

Put Nextcloud into maintenance mode:

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on

Trigger the manual migration that should update the table:

sudo -u www-data NC_debug=1 php /var/www/nextcloud/occ migrations:execute dav 1024Date20211221144219

Probably not a bad idea to trigger this too:

sudo -u www-data php /var/www/nextcloud/occ maintenance:repair

Then turn off maintenance mode:

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off

Connect to your db from the command line in the way as you did previously then execute the following again to see if the valuetype column is now shown:

DESCRIBE oc_properties;

Update us here with the status.

@andrew-jolley
Copy link
Author

Hi there,
After these steps, this is the DB output, with my desktop client showing the tick, and resuming normal status. Thank you!
Screenshot 2023-07-30 at 16 51 10

@joshtrichards
Copy link
Member

joshtrichards commented Aug 6, 2023

@andrew-jolley - Glad you got it all sorted out! Please close this Issue out when you get a chance if you consider it "done". Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug needs info
Projects
None yet
Development

No branches or pull requests

4 participants