Mimetype Warning after upgrading to 28.0.9 or 29.0.5

After upgrading to the versions mentioned above, i get the warning …

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.

If i run “occ maintenance:repair --include-expensive”, it finishes without any error, but the warning remains.

Tested on (bare metal install) 2 instances with 28.0.9 and 2 instances with 29.0.5 …

Any hints?

13 Likes

Same problem, upgrading from 2 instances with 28.0.8->28.0.9 and 1 instance with 29.0.4->29.0.5. No error reported by “occ maintenance:repair --include-expensive” done with maintenance:mode on and off … and the warning still remains …

4 Likes

We seem be a lot of users with this problem:, also here investigating [Bug]: One or more mimetype migrations are available · Issue #47359 · nextcloud/server · GitHub

A lot of people post the issue here also RC1s of 28.0.9 and 29.0.5

7 Likes

Just upgraded to 29.0.5 and get the same message. repair step does not resolve the issue.

4 Likes

same issue. updated from 29.0.4 to 29.0.5 and now the error is appeared.
occ maintenance:repair --include-expensive won’t helped.

2 Likes

Same issue here on 2 different servers, Debian 11 and 12, upgrade to 29.0.5 from 29.0.4.

Same. 28.0.9 to 29.0.5 on Ubuntu 22.04, and running the maintenence:repair drill did nothing, cli core check comes back with no errors.

1 Like

Same here udate from 29.0.4 to 0.5 also with perm warning even after suggested repair steps.

1 Like

Same, 29.0.4 to 29.0.5 on Linux mint xfce 21.3

I also had a nextcloud.log error that I fixed by doing the following:

sudo -u www-data php occ maintenance:mode --on
rm ./nextcloud.log && rm ./data/nextcloud.log
sudo -u www-data php occ integrity:check-core
sudo -u www-data php occ maintenance:mode --off

This is quite interesting since it’s a minor revision upgrade. However, the error message does not impact the service.

I’m having the same problem. Bare metal install on Debian 12.

Just coming here to say that I have the same issue when upgrading, and also installing nextcloud from the zip file is completely broken, I get internal server error after filling out the data directory and database connection details.

Please open a new thread, fill out the support template, and provide more details about how exactly you tried to set it up and on what platform. Broad statements like “completely broken” do not help anyone.

Regarding the actual topic of this thread, please upvote the issue on Github to let the developers know that you’re affected as well. Don’t spam the issue with “I’m affected too” comments, unless you can provide new information about the bug that may help the developers to fix it.

3 Likes

Hi.
Same situation, I do the same commands (adapted to my directory structure), but the warning stay here.

Maintenance mode enabled
nextcloud@cloud:/var/www/nextcloud$ ll /var/log/nextcloud/nextcloud.log
-rw-r----- 1 nextcloud nextcloud 80666496 Aug 21 09:37 ./log/nextcloud/nextcloud.log
nextcloud@cloud:/var/www/nextcloud$ rm /var/log/nextcloud/nextcloud.log
nextcloud@cloud:/var/www/nextcloud$ php occ integrity:check-core
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
nextcloud@cloud:/var/www/nextcloud$ php occ maintenance:mode --off
Maintenance mode disabled

Yeah I think, according to the amount of posts here and the reactions on GitHub, it’s pretty safe to say most or even all users are affected, and that this is a bug in 29.0.5 and as it looks like in 28.0.9 as well. The devs are investigating the issue, and I think the best thing we (non-developers) can do at the moment is to ignore the warning and wait for them to come up with a solution.

3 Likes

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

14 Likes

Great shot, and for those who updated to 28.0.9:

if (version_compare($mimeTypeVersion, '28.0.9.1 ', ‘<’) && $this->introduceExcalidrawType()) {

1 Like

:warning: Important Note: :warning:

As @rlitman pointed out here, changing any core files, like in this case the file RepairMimeTypes.php, will cause Nextcloud’s integrity check to generate a red warning in the WebUI. (This is also the case for the manual fix provided by @Tiger in this post, by the way.)

So it’s up to you whether you want to apply the patch or not, but I’d say It’s probably not worth the effort, and better to just ignore the mimetype warning for now until an official update is released.

If anyone has already applied the patch and would like to revert it, you can use the instructions here to do so.


Download and apply the patch

Navigate into your Nextcloud server’s root directory (the one that contains status.php file), and then download and apply the patch with the following commands as root or as the webserver user:

Nextcloud 28.0.9:

wget https://github.com/nextcloud/server/pull/47377.patch    
patch -p 1 < 47377.patch

Nextcloud 29.0.5:

wget https://github.com/nextcloud/server/pull/47378.patch
patch -p 1 < 47378.patch

Delete the .patch file!

Do not leave the .patch file in your Nextcloud folder and delete it after the patch has been successfully applied:

Nextcloud 28.0.9:

rm 47377.patch

Nextcloud 29.0.5:

rm 47378.patch

Of course, you could also download it outside your Nextcloud folder and then point to the file in the patch command, as described here, in which case you wouldn’t necessarily have to delete it afterwards, but that would have made it more difficult for me to write a short and universally applicable guide… :wink:

Documentation on how to apply patches:

https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html

Source for the download links:

https://github.com/nextcloud/server/issues/47359#issuecomment-2301479665

15 Likes

guess a docker installation did not have the path above ?

Have the Docker images for 29.0.5 and 28.0.9 already been released? If not, maybe that’s the reason why the file isn’t there?

Not a 100% sure, but afaik this check was developed for Nextcloud 30 and has now been backported to 28.0.9 and 29.0.5, i.e. it is not included in older versions than the ones mentioned.

1 Like

Note that this patch trades the error from this thread for a new error:

  • Some files have not passed the integrity check. [List of invalid files…]For more details see the documentation :arrow_upper_right:.

You can confirm the changes were limited to the correct file like this:

$ sudo -u www-data php occ integrity:check-core
  - INVALID_HASH:
    - lib/private/Repair/RepairMimeTypes.php:
      - expected: cbe37950a516bdaa081a318a5ea934c424c4fcd16d8690efdfa68a09241c553cdb41f3994a451dd20d69d15a6525f988e3fcb3668e8fb50f6f9afd60bc0aa9d1
      - current: 1e88dcb09eeb47ad50485ff0eeb6483ee36607c14c409595a690ecf12f7b30ae9309b801a732187596eb717e2fd55f77c0588e8e3696e4878787329a7b922412
3 Likes