Integrity check error for core/js/mimetypelist.js since update to 22.2.5

Nextcloud version (eg, 20.0.5): 22.2.5.1
Operating system and version: Debian 11
Apache or nginx version: Apache/2.4.52 (Debian)
PHP version: 7.4.28

Since a recent update, probably from 22.2.2 to Nextcloud 22.2.5, the integriy check claims that core/js/mimetypelist.js has an invalid hash.

#sudo -u www-data php /var/www/nextcloud/occ integrity:check-core

  • INVALID_HASH:
    • core/js/mimetypelist.js:
      • expected: 23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb
      • current: 86c1f1b719b65bf02b1dca9b061ef310c8dfface25c9ccfa243c4090665fa6f305d8a4143d7410350af27b1d9e14968c7d999a965d1e110bc674d30ed5dee4e8

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. sudo -u www-data php /var/www/nextcloud/occ integrity:check-core

Please download the v22.2.5Nextcloud archive file, extract the mentioned file and replace the one on your server. Afterwards the check should succeed.

Thanks. Worked.

remove the file and download the latest version then it works,
here are the commands just adjust your installation directory if you have it somewhere else

sudo rm /var/www/nextcloud/core/js/mimetypelist.js
sudo wget https://raw.githubusercontent.com/nextcloud/server/master/core/js/mimetypelist.js -P /var/www/nextcloud/core/js

[core/js/mimetypelist.js] => Array
(
[expected] => 4b0a99fbab7bc4824176101150bd0ab2b553e128a390e0f872580db4541462b31aad13099fd41533b6695d1b185dabca26a45e9a78227cfb9479eafa439c7bff
[current] => a8e818876a7eff2a2137601eafc6c7d96b99cbf27d94ff9bb59eb237bdab92076ecc2828242bb37551c9c8b6772c0718887bd49cee5b49b3be48d3b9ecaa558f
)

Hi everybody, similar problem but my Nextcloud 26.0.2 ( Nextcloud AIO v6.0.0) is inside a docker and the command won’t work as it doesn’t find the path (and I don’t know how to get in there). Any help would be greatly appreciated! Thanks!

For AIO the following worked on mine. Basically just shorting the path down to just core/js/.

docker exec --user www-data nextcloud-aio-nextcloud rm core/js/mimetypelist.js

docker exec --user www-data nextcloud-aio-nextcloud wget https://raw.githubusercontent.com/nextcloud/server/master/core/js/mimetypelist.js -P core/js

Thanks powerstream, I did the first step (adding sudo) and it worked, while the second step:

OCI runtime exec failed: exec failed: unable to start container process: exec: “get”: executable file not found in $PATH: unknown

My bad, had a typo. It’s wget instead of get.

Also if you add docker to your sudo group, you shouldn’t have to use sudo for docker commands.

1 Like

No worries! Thanks for the help: commands worked but I still get the same error

Not 100% sure, but may need to also run

docker exec --user www-data nextcloud-aio-nextcloud php occ integrity:check-core

From nextcloud help docs

Rescans are triggered at installation, and by updates. You may run scans manually with the occ command.

Makes is sound like the admin page check doesn’t rescan.

1 Like

That did the trick!!! Thank you so much @powerstream !

docker exec --user www-data nextcloud-aio-nextcloud rm core/js/mimetypelist.js

docker exec --user www-data nextcloud-aio-nextcloud wget https://raw.githubusercontent.com/nextcloud/server/master/core/js/mimetypelist.js -P core/js

docker exec --user www-data nextcloud-aio-nextcloud php occ integrity:check-core

1 Like

Than you @drizzer
Yes, my error is gone by your help
I have updated my nextcloud 26 to 27.0

Kind regards
Davoud

1 Like