nextcloud / nextcloud/server

[Bug]: Getting a Database error after Manually Updating to Nextcloud 35.0.0

Open
#64,505 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 35-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ 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

I manually updated Nextcloud from Version 34.0.4 to Version 35.0.0
Manually means I rename the old Nextcloud directory, unzip the new Nextcloud Zip file and copy over the config.php file. Then restart Apache

However, I get the following error:

On the settings/admin/serverinfo#database page (See attached Image)

Tables scanning sequentially
Notice ·
pg.tables_without_index_use
Failing

Some tables have many sequential scans and no index scans, suggesting a missing index.

1 table(s) have > 1M sequential scans without any index scans.

    oc_preferences

Add appropriate indexes to the affected tables (pg_stat_user_tables shows the full scan statistics).

On the server, after running "occ upgrade"

Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
The database schema does not match what is expected for the installed version:
  - missing table 'oc_federated_invites'
  - unexpected table 'oc_talk_sessions'
  - unexpected table 'oc_talk_rooms'
  - unexpected table 'oc_mail_messages'
  - unexpected table 'oc_talk_retry_ocm'
  - unexpected table 'oc_talk_reminders'
  - unexpected table 'oc_mail_message_tags'
  - unexpected table 'oc_talk_attachments'
  - unexpected table 'oc_talk_attendees'
  - unexpected table 'oc_talk_proxy_messages'
  - unexpected table 'oc_talk_bans'
  - unexpected table 'oc_mail_mailboxes'
  - unexpected table 'oc_talk_bots_conversation'
  - unexpected table 'oc_mail_accounts'
  - unexpected table 'oc_talk_bots_server'
  - unexpected table 'oc_talk_bridges'
  - unexpected table 'oc_mail_smime_certificates'
  - unexpected table 'oc_talk_commands'
  - unexpected table 'oc_mail_internal_address'
  - unexpected table 'oc_talk_polls'
  - unexpected table 'oc_talk_consent'
  - unexpected table 'oc_talk_poll_votes'
  - unexpected table 'oc_talk_internalsignaling'
  - unexpected table 'oc_talk_phone_numbers'
  - unexpected table 'oc_talk_invitations'
  - unexpected table 'oc_mail_attachments'
  - unexpected table 'oc_mail_coll_addresses'
  - unexpected table 'oc_mail_blocks_shares'
  - unexpected table 'oc_mail_recipients'
  - unexpected table 'oc_mail_text_blocks'
  - unexpected table 'oc_ex_translation_q'
  - unexpected table 'oc_ex_translation'
  - unexpected table 'oc_mail_tags'
  - unexpected table 'oc_ex_text_processing_q'
  - unexpected table 'oc_ex_text_processing'
  - unexpected table 'oc_mail_provisionings'
  - unexpected table 'oc_ex_speech_to_text_q'
  - unexpected table 'oc_mail_aliases'
  - unexpected table 'oc_mail_actions'
  - unexpected table 'oc_ex_speech_to_text'
  - unexpected table 'oc_ex_event_handlers'
  - unexpected table 'oc_richdocuments_assets'
  - unexpected table 'oc_mail_local_messages'
  - unexpected table 'oc_richdocuments_direct'
  - unexpected table 'oc_mail_action_step'
  - unexpected table 'oc_richdocuments_template'
  - unexpected table 'oc_notes_meta'
  - unexpected table 'oc_calendar_appt_bookings'
  - unexpected table 'oc_mail_trusted_senders'
  - unexpected table 'oc_richdocuments_wopi'
  - unexpected table 'oc_mail_messages_snoozed'
  - unexpected table 'oc_calendar_appt_configs'
  - unexpected table 'oc_mail_messages_retention'
  - oc_filecache: unexpected index 'fs_storage_path_prefix'
  - oc_activity: missing index 'activity_object'
  - oc_share_external: column 'id' differs in: autoincrement
  - oc_text_steps: unexpected index 'text_steps_doc_id_id_index'
Run "occ db:schema:check -v" for details.
Steps to reproduce

Upgrade Nextcloud Server from Version 34.0.4 to Version 35.0.0

Expected behavior

No errors in the logs when running "occ upgrade

Nextcloud Server version

35

Operating system

Other

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

None

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": [
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "35.0.0.10",
        "overwrite.cli.url": "",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/nextcloud",
        "default_phone_region": "CA",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379",
            "user": "default",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "theme": "",
        "loglevel": 3,
        "maintenance_window_start": 7
    }
}
List of activated Apps
Enabled:
  - activity: 8.0.0
  - app_api: 35.0.0
  - appstore: 2.0.0-dev.0
  - bruteforcesettings: 8.0.0
  - circles: 35.0.0
  - cloud_federation_api: 2.0.0-dev.0
  - comments: 2.0.0-dev.0
  - contactsinteraction: 2.0.0-dev.0
  - dashboard: 8.0.0-dev.0
  - dav: 2.0.0-dev.1
  - federatedfilesharing: 2.0.0-dev.1
  - federation: 2.0.0-dev.0
  - files: 3.0.0-dev.0
  - files_downloadlimit: 5.3.0
  - files_lock: 35.0.0
  - files_pdfviewer: 8.0.0
  - files_reminders: 2.0.0-dev.0
  - files_sharing: 2.0.0-dev.1
  - files_trashbin: 2.0.0-dev.0
  - files_versions: 2.0.0-dev.0
  - firstrunwizard: 8.0.0
  - logreader: 8.0.0
  - lookup_server_connector: 2.0.0-dev.0
  - nextcloud_announcements: 7.0.0
  - notifications: 8.0.0
  - oauth2: 2.0.0-dev.0
  - office: 1.1.0
  - password_policy: 7.0.0
  - photos: 8.0.0
  - privacy: 7.0.0
  - profile: 2.0.0-dev.0
  - provisioning_api: 2.0.0-dev.0
  - recommendations: 8.0.0
  - related_resources: 6.0.0
  - serverinfo: 7.0.0
  - settings: 2.0.0-dev.0
  - sharebymail: 2.0.0-dev.0
  - sharing: 1.0.4
  - support: 7.0.0
  - survey_client: 7.0.0
  - systemtags: 2.0.0-dev.0
  - text: 9.0.0
  - theming: 3.0.0-dev.0
  - twofactor_backupcodes: 2.0.0-dev.0
  - twofactor_totp: 17.1.0
  - updatenotification: 2.0.0-dev.0
  - user_ldap: 2.0.0-dev.0
  - user_status: 2.0.0-dev.0
  - viewer: 8.0.0
  - weather_status: 2.0.0-dev.0
  - webhook_listeners: 2.0.0-dev.0
  - workflowengine: 3.0.0-dev.0
Disabled:
  - admin_audit: 2.0.0-dev.0
  - encryption: 3.0.0-dev.0
  - files_external: 2.0.0-dev.0
  - suspicious_login: 13.0.0
  - twofactor_nextcloud_notification: 9.0.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs

Additional info
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the upgrade from Nextcloud 34.0.4 to 35.0.0 and run occ db:schema:check -v, then compare its findings with the occ upgrade output and the admin/serverinfo#database report. Done means the upgrade completes without schema mismatch errors and the reported missing or unexpected tables and indexes are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, php, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.