SHA mismatch with Netlify CMS

Hello,

I manage a site that uses Netlify CMS with Netlify Large Media (jolly-meninsky-d8f3ae.netlify.app). The GitHub repo is public.

The person who manages the site’s content contacted me to say that a handful of images weren’t showing on the site. Looking into this, I can see that the images in question (e.g. /src/uploads/microgreens.png) are listed in the Large media tab within the Netlify admin, but that the SHA given there is not what I see when navigating to the file within the GitHub repo… though it was correct in a previous commit. For the previous commit the correct image size is shown, whereas for the new SHA the size is listed as zero.

You can see the commit history for the above mentioned file here.
The SHA given by Netlify Large Media is ca02ddad3da70b9fbf80abc39fb5891f0780c3602c489b221226e2c9b02b3029 .

This change in the SHA has come about through Netlify CMS somehow, as I’m the only person who commits to the repo outside of Netlify CMS and I haven’t done so for a week or so.

I’m unsure why the SHA has changed and how it’s ended up seemingly out of sync with Netlify Large Media. But I’m also unsure how best to fix – I could just delete and re-upload the images in this instance, but I’m concerned about it happening again and would prefer to know how to get the SHAs back into agreement.

This is continuing to occur and I’m unsure why – e.g. it’s just happened today with this image – the SHA of the file in the repo appears correct initially (i.e. matches what I’m seeing on the Large Media page in Netlify) but when the page is updated the SHA changes, the file size is recorded as 0, and the image stops loading.

Hi,

The SHA for the new version of file is indeed the SHA for an empty file. So, for some unknown reason, the CMS is commit that file as empty.

You can see the new SHA here:

https://github.com/johnpuddephatt/zwl/blob/3486d9f22c3ddaf661e626ad2329f14819679fe8/src/uploads/bigclearout.png

This is the SHA256:

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Which matches the empty file SHA as noted here:

So, we know what is happening but not why. The CMS is submitting an empty image as a commit.

Ideally, we want to be able to reliably reproduce this occurring to troubleshoot. If you have any other details to narrow down what triggers this “empty file” update, please include that information at any time.

For example, does this always happen when a page with an image in Large Media is edited or only sometimes? If only sometimes, is there any known pattern? Does it only happen for specific users or if specific steps are taken? If specific actions trigger this, what are those actions.

​Please let us know if there are any other questions for us and we look forward to finding the root cause of this issue.