Mimetype Migration Issue After Updating to 29.0.5

Nextcloud version: 29.0.5
Method of install: Zip file manually set up with Apache and MySQL/MariaDB
OS: Debian 12

Today after updating to 29.0.5 I’m getting a notice on the admin overview page that says:

One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.

I ran the command specified and got all green output; no apparent errors with anything, and the notification still appears on the overview page. I tried putting Nextcloud into maintenance mode, running it, then taking it back out of maintenance mode and the message is still there. I do notice when running the command it hangs on “Repair mimetypes” for about 5 seconds, but then continues with no errors or anything reported. The output of the command is below:

 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Repair step already executed
 - Add preview cleanup background jobs
 - Migrate oauth2_clients table to nextcloud schema
     - Update the oauth2_access_tokens table schema.
     - Update the oauth2_clients table schema.
     - Delete clients (and their related access tokens) with the redirect_uri starting with oc:// or ending with *
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - JS cache cleared
 - Clear every generated avatar
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Add job to cleanup the bruteforce entries
 - Queue a one-time job to check for user uploaded certificates
 - Repair DAV shares
 - Add background job to set the lookup server share state for users
 - Add token cleanup job
 - Clean up abandoned apps
 - Add possibly missing system config
 - Add AI tasks cleanup job
 - Queue a job to generate metadata
 - migrate lazy config values
 - Cache logo dimension to fix size in emails on Outlook
     - Theming is not used to provide a logo
 - Remove shares of old group memberships
 - Repair mime types
 - Validate the phone number and store it in a known format for search
 - Handle outdated scheduling events
     - Cleaning up old scheduling events
 - Upgrading Circles App
 - Fix component of birthday calendars
     - 5 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Repair step already executed
 - Fix broken values of calendar objects

 - Registering building of calendar search index as background job
     - Repair step already executed
 - Register building of social profile search index as background job
     - Repair step already executed
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Repair step already executed
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Clean up old calendar subscriptions from deleted users that were not cleaned-up

     - 0 calendar subscriptions without an user have been cleaned up
 - Remove invalid object properties
     - 0 invalid object properties removed.
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Remove any playlist files mistakenly added to music_tracks table
 - Combine multi-disk albums and store disk numbers per track
 - Register Music background jobs and remove legacy registrations
 - Set creation and update dates for the library entities without one
 - Clean up meta table
 - Show a hint about the new editor to existing users
 - Update OAuth token expiration times
 - init metadata
 - Create help command
 - Invalidate access cache for projects conversation provider
     - Invalidation not required
 - Cache the user display names
 - Switches from default updater server to the customer one if a valid subscription is available
     - Repair step already executed
 - Send an admin notification if monthly report is disabled
 - Force-reset all Text document sessions
 - Initialize migration of background images from dashboard to theming app
 - Add background job to check for backup codes
 - Populating added database structures for workflows
2 Likes

I believe the command supplied may have been insufficient. I did some reading online and came across the command:

sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache

This operation seems to be taking quite a while to run and has produced some output.

So, I’ll let this run, then if the message still appears I will try re-running the command it told me to run after this operation has had a chance to add the various different mimetypes to the database.

1 Like

Just wanted to state that the message still persists; that second command didn’t resolve whatever it’s complaining about.

1 Like

This seems to be a bug that affects many, if not all users.

See also here…

https://help.nextcloud.com/t/warning-after-upgrading-to-28-0-9-or-29-0-5/201289

…and and here:

https://github.com/nextcloud/server/issues/47359

1 Like

Thanks, :slightly_smiling_face: At least it’s nice to know I’m not alone.

1 Like

solved by commit:

https://github.com/nextcloud/server/pull/47378/commits/9be51b38e3c1c6df19e550d68c230932062cad18

edit file
in folder nextcloud

/lib/private/Repair/RepairMimeTypes.php

find line

if (version_compare($mimeTypeVersion, '30.0.0.0', '<') && $this->introduceExcalidrawType()) {

edit then

if (version_compare($mimeTypeVersion, '29.0.5.0', '<') && $this->introduceExcalidrawType()) {

finish

2 Likes

…or you could use Nextcloud’s integrated patch mechanism, instead of editing the file manually. See my post here on how to apply the patch.

2 Likes

I am always a bit hesitant to update, because in the past there has been quite a few incidents like this. So far not anything serious that was not easily fixable, but perhaps that’s just a question of time.

Using the stable branch imho should mean that it’s stable and thoroughly tested. This is not stable IMO.

4 Likes

Yes, and in this case you don’t even necessarily have to fix it, but you will of course have a yellow warning in the overview. :wink:

I have to agree, even though I’m someone who usually defends the Nextcloud developers here on the forums. But to be honest, when things like this keep happening, which in my opinion could easily be avoided by not backporting new features to older releases, I start to have questions too.

I understand that we cannot get an absolutely stable Enterprise LTS experience for free. But I also think that minor upgrades shouldn’t have any breaking changes, and in this case it didn’t even help to stay on an older major release, as the feature was also backported to 28.

In my opinion, backporting features is a bad practice and should stop, otherwise they might as well drop the semantic version numbers and just switch to a rolling release model, which it already partly is anyway if they keep backporting new features to older versions :wink:

1 Like

Mine solved with this. Thanks a lot

I have the same issue - please tell me - newbie - the commands I need to input in order to fix this. Thanks. Rob

As I said in the other thread, it’s safe to ignore this warning until the next maintenance release, which I strongly recommend you do, because patching this has further implications, as manually patching will cause Nextcloud’s integrity check to fail, which will cause an error message on its own.

This second error could be suppressed by disabling the integrity check, but besides being a workaround for a workaround, just to get a green checkmark in the overview, which is purely cosmetic in this context, disabling the integrity check also has security implications.

Also, the commands look exactly as I posted them in the other thread, the only thing missing is the location of the Nextcloud folder, which we cannot know without knowing exactly how you installed and configured your instance.

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