Mimetype Warning after upgrading to 28.0.9 or 29.0.5

Oh, I hadn’t thought of that, but yes, of course Nextcloud doesn’t like it when you change any core files. Well, in that case, I guess we only get to choose whether we want to go with a red or yellow message in the overview until an official update with the fix is released :wink:

In case anyone that already applied the patch wants to revert it…

Download the patch again…

Nextcloud 28.0.9:

wget https://github.com/nextcloud/server/pull/47377.patch    

Nextcloud 29.0.5:

wget https://github.com/nextcloud/server/pull/47378.patch

…and then revert it with the following command:

Nextcloud 28.0.9:

patch -R -p 1 < 47377.patch

Nextcloud 29.0.5:

patch -R -p 1 < 47378.patch

:warning: Don’t forget to delete the .patch file if you downloaded it into the nextcloud folder, or you’ll get an integrity check warning because of the extra file :wink:

6 Likes

Thanke you so much, it’s right.

Thank you it works on my machine great work :+1:

1 Like

same here 29.05, STABLE channel

1 Like

Installed. Rolled back. :smile: Better with a yellow error than with a red one. Waiting for an update.

3 Likes

Works, thanks!

So… I get this error too and can’t fix it. I made the mistake to run a Nextcloud update. Luckily, this is just a test installation. I stopped updating my main instance last year. I just reinstall the damn thing every six months. It’s less frustrating than struggling with every single update. I wonder if Nextcloud will ever get their **** together so we can safely run updates that don’t result in errors.

I’ve run sudo -u www-data php occ maintenance:repair --include-expensive as directed but it’s not fixing it.

look on bb77 post some steps higher. Thats your soluten :wink:

It’s asking me “File to patch:” and I don’t know what to do :frowning:

Never mind. This is just a yellow warning on a test instance, I can live with it. I’m not touching my main instance :slight_smile:

Thanks!

The patch command has to be executed in the Nextcloud folder. In case you did download the file to a different location, you need to provide the path to the .patch file in the command.

So let’s say you just logged in via SSH to your server with a normal unprivileged user, i.e. you’re in your unprivileged user’s home folder, you could do it like that…

wget https://github.com/nextcloud/server/pull/4737X.patch
sudo -i
cd /path/to/nextcloud
patch -R -p 1 < /home/<yourusername>/4737X.patch

I have decided not to patch my main instance, because of this.

And yes, I have already upgraded my main instance to 29.0.5, which means I also have that yellow warning on my main instance. That’s not that big of a deal, but an official signed hotfix release, would still be a nice thing to have :wink:

Yes, I was definitely in my /var/www/cloud directory. Not sure what I did wrong, I tried both sudo and sudo -u www-data, but it just resulted in more errors and questions. So, yeah, I’m OK now, don’t want to mess with this any more. Like I said before, not touching my main instance and it’s running well on 29.0.3. I’ll hold off until final 30 is out and then try that. Thanks for trying to help me :slight_smile:

But did you also execute the wget command from your /var/www/cloud directory? If so, I’m not sure what went wrong.

Yeah, it probably won’t hurt, but it probably wouldn’t hurt to upgrade and just not patch this bug either, except of course for the broken mimetype check that gives a yellow warning :wink:

Works like a charm.
Thank you.

I built a test server and installed [Nextcloud Hub 9](30.0.0 RC2). The error was present as well. But after running the command “sudo -u www-data php occ maintenance:repair --include-expensive” the error disappeared. In the working version (Nextcloud Hub 8) such a trick does not work.

This is not an error message, it’s a warning that one or more mimetype migrations are available and that you should perform the migration manually. The message also explains why you need to do it manually. So running the occ command from this warning is not a ‘trick’, and on Nextcloud 30 it works exactly as intended.

Unfortunately, the backports to NC28 and NC29 were buggy, so the warning is always shown in the overview.

But again, just to make that clear, the message per se, and the need to run the occ command when mimetype migrations are available, at least from NC30 and onwards, is not a bug or an error.

1 Like

Yes. And the 29.0.5 image is having this issue.

Ah, OK.

But now that I think about it again, it probably wouldn’t have made any difference if it was released later anyway, because afaik Nextcloud only releases officially signed builds, and you can’t really build and sign the core yourself, i.e. the maintainers of the Docker image couldn’t have patched the bug out without getting an integrity check error.

So I guess we’ll all have to wait until 29.0.6, and until then we can either ignore the mimetypes warning or patch it manually. However, manually patching will cause the integrity check to fail, resulting in a red error message in the webui.

See also here.

2 Likes

this did the trick! thanks.

1 Like

I can also insert this string into nextcloud’s config.php file

'integrity.check.disabled' => true,

Yes, you can disable the integrity check, but that’s just a cosmetic thing, and also a risky one, because if any files have been unintentionally or even maliciously modified, you’d want Nextcloud to warn you about it.

What would be much more interesting to know, and I’m not enough of a coder to check this myself, is what the actual effect of this bug is.

Are mimetype migrations even a thing in 28 and 29, and if so, does the occ command work and the bug just causes the warning to not go away, or is the patch required for the occ command to be effective?

If the latter is the case, it might make sense to patch the bug. If the former is the case, i.e. if this is just a cosmetic issue, I don’t think it’s worth doing any of the things we talked about in this thread.