XF 2.0 File health check results

AndyB

Well-known member
Not sure why I'm getting this error message:

1503105302337.webp

The file contents look okay:

Code:
{
    "legacy_addon_id": "",
    "title": "Remove last edited",
    "description": "",
    "version_id": 10,
    "version_string": "1.0",
    "dev": "",
    "dev_url": "",
    "faq_url": "",
    "support_url": "",
    "extra_urls": [],
    "require": [],
    "icon": ""
}
 
The hashes.json file is built automatically when the add-on is built.

"Unexpected contents" just means that the file has been edited since the hashes file was last built.
 
I would figure the hashes.json would be rebuilt we we do a "build-release" but apparently it's not. I say this because as you can see I can do a
build-release, but I still have the same error message as I show in post #1.

1503159721015.webp
 
They definitely are. An explicit option needs to be passed into the build-release command to skip generating hashes.

So the issue may exist somewhere else, but I'm unsure where at this stage.

Can you upload the addon.json and hashes.json file (or the entire add-on ZIP if possible)?
 
The hashes.json file is added the built release zip, it isn't in the folder when developing as you're going to be modifying files.

If that's your development board, you can just delete the hashes.json file.

Liam
 
Just to be clear, however, building the release will only update the hashes stored in the ZIP file. Have you extracted the contents / uploaded the contents to your server?
 
If that's your development board, you can just delete the hashes.json file.

Hi Liam,

I deleted the hashes.json file and then ran the "build-release" again, but it does not recreate the hashes.json file.

I just check the Admin Control Panel and ran the File health check and I have no more errors:

1503163599060.webp

Perhaos the hashes.json file should be rebuilt with the "build-release" command, that would eliminate this issue.
 
Hi Liam,

I deleted the hashes.json file and then ran the "build-release" again, but it does not recreate the hashes.json file.

I just check the Admin Control Panel and ran the File health check and I have no more errors:

View attachment 156136

Perhaos the hashes.json file should be rebuilt with the "build-release" command, that would eliminate this issue.

The hashes.json file is created when you build a release, but it isn't saved to the existing files - it's but into the built ZIP, as there's no need for it on a development server.

When a user extracts the zip, the hashes.json file is there, and if it weren't, the install wouldn't work - XF2 requires the hashes file and the hashes to match for an add-on to be installed.

Liam
 
Yes I just looked and none of my other 20 or so XF2 add-ons have a hashes.json file on my developement server. So perhaps I must have extracted the zip file locally and uploaded it, then subsequently edited the addons.json file which triggered the File heath check error.

Thank you Liam and Chris for your help with this.
 
Back
Top Bottom