Code integrity check - cannot be solved

Hello everyone

The following message is permanently displayed as a light blue banner: “Problems occurred during the code integrity check. More information…”. That’s very disturbing. I can’t solve the problem. I would therefore like to hide this message permanently. How can I do that?

I copied the error text below. I uploaded the four “INVALID_HASH” files again - without result. And I need the “EXTRA_FILE” directory for the SSL certificate. Now I have this stupid message all the time, although the problem cannot be solved.

Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • core/doc/admin/_static/img/note_pencil.svg
      • core/doc/admin/_static/img/warning.svg
      • core/fonts/LICENSE.txt
      • core/vendor/jsTimezoneDetect/jstz.js
    • EXTRA_FILE
      • .well-known/acme-challenge/RZSlVLRb1UnmZIOKZfWvvgxSv18x_-eLkO3jCIaqBGA

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/doc/admin/_static/img/note_pencil.svg] => Array
(
[expected] => 78b9df57afe9468145e6e375cd1f61274b269b9c3019726a99e043ae952367acf53cf471cbc5b3dcca2e68367c2c4422d4a9f9a9fdbb11f9b962845ac77857de
[current] => 97117ce2827cc1b742678b52fc100de1e7d3fdb1adeea04a301c012e7f95b66e10a369c6a83ba89a707c4232b5e31fba3d5e58b0e0d970f22031d0704eebb5a9
)

                [core/doc/admin/_static/img/warning.svg] => Array
                    (
                        [expected] => e8647b47ef1531b8c2fcdd51f76996fe85476467fc694540f3dcf8ce7e7da489e99edae5a158742da71c07dc09ccfaf721f01c1c4bda3f5bae9b711981b71a1b
                        [current] => 85687f19cf204716e9b1c608682aa22c045b6f8284a3496db07f13200952491bfea54deee7ef11115c0dedfd87443c7022ef05792892a8a984866752c8ec5726
                    )

                [core/fonts/LICENSE.txt] => Array
                    (
                        [expected] => 4cc5a12bfe984c0a50bf7943e2d70a948d520ef423677c77629707aace3a95aa378d205de929105d644680679e70ef2449479b360ad44896b75bafed66613272
                        [current] => 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8
                    )

                [core/vendor/jsTimezoneDetect/jstz.js] => Array
                    (
                        [expected] => ece74dd6f5fc9587cf167dd17df51b66f70bd711f445da8d1d21bb1b0570f3c97b25d3ece110b08e2f2b294369d9b775cc169b666840a5b769ba338aa6d73d48
                        [current] => beae737d18aae6e8c5fdfb0bf3389b687ec746e6b334185710cc5b8f45b73b3c57442db541807ab440b55517ef2d138f4c40148abafcb6462481016b617e1f53
                    )

            )

        [EXTRA_FILE] => Array
            (
                [.well-known/acme-challenge/RZSlVLRb1UnmZIOKZfWvvgxSv18x_-eLkO3jCIaqBGA] => Array
                    (
                        [expected] => 
                        [current] => a10d1b13e884f4197afd4888eff4843909018b6f3db1cfb64c1bc3d2cbfd66b928b5a43e4621f00ef5fb3ed7f0a5c6a1ab6fe6ba7e2d2a4b2eff30c2cf5e1495
                    )

            )

    )

)

Hi,

Does the cronjob run regularly? If you re-uploaded the files that are reported to have a bad hash value, this is really strange. Maybe uploading the files in “BIT mode” (instead of - just as an example - ASCII mode) might help.

Regarding the extra folder: I also have an additional file in my folder and I remove this file temporarily, do a rescan on the admin page and then move that file back in. The message on the admin page is gone then and never returns (at least not until the next update). I suggest you try that as well. First of all fix the Hash issue with the other files. If that was successful, temporarily move the .well-known folder elsewhere, hit the rescan button/ link on the admin page and if the error messages are all gone, move your folder back in.

Thanks for the quick answer.
I tried to upload the files in binary mode - unsuccessfully.

What do you mean by “Does the cronjob run regularly?”? As a background task I had previously set Ajax. I’ve set it to cron now. Is that better? Do I have to make any other settings in this respect? I’m afraid I don’t know enough about this matter. But I would like to have a clean and safe system.

The extra file isn’t a big deal, you can remove the folder - but you have to do that every time you update lets-encrypt.

The fact that other files are not the same is absolutely a problem, you have to try to re-upload the ones mentioned in the report until they are all good, otherwise you can be sure that you will encounter all kinds of problems. You shouldn’t hide this but fix it :smiley:

Don’t re-upload all files, just these. And try to get a new zipfile from the website and check it, too - you can use md5sum for that.

1 Like

Yes, cron is better and the preferred/ suggested method.
If you select “cron” in the admin section, you need to setup a cron job via commandline for the web server user.

As an example (please adapt to your environment):

crontab -e -u www-data

Enter:

*/15  *  *  *  * php -f /var/www/nextcloud/cron.php > /dev/null 2>&1

And @jospoortvliet had a great idea: try the zip archive and extract the necessary files from the archive into the correct folders.

I’m a little overwhelmed right now. Can you describe this in more detail? Where do I have to write this?

How do I set up a cron job from the command line for the web server user? And where is the web server user?

Okay, sorry!

Please execute the following command to see you web server user:

ps -ef | grep -E "apache|nginx" | grep -v root | awk '{print $1}' | sort | uniq

Now you have the user which is running your web server. For this user you need to create a cron job. To create a cron job in general (for your current user you are logged in with) you run:

 crontab -e

The switch -e just means, that you edit the cron file (some file “somewhere” in the depths of your system :smiley: ).
This command (crontab -e) opens the text editor and you can enter job definitions and save your changes. As soon as you saved your changes, these jobs will be executed by the defined times.

For a different user however, you use the -u <username> switch.

So it’s:

crontab -e -u <output from command above>

Here you could enter the actual job definition. Just enter

*/15  *  *  *  * php -f /var/www/nextcloud/cron.php > /dev/null 2>&1

and save your changes.


If that was still too much or not comprehensible, just execute the following command (please use copy and paste!), it will open the text editor for the right user for you:

crontab -e -u `ps -ef | grep -E "apache|nginx" | grep -v root | awk '{print $1}' | sort | uniq`

Here you still have to enter the job and save the changes afterwards:

*/15  *  *  *  * php -f /var/www/nextcloud/cron.php > /dev/null 2>&1

Please let me know if I should clarify anything of that more detailed.

Thank you very much for the detailed description!
But I fail already at the beginning: Where should I enter the text line
“crontab -e -u ps -ef | grep -E "apache|nginx" | grep -v root | awk '{print $1}' | sort | uniq” ?

The command line, meaning you have to access the server via SSH. I hope that is possible.

I can only access via FTP (Filezilla). It is also not my own server but hosted (Hosteurope).

That’s a good information to put into the problem description :wink:

I see following options:

  • switch back to ajax
  • ask your hoster if and how you can configure cronjobs for your web server user

Furthermore you would need to check what’s causing the difference in the files. If you upload the files freshly (from the correct Nextcloud archive) they shouldn’t have a wrong hash.
I’m really confused however, why only these three files return a wrong hash value and not more files.
Did you make changes to the configurations of your FTP client?

What is your Nextcloud version by the way? Where did you download the Nextcloud archive from?

I’ve switched to Ajax for now. What about Webcron? Is it as complicated to set up as Cron?

I have downloaded the Nextcloud archive again (source: https://nextcloud.com/install/). The four files are still not accepted. I have determined the checksums (SHA512). They all agree with the “expected” hash in the “Technical Information” (top line).
If my English is good enough, that means the files are fine - right? Then why aren’t they accepted?!

Addendum: My Nextcloud version is 13.0.1

This sounds very good!
Now when you go to the admin page again (where you read the message “Problems occurred during the code integrity check. More information…”) there should be a small (hardly to see) button rescan. Please hit that button!

You will see a little circle indicating the rescan being in progress.
If you still see the warning, click “More information” again and see if something changed and maybe other files are mentioned now.

For me (German version) these are not buttons but clickable text (in the red text line). I did it regularly. I just did it again right now:

  1. Clicked on “Analyz again.”
  2. Clicked on "List of invalid files"
    The four files are still not accepted, and they are the same four files.

This is the cause of your problem by the way. FileZilla by default transfers files in ASCII mode. Set it to binary (see: https://www.templatemonster.com/help/how-to-set-binary-transfer-mode-in-filezilla-totalcommander-and-cuteftp.html ) and re-upload the files.

Thank you!
As you can see above, I also tried to upload the files using the binary transfer type. Unfortunately, that didn’t work either. But I will repeat it with the files of the new Nextcloud archive.

U P D A T E :
Quite unexpectedly, two of the four files have now been accepted. But two svg files are still not accepted:

  • core/doc/user/_static/img/note_pencil.svg
  • core/doc/user/_static/img/warning.svg

The problem is solved.
The two files seem to be exactly the same in two directories (admin and user). At some point the error display changed from “admin” to “user”. Since everything else was the same, I didn’t notice. Evil trap!
Next, I moved the additional directory somewhere else, ran a new scan and moved the directory back. Now there is no more error message. Many thanks to everyone who helped me :slightly_smiling_face:

Should one generally copy the entire Nextcloud archive to the server in binary mode in the future? And because this is my first Nextcloud I am interested in another question: How is an update done?

1 Like

Hi,

Good news there are no more warnings! :+1:

I would always suggest using the binary mode. At work and privately I never had issues in binary mode, but sure had issues in ASCII mode.

For updates just use the web updater (in the admin section right below the integrity check). The updater will download the new archive automatically, unpack and replace the old files with the new ones automatically.
Ones your Nextcloud instance successfully works, it shouldn’t be necessary to access the server via FTP again (except you want to make changes to config files directly).

1 Like