nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.57k stars 4.08k forks source link

[Bug]: Error updating from 25.0.5 to 26.0.0, using SQLite3, `General error: 1 near “(”: syntax error` #37649

Closed johnstoneinoue closed 2 months ago

johnstoneinoue commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

While updating from 25.0.5 to 26.0.0, An exception occurred like below. An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near “(”: syntax error

Steps to reproduce

1.upgrade from 25.0.5 to 26.0.0 2. 3.

Expected behavior

I expect to be able to update my Nextcloud from 25.0.5 to 26.0.0.

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

26

Operating system

RHEL/CentOS

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

SQlite

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

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "www.sainet.ne.jp"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "sqlite3",
        "version": "25.0.5.1",
        "overwrite.cli.url": "https:\/\/www.sainet.ne.jp\/nextcloud",
        "installed": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "simpleSignUpLink.shown": false,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "app_install_overwrite": [
            "impersonate"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - bruteforcesettings: 2.5.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contactsinteraction: 1.6.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - impersonate: 1.12.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.1
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.4
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - workflowengine: 2.7.0
Disabled:
  - admin_audit
  - dashboard: 7.1.0
  - encryption
  - files_external
  - suspicious_login
  - twofactor_totp
  - user_ldap
  - weather_status: 1.1.0

Nextcloud Signing status

Nextcloud は バーション 26.0.0 にアップデートされます
以下のアプリはアップデートされます:
Activity (activity)
Brute-force settings (bruteforcesettings)
Circles (circles)
Cloud Federation API (cloud_federation_api)
Comments (comments)
Contacts Interaction (contactsinteraction)
WebDAV (dav)
Federated file sharing (federatedfilesharing)
Federation (federation)
Files (files)
PDF viewer (files_pdfviewer)
Right click (files_rightclick)
File sharing (files_sharing)
Deleted files (files_trashbin)
Versions (files_versions)
First run wizard (firstrunwizard)
Log Reader (logreader)
Lookup Server Connector (lookup_server_connector)
Nextcloud announcements (nextcloud_announcements)
Notifications (notifications)
OAuth 2.0 (oauth2)
Password policy (password_policy)
Photos (photos)
Privacy (privacy)
Provisioning API (provisioning_api)
Recommendations (recommendations)
Related Resources (related_resources)
Monitoring (serverinfo)
Nextcloud settings (settings)
Share by mail (sharebymail)
Support (support)
Usage survey (survey_client)
Collaborative tags (systemtags)
Text (text)
Theming (theming)
Two factor backup codes (twofactor_backupcodes)
Update notification (updatenotification)
User status (user_status)
Viewer (viewer)
Nextcloud workflow engine (workflowengine)
無効になる互換性のないアプリ:
Impersonate (impersonate)
データベースを確認してください。実行前にconfigフォルダーとdataフォルダーをバックアップします。
大規模なサイトの場合、ブラウザーがタイムアウトする可能性があるため、インストールディレクトリで次のコマンドを実行することもできます。
./occ upgrade

Nextcloud Logs

# grep 2023-04-  nextcloud.log|grep error
{"reqId":"ZC9QHsBLmivw1yddUUeOywAAABE","level":3,"time":"2023-04-06T23:05:02+00:00","remoteAddr":"[ip address]","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=BeDoFsPlhL18ydJRObTTPqTc1yoaZSSGp3TL64dz42c%3D%3AQ6%2B%2FTIWH%2FdISk7cmfPKGB9KmlU9vAVXB10XkgbALqUg%3D","message":"Exception while executing repair step Repair SQLite autoincrement","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62","version":"25.0.5.1","exception":{"Exception":"Doctrine\\DBAL\\Exception\\SyntaxErrorException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":1,"Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1814,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\SQLite\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1749,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1055,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/SqliteAutoincrement.php","line":63,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\SqliteAutoincrement","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":1,"Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":65,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["HY000",1,"near \"(\": syntax error"]]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1042,"function":"prepare","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/SqliteAutoincrement.php","line":63,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\SqliteAutoincrement","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":30,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":"HY000","Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":60,"function":"prepare","class":"PDO","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1042,"function":"prepare","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/SqliteAutoincrement.php","line":63,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\SqliteAutoincrement","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","Line":60}},"message":"Exception while executing repair step Repair SQLite autoincrement","exception":{},"CustomMessage":"Exception while executing repair step Repair SQLite autoincrement"}}
{"reqId":"ZC9QHsBLmivw1yddUUeOywAAABE","level":3,"time":"2023-04-06T23:05:02+00:00","remoteAddr":"[ip address]","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=BeDoFsPlhL18ydJRObTTPqTc1yoaZSSGp3TL64dz42c%3D%3AQ6%2B%2FTIWH%2FdISk7cmfPKGB9KmlU9vAVXB10XkgbALqUg%3D","message":"OC\\Repair\\Events\\RepairErrorEvent: Repair error: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62","version":"25.0.5.1","data":{"app":"updater"}}
{"reqId":"ZC9QHsBLmivw1yddUUeOywAAABE","level":3,"time":"2023-04-06T23:05:02+00:00","remoteAddr":"[ip address]","user":"--","app":"no app in context","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=BeDoFsPlhL18ydJRObTTPqTc1yoaZSSGp3TL64dz42c%3D%3AQ6%2B%2FTIWH%2FdISk7cmfPKGB9KmlU9vAVXB10XkgbALqUg%3D","message":"Exception while executing repair step Copy data from accounts table when migrating from ownCloud","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62","version":"25.0.5.1","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":1,"Trace":[{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/ConnectionAdapter.php","line":230,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::","args":[["Doctrine\\DBAL\\Exception\\SyntaxErrorException"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":101,"function":"createSchema","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":69,"function":"shouldRun","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":70,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\SyntaxErrorException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":1,"Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1814,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\SQLite\\ExceptionConverter","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1749,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],["Doctrine\\DBAL\\Query"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1055,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[["Doctrine\\DBAL\\Driver\\PDO\\Exception"],"SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Migrator.php","line":98,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":566,"function":"createSchema","class":"OC\\DB\\Migrator","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/ConnectionAdapter.php","line":228,"function":"createSchema","class":"OC\\DB\\Connection","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":101,"function":"createSchema","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":69,"function":"shouldRun","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":1,"Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":65,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[["PDOException",["HY000",1,"near \"(\": syntax error"]]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1042,"function":"prepare","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Migrator.php","line":98,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":566,"function":"createSchema","class":"OC\\DB\\Migrator","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/ConnectionAdapter.php","line":228,"function":"createSchema","class":"OC\\DB\\Connection","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":101,"function":"createSchema","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":69,"function":"shouldRun","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":30,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","Code":"HY000","Trace":[{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","line":60,"function":"prepare","class":"PDO","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1042,"function":"prepare","class":"Doctrine\\DBAL\\Driver\\PDO\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":264,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[],null]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":849,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"],[]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":207,"function":"fetchAllAssociative","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM PRAGMA_TABLE_INFO (?)",["oc_accounts"]]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":228,"function":"_getPortableTableIndexesList","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":[[["0","sqlite_autoindex_oc_accounts_1","1"]],"oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":328,"function":"listTableIndexes","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php","line":572,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":306,"function":"listTableDetails","class":"Doctrine\\DBAL\\Schema\\SqliteSchemaManager","type":"->","args":["oc_accounts"]},{"file":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php","line":1229,"function":"listTables","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Migrator.php","line":98,"function":"createSchema","class":"Doctrine\\DBAL\\Schema\\AbstractSchemaManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/Connection.php","line":566,"function":"createSchema","class":"OC\\DB\\Migrator","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/DB/ConnectionAdapter.php","line":228,"function":"createSchema","class":"OC\\DB\\Connection","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":101,"function":"createSchema","class":"OC\\DB\\ConnectionAdapter","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair/Owncloud/SaveAccountsTableData.php","line":69,"function":"shouldRun","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Repair.php","line":126,"function":"run","class":"OC\\Repair\\Owncloud\\SaveAccountsTableData","type":"->","args":[["OC\\Repair"]]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":259,"function":"run","class":"OC\\Repair","type":"->","args":[]},{"file":"/home/[ip address]/public_html/nextcloud/lib/private/Updater.php","line":140,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["26.0.0.11","25.0.5.1"]},{"file":"/home/[ip address]/public_html/nextcloud/core/ajax/update.php","line":185,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/[ip address]/public_html/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php","Line":60}}},"message":"Exception while executing repair step Copy data from accounts table when migrating from ownCloud","exception":{},"CustomMessage":"Exception while executing repair step Copy data from accounts table when migrating from ownCloud"}}
{"reqId":"ZC9QHsBLmivw1yddUUeOywAAABE","level":3,"time":"2023-04-06T23:05:02+00:00","remoteAddr":"[ip address]","user":"--","app":"updater","method":"GET","url":"/nextcloud/core/ajax/update.php?requesttoken=BeDoFsPlhL18ydJRObTTPqTc1yoaZSSGp3TL64dz42c%3D%3AQ6%2B%2FTIWH%2FdISk7cmfPKGB9KmlU9vAVXB10XkgbALqUg%3D","message":"OC\\Repair\\Events\\RepairErrorEvent: Repair error: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near \"(\": syntax error","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.62","version":"25.0.5.1","data":{"app":"updater"}}

Additional info

I use a cPanel based environment.

joshtrichards commented 1 year ago

Possibly similar to #33331

CalawayTech1 commented 1 year ago

same issue running on plesk server; we tried updating manually by moving the data/config out and extracting latest zip and ran

./occ upgrade from terminal; same error as thread subject title.
`Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: Not a mysql database -> nothing to do
Repair step: Repair SQLite autoincrement
Repair error: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error
albansuser commented 1 year ago

I've experienced exactly the same problem, also on a Plesk server. Occurred last week, requiring a full site restore, and again today.

CalawayTech1 commented 1 year ago

In case you were wondering: The Nextcloud 26.0.1 RC1 update doesn't resolve this error; we're on Plesk.

albansuser commented 1 year ago

Thanks for the update. Looking forward to a resolution.

johnstoneinoue commented 1 year ago

I tried updating to 26.0.1 after updating to 25.0.6 from 25.0.5 on cPanel, but I got the same error.

albansuser commented 1 year ago

Thanks for that. I was wondering if updating 25.0.6 to 26.0.1 might be the solution.

So updating from 25.0.5 to 25.0.6 is without issues?

Cheers

johnstoneinoue commented 1 year ago

So updating from 25.0.5 to 25.0.6 is without issues?

I could successfully update from 25.0.5 to 25.0.6 without issues. But I couldn't update with built-in updater, so I updated manually from 25.0.5 to 25.0.6.

albansuser commented 1 year ago

Just to clarify, the in-built updater from 25.0.5 to 25 0.6 doesn't work?

If it didn't, then did it produce the same "(": syntax error`?

johnstoneinoue commented 1 year ago

Just to clarify, the in-built updater from 25.0.5 to 25 9.6 doesn't work? If it didn't, then did it produce the same "(": syntax error`?

I don't know why, but I could not update to 25.0.6 with the in-built updater. Even I clicked the update button, the update wasn't proceeded. 25.0.6 have already been out. This may be the reason I could't use the in-built updater to update to 25.0.6.

albansuser commented 1 year ago

Today I successfully updated from 25.0.5 to 25.0.6 using the inbuilt updater.

In the past I had continual problems using the inbuilt updater until I discovered a procedure that corrects the apparent hangs of the updating process that are associated with pink coloured warnings in the updating steps list. I'll post the proceedure if anyone would like it.

Since updating to 25.0.6, I see that 26.0.1 is again listed as available. I won't try that update until I know it works!

CalawayTech1 commented 1 year ago

I tried updating NextCloud on Plesk with the Daily Build (May 30th copy) via manual upgrade to 26.0.1 from 25.06 and was unsuccessful.

solracsf commented 1 year ago

Just adding a stack strace here for further debugging:

Error while trying to initialise the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error
--
176 | Trace: #0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1814): Doctrine\DBAL\Driver\API\SQLite\ExceptionConverter->convert()
177 | #1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1749): Doctrine\DBAL\Connection->handleDriverException()
178 | #2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1055): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
179 | #3 /var/www/html/lib/private/DB/Connection.php(262): Doctrine\DBAL\Connection->executeQuery()
180 | #4 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(849): OC\DB\Connection->executeQuery()
181 | #5 /var/www/html/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php(207): Doctrine\DBAL\Connection->fetchAllAssociative()
182 | #6 /var/www/html/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php(228): Doctrine\DBAL\Schema\SqliteSchemaManager->_getPortableTableIndexesList()
183 | #7 /var/www/html/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php(328): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableIndexes()
184 | #8 /var/www/html/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php(572): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableDetails()
185 | #9 /var/www/html/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php(306): Doctrine\DBAL\Schema\SqliteSchemaManager->listTableDetails()
186 | #10 /var/www/html/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php(1229): Doctrine\DBAL\Schema\AbstractSchemaManager->listTables()
187 | #11 /var/www/html/lib/private/DB/Migrator.php(98): Doctrine\DBAL\Schema\AbstractSchemaManager->createSchema()
188 | #12 /var/www/html/lib/private/DB/Connection.php(570): OC\DB\Migrator->createSchema()
189 | #13 /var/www/html/lib/private/DB/SchemaWrapper.php(43): OC\DB\Connection->createSchema()
190 | #14 /var/www/html/lib/private/DB/MigrationService.php(445): OC\DB\SchemaWrapper->__construct()
191 | #15 /var/www/html/core/Migrations/Version13000Date20170705121758.php(43): OC\DB\MigrationService->OC\DB\{closure}()
192 | #16 /var/www/html/lib/private/DB/MigrationService.php(446): OC\Core\Migrations\Version13000Date20170705121758->changeSchema()
193 | #17 /var/www/html/lib/private/DB/MigrationService.php(409): OC\DB\MigrationService->migrateSchemaOnly()
194 | #18 /var/www/html/lib/private/Setup/AbstractDatabase.php(158): OC\DB\MigrationService->migrate()
195 | #19 /var/www/html/lib/private/Setup.php(371): OC\Setup\AbstractDatabase->runMigrations()
196 | #20 /var/www/html/core/Command/Maintenance/Install.php(104): OC\Setup->install()
197 | #21 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Install->execute()
198 | #22 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
199 | #23 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
200 | #24 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
201 | #25 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
202 | #26 /var/www/html/console.php(100): OC\Console\Application->run()
203 | #27 /var/www/html/occ(11): require_once('...')
204 | #28 {main}
albansuser commented 1 year ago

Within the context of the above problems updating to v26.0.1 from 25.0.6:

Is it now possible to update from 25.0.7 to 26.0.2 without these problems?

Thanks

joshtrichards commented 1 year ago

Based on the stack trace from @johnstoneinoue this looks like doctrine/dbal/issues/5133

It occurs immediately after this query for us:

SELECT * FROM PRAGMA_TABLE_INFO (?)

And, specifically, this commit in their repo: https://github.com/doctrine/dbal/commit/55259d55b3b80ac43c7ff9b592bf5f8c30a4af2e And some more background here: doctrine/dbal/pull/5259

It almost certainly came about due to the bump of doctrine/dbal from 3.1.4 -> 3.3.8 here:

https://github.com/nextcloud/3rdparty/commit/84c0549ea4b3b058d747c9e5c4100834579a3c3b

Which appears to have made its way into both NC26 and NC27.

This is going to require some digging to determine the best course of action...

szaimen commented 1 year ago

Cc @come-nc

come-nc commented 1 year ago

People with the issue, could you give the output of php --info|grep -i sqlite ? (using the same php that runs the nextcloud server). Also php --version.

dimpflmoser commented 1 year ago

I ran in the same problem, unfortunately I cannot run php --info from the shell, as it's a virtual webspace with different php installations for the web server and for shell access. Hence, php ./occ fails for me.

On the shell I get this info, which may be different for the webserver's php:

$ php8.0 --info|grep -i sqlite
PDO drivers => mysql, sqlite
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.8.7.1
sqlite3
SQLite3 support => enabled
SQLite Library => 3.8.7.1
sqlite3.extension_dir => no value => no value

$ php8.0 --version
PHP 8.0.1 (cli) (built: Jan  7 2021 17:55:39) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies

Anyway, is there a way to get out of the update loop and revert back to 25.0.7?

CalawayTech1 commented 1 year ago

Request 1: $ **php --info|grep -i sqlite** /etc/php.d/pdo_sqlite.ini, /etc/php.d/sqlite3.ini, PDO drivers => mysql, sqlite pdo_sqlite PDO Driver for SQLite 3.x => enabled SQLite Library => 3.7.17 sqlite3 SQLite3 support => enabled SQLite3 module version => 0.7 SQLite Library => 3.7.17 sqlite3.extension_dir => no value => no value Request 2: $ **php --version** PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.

albansuser commented 1 year ago

Same problem with a virtual web space.

Running phpinfo.php from the Nextcloud directory results in (excerpts):

PHP Version 8.1.19

SQLite3 support - enabled SQLite Library - 3.7.17

After the crash upon attempting to update to v26, I merely requested the administrator to restore the complete site from the daily backups. Quick and reliable.

come-nc commented 1 year ago

Request 2: $ **php --version** PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.

PHP 5.4 has not been supported by Nextcloud, or by anyone, since a long time. This is too old and unsafe.

Same problem with a virtual web space.

Running phpinfo.php from the Nextcloud directory results in (excerpts):

PHP Version 8.1.19

SQLite3 support - enabled SQLite Library - 3.7.17

This is more troubling, modern PHP linked to an old sqlite version :-/ Any version lower than 3.16.0 will have the problem it seems.

I do not think we can support sqlite versions that Doctrine stops supporting. But maybe we could test for this in the admin settings, or even prior to the update?

albansuser commented 1 year ago

The default Plesk database for my site is MariaDB.

When I installed Nextcloud the installation process offered choices of DB type to be used. Rightly or wrongly I chose SQLite.

Am I correct in concluding that NC supports SQLite and the version used was determined by NC?

come-nc commented 1 year ago

Nextcloud does support SQLite, but the version of the library used to build you php binary is too old. 3.7.17 is 10 years old.

albansuser commented 1 year ago

Thanks for the explanation.

Could you tell me how to update the SQLite library?

joshtrichards commented 1 year ago

@albansuser That'd be outside the scope of a bug report. :-) You can post over on the forum (https://help.nextcloud.com) to try to get some help with that or check with your hosting provider. It'll be specific to the operating system of your server. Or just convert over to MariaDB since it sounds like you've got it:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/db_conversion.html

albansuser commented 1 year ago

Does anyone know if the recently released v25.0.8 has resolved the above issue of updating to v26?

I see v26.0.3 was also released about the same time.

Thanks

jodoe commented 1 year ago

I found this to be a problem under CentOS 7, which admiteldy doesn't have much lift left in it but is my current NC host.

As a work around I installed mariadb and converted the install from sqlite to mariadb, which allowed the upgrade to complete.

It would be useful for NC to check for this problem before kicking off an upgrade :)

nextcloud-command commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.