Potential Botched Update 30.0.4?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.4snap1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04.5 LTS x86_64
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.25-1
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • NginX Proxy Manager v2.12.1 running as a docker container
  • PHP version (e.g, 8.3):
    • 8.1
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • 2 days ago on 12/18/24
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • snap and baremetal(?)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • not that i know of

Summary of the issue you are facing:

When I was trying to get some documents to sync between my computer and my phone I realized that this wasn’t working, and that when I looked at my nextcloud desktop client it said that both my accounts were offline and not syncing currently. I then looked at my management panel and it said that nextcloud was down. finally I thought oh I must just need to restart it so I ssh’d and ran the command “snap restart nextcloud” then when I looked back at the web address, I found that I was put into maintenance mode. At first maybe I thought I was interrupting an update, but I have a cronjob that does that at 3am every day so I don’t think it was that.

Steps to replicate it (hint: details matter!):

  1. restart nextcloud with “snap restart nextcloud”

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

Exception: Database error when running migration 0009Date20240116000000 for app duplicatefinder An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

Detailed logs 
Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

Repair info: All tables already have the correct collation -> nothing to do

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Updated database

Exception: Database error when running migration 0009Date20240116000000 for app duplicatefinder An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
    "system": {
        "apps_paths": [
            {
                "path": "\/snap\/nextcloud\/current\/htdocs\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/snap\/nextcloud\/current\/nextcloud\/extra-apps",
                "url": "\/extra-apps",
                "writable": true
            }
        ],
        "supportedDatabases": [
            "mysql"
        ],
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "log_type": "file",
        "logfile": "\/var\/snap\/nextcloud\/current\/logs\/nextcloud.log",
        "logfilemode": 416,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.4.1",
        "overwrite.cli.url": "https:\/\/nextcloud.pokeypen7.us",
        "versions_retention_obligation": "120, 240",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "trusted_domains": [
            "nextcloud.pokeypen7.us",
            "mcserver",
            "192.168.68.140",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "default_phone_region": "US",
        "loglevel": 2,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "app_install_overwrite": [
            "news"
        ],
        "theme": ""
    }
}

Apps

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:

  • activity: 3.0.0
  • admin_audit: 1.20.0
  • app_api: 4.0.3
  • bruteforcesettings: 3.0.0
  • cfg_share_links: 6.1.1
  • checksum: 1.2.5
  • circles: 30.0.0
  • cloud_federation_api: 1.13.0
  • comments: 1.20.1
  • contactsinteraction: 1.11.0
  • dashboard: 7.10.0
  • dav: 1.31.1
  • drawio: 3.0.3
  • duplicatefinder: 1.2.6
  • federatedfilesharing: 1.20.0
  • federation: 1.20.0
  • files: 2.2.0
  • files_accesscontrol: 1.20.1
  • files_downloadlimit: 3.0.0
  • files_pdfviewer: 3.0.0
  • files_reminders: 1.3.0
  • files_sharing: 1.22.0
  • files_trashbin: 1.20.1
  • files_versions: 1.23.0
  • files_zip: 2.1.0
  • fileslibreofficeedit: 2.0.1
  • firstrunwizard: 3.0.0
  • fulltextsearch: 30.0.0
  • fulltextsearch_elasticsearch: 30.0.0
  • impersonate: 1.17.0
  • integration_google: 3.1.0
  • login_notes: 1.6.1
  • logreader: 3.0.0
  • lookup_server_connector: 1.18.0
  • mail: 4.1.0
  • metadata: 0.21.0
  • news: 25.1.1
  • nextcloud_announcements: 2.0.0
  • notes: 4.11.0
  • notifications: 3.0.0
  • oauth2: 1.18.1
  • password_policy: 2.0.0
  • photos: 3.0.2
  • privacy: 2.0.0
  • provisioning_api: 1.20.0
  • qownnotesapi: 24.11.0
  • recommendations: 3.0.0
  • registration: 2.5.0
  • related_resources: 1.5.0
  • richdocuments: 8.5.3
  • richdocumentscode: 24.4.1002
  • serverinfo: 2.0.0
  • settings: 1.13.0
  • sharebymail: 1.20.0
  • support: 2.0.0
  • survey_client: 2.0.0
  • suspicious_login: 8.0.0
  • systemtags: 1.20.0
  • text: 4.1.0
  • theming: 2.5.0
  • thesearchpage: 1.2.8
  • twofactor_backupcodes: 1.19.0
  • twofactor_totp: 12.0.0-dev
  • user_status: 1.10.0
  • viewer: 3.0.0
  • weather_status: 1.10.0
  • webhook_listeners: 1.1.0-dev
  • workflowengine: 2.12.0
    Disabled:
  • encryption: 2.18.0
  • files_archive: 1.2.3 (installed 1.2.3)
  • files_external: 1.22.0
  • files_rightclick: 0.15.1 (installed 1.6.0)
  • twofactor_nextcloud_notification: 4.0.0
  • twofactor_reminder: 1.1.0 (installed 1.1.0)
  • user_ldap: 1.21.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Looks like the problem is with an app called duplicatefinder.

Perhaps disable it and the report to the maintainer (link on the app store entry).

4 Likes

Yes disabling the app fixed it, will be reporting to the maintainer thanks

thanks for that…

see also Broken App Duplicate Finder - NC Error 502

and

1 Like

Hi,

This is a problem that is going to come back again and again. Snap team seems to be clear on their stance. The software is tested as it is, without any additional apps. So sooner or later out of so many apps in the app store, something may break.

so unless more community members are willing to run PR-tests, we’re not going to catch 3rd party issues prior release

Snap is set for auto update itself by default. I guess, the main enjoyment of snap for me is in question. I have been using snap deployments for past few years and it’s been a flawless experience. Zero worry about anything after the initial easy few command setup.

But that seems to be no longer the case for me after this issue that I faced with Duplicate Finder.

I do understand that the human hours needed for testing workings of each app. That is a challenge beyond the small team working on snap.

But that raises the question on keeping auto update on by default?

Just purely for discussion purpose, I wonder how logical is it to put users in a sudden surprise of broken installation. Especially when many snap users aren’t technically sound enough to dig deep to recover.

Thanks.

2 Likes

see the documentation about snapd… You have full control!

manage if and how your Nextcloud snap is updated! See Snapcraft documentation

see FAQ’s

snap recovery is easy:

sudo snap revert nextcloud

with that command, you should be back up and running right at the moment before the update happened.

this is much more difficult with other install methods

3 Likes

Fair point. That’s an interesting dilemma. It could also be used as an argument to keep auto-update turned on by default though. :slight_smile:

Either path the requirement is probably the same: inform user (admin) so they can decide (i.e. either to disable the “by default auto-updates” or to enable the “by default disabled auto-updates”).

I don’t know if there’s a perfect answer here. :-/

Current default of “auto-update by default” may lead to broken installations, but they’re recoverable. And at least they won’t be insecure/compromised (which is a bigger problem then a broken installation due to an app IMO).

4 Likes

Just to throw this is as an idea:

Nextcloud AIO by default only sends update notifications to its users to update manually. However there is the option to enable automatic updates for all its components that comes as a sub-feature of its daily backup feature. This is so that people can still easily recover by restoring a backup if things should go wrong.

So the automatic update feature is opt-in compared to opt-out which is in my opinion the better way to handle this.

2 Likes

which is not something that the Nextcloud snap team can influence, since we simply package the Nextcloud in a snap

The Nextcloud snap team packages a stable default upstream Nextcloud, adds some snap magic, tests and releases that snap package. Since the Nextcloud snap team are neither upstream Nextcloud developers nor app developers, they need to ensure that the default Nextcloud snap does what it should. That entails packaging a stable default Nextcloud and testing fresh installs as well as automated updates, so that the Nextcloud snap community has peace of mind.

Some upstream changes may need more snap magic to ensure that it simply works, which requires careful configuration and testing. This will exclude any non default third party apps!

1 Like

Okay, I didnt know. Thanks for clarifying!

see Snapcraft documentation

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.