[Bug]: 35.0.2 RC2 update triggers TableManager error

オープン
#5,147 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
mariadb, php
領域
backend, database

調査の方向性

The failing class is OCA\Polls\Db\V11\TableManager, so start in the polls app's Db/V11 migration code and check whether the class file exists and matches its namespace for autoloading. The trace runs through Nextcloud's SchemaChecker and Upgrade command, which only show where the lookup fails. Reproduce by upgrading a test instance from 32.0.x to 35.0.2 RC2 with occ upgrade. Done means the upgrade completes without a QueryNotFoundException and the schema check reports no disabled-migration warning for polls.

索引モデルが issue の本文から書いたものです。

説明

⚠️ This issue respects the following points: ⚠️
  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description

On a test setup, I tried to update from NC 32.0.1 to 35.0.2 RC2 via CLI updater.
Updater script runs through until

Update successful
Maintenance mode is kept active
Resetting log level

But then I get an error with the Table Manager, that makes my update fail:

In SimpleContainer.php line 114:

  [OCP\AppFramework\QueryException]
  Could not resolve OCA\Polls\Db\V11\TableManager! Class "OCA\Polls\Db\V11\TableManager" does not exist


Exception trace:
  at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:114
 OC\AppFramework\Utility\SimpleContainer->{closure:OC\AppFramework\Utility\SimpleContainer::buildClassConstructorParameters():83}() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:83
 OC\AppFramework\Utility\SimpleContainer->buildClassConstructorParameters() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:72
 OC\AppFramework\Utility\SimpleContainer->{closure:OC\AppFramework\Utility\SimpleContainer::buildClass():70}() at n/a:n/a
 get_object_vars() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:254
 OC\Log\ExceptionSerializer->encodeArg() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:237
 OC\Log\ExceptionSerializer->{closure:OC\Log\ExceptionSerializer::encodeTrace():235}() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:235
 OC\Log\ExceptionSerializer->encodeTrace() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:286
 OC\Log\ExceptionSerializer->serializeException() at /usr/local/www/nextcloud-test/lib/private/Log.php:350
 OC\Log->logException() at /usr/local/www/nextcloud-test/lib/private/Log/PsrLoggerAdapter.php:163
 OC\Log\PsrLoggerAdapter->log() at /usr/local/www/nextcloud-test/lib/private/Log/PsrLoggerAdapter.php:108
 OC\Log\PsrLoggerAdapter->warning() at /usr/local/www/nextcloud-test/lib/private/DB/SchemaChecker.php:185
 OC\DB\SchemaChecker->applyDisabledMigrations() at /usr/local/www/nextcloud-test/lib/private/DB/SchemaChecker.php:66
 OC\DB\SchemaChecker->getFindings() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:255
 OC\Core\Command\Upgrade->checkSchema() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:246
 OC\Core\Command\Upgrade->postUpgradeCheck() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:200
 OC\Core\Command\Upgrade->execute() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Command/Command.php:341
 Symfony\Component\Console\Command\Command->run() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:1094
 Symfony\Component\Console\Application->doRunCommand() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:356
 Symfony\Component\Console\Application->doRun() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:195
 Symfony\Component\Console\Application->run() at /usr/local/www/nextcloud-test/lib/private/Console/Application.php:210
 OC\Console\Application->run() at /usr/local/www/nextcloud-test/console.php:92
 require_once() at /usr/local/www/nextcloud-test/occ:15

In SimpleContainer.php line 140:

  [OC\AppFramework\Utility\QueryNotFoundException]
  Could not resolve OCA\Polls\Db\V11\TableManager! Class "OCA\Polls\Db\V11\TableManager" does not exist


Exception trace:
  at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:140
 OC\AppFramework\Utility\SimpleContainer->resolve() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:160
 OC\AppFramework\Utility\SimpleContainer->query() at /usr/local/www/nextcloud-test/lib/private/ServerContainer.php:150
 OC\ServerContainer->query() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:96
 OC\AppFramework\Utility\SimpleContainer->{closure:OC\AppFramework\Utility\SimpleContainer::buildClassConstructorParameters():83}() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:83
 OC\AppFramework\Utility\SimpleContainer->buildClassConstructorParameters() at /usr/local/www/nextcloud-test/lib/private/AppFramework/Utility/SimpleContainer.php:72
 OC\AppFramework\Utility\SimpleContainer->{closure:OC\AppFramework\Utility\SimpleContainer::buildClass():70}() at n/a:n/a
 get_object_vars() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:254
 OC\Log\ExceptionSerializer->encodeArg() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:237
 OC\Log\ExceptionSerializer->{closure:OC\Log\ExceptionSerializer::encodeTrace():235}() at n/a:n/a
 array_map() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:235
 OC\Log\ExceptionSerializer->encodeTrace() at /usr/local/www/nextcloud-test/lib/private/Log/ExceptionSerializer.php:286
 OC\Log\ExceptionSerializer->serializeException() at /usr/local/www/nextcloud-test/lib/private/Log.php:350
 OC\Log->logException() at /usr/local/www/nextcloud-test/lib/private/Log/PsrLoggerAdapter.php:163
 OC\Log\PsrLoggerAdapter->log() at /usr/local/www/nextcloud-test/lib/private/Log/PsrLoggerAdapter.php:108
 OC\Log\PsrLoggerAdapter->warning() at /usr/local/www/nextcloud-test/lib/private/DB/SchemaChecker.php:185
 OC\DB\SchemaChecker->applyDisabledMigrations() at /usr/local/www/nextcloud-test/lib/private/DB/SchemaChecker.php:66
 OC\DB\SchemaChecker->getFindings() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:255
 OC\Core\Command\Upgrade->checkSchema() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:246
 OC\Core\Command\Upgrade->postUpgradeCheck() at /usr/local/www/nextcloud-test/core/Command/Upgrade.php:200
 OC\Core\Command\Upgrade->execute() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Command/Command.php:341
 Symfony\Component\Console\Command\Command->run() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:1094
 Symfony\Component\Console\Application->doRunCommand() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:356
 Symfony\Component\Console\Application->doRun() at /usr/local/www/nextcloud-test/3rdparty/symfony/console/Application.php:195
 Symfony\Component\Console\Application->run() at /usr/local/www/nextcloud-test/lib/private/Console/Application.php:210
 OC\Console\Application->run() at /usr/local/www/nextcloud-test/console.php:92
 require_once() at /usr/local/www/nextcloud-test/occ:15

upgrade


"occ upgrade" failed - return code: 1

After that I can just manually disable the maintenance mode and login. I need to check a bit more, however the logs are not expected and probably a bad user experience. No idea how it looks with a web-based update.

Steps to reproduce
  1. Run current NC 35.0.1
  2. use updater/updater.phar from command line to install NC 35.0.2 RC
  3. Update runs through except for an error
Expected behavior

Update runs through without errors. If there are problems with one app and the table, best case would be a warning and the related app being disabled.

Nextcloud Server version

35

Operating system

Other

PHP engine version

PHP 8.4

Web server

Nginx

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.aspekte.net",
            "[2a01:4f8:160:329a::237]"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.aspekte.net",
        "overwriteprotocol": "https",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "35.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "updater.release.channel": "beta",
        "loglevel": 3,
        "log_rotate_size": 10485760,
        "maintenance": false,
        "allow_user_to_change_display_name": true,
        "theme": "",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 1
        },
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpdebug": false,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "maintenance_window_start": 1,
        "allow_local_remote_servers": true,
        "debug": false,
        "mail_sendmailmode": "pipe"
    }
}
List of activated Apps
- activity: 8.0.0
  - app_api: 35.0.0
  - appstore: 2.0.0
  - calendar: 6.6.2
  - checksum: 2.1.2
  - circles: 35.0.0
  - cloud_federation_api: 2.0.0
  - comments: 2.0.0
  - contacts: 8.9.1
  - contactsinteraction: 2.0.0
  - dashboard: 8.0.0
  - dav: 2.0.0
  - deck: 1.19.0
  - end_to_end_encryption: 2.5.0
  - federatedfilesharing: 2.0.0
  - federation: 2.0.0
  - files: 3.0.0
  - files_accesscontrol: 6.0.0
  - files_automatedtagging: 6.0.0
  - files_downloadlimit: 5.3.0
  - files_lock: 35.0.0
  - files_pdfviewer: 8.0.0
  - files_reminders: 2.0.0
  - files_sharing: 2.0.0
  - files_trashbin: 2.0.0
  - firstrunwizard: 8.0.0
  - forms: 5.4.0
  - integration_discourse: 3.3.0
  - logreader: 8.0.0
  - lookup_server_connector: 2.0.0
  - mail: 5.12.4
  - maps: 1.8.0
  - nextcloud_announcements: 7.0.0
  - notifications: 8.0.1
  - notify_push: 1.4.1
  - oauth2: 2.0.0
  - office: 1.1.0
  - password_policy: 7.0.0
  - photos: 8.0.0
  - privacy: 7.0.0
  - profile: 2.0.0
  - provisioning_api: 2.0.0
  - recommendations: 8.0.0
  - related_resources: 6.0.0
  - serverinfo: 7.0.0
  - settings: 2.0.0
  - sharebymail: 2.0.0
  - sharing: 1.0.4
  - systemtags: 2.0.0
  - text: 9.0.1
  - theming: 3.0.0
  - twofactor_backupcodes: 2.0.0
  - twofactor_nextcloud_notification: 9.0.0
  - twofactor_totp: 17.1.0
  - twofactor_webauthn: 2.7.1
  - updatenotification: 2.0.0
  - user_status: 2.0.0
  - viewer: 8.0.0
  - weather_status: 2.0.0
  - webhook_listeners: 2.0.0
  - workflowengine: 3.0.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
CLI output provided in the description
Additional info

No response

主要言語
JavaScript
スター
285
フォーク
91
平均マージ
5日 16時間
マージ済み PR(30日)
52

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/polls のほかの issue

nextcloud/polls の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。