Integrity Checks Failing on Amazon S3

Hugo Static Site Generator v0.59.1/extended darwin/amd64 BuildDate: unknown
Amazon S3
Chrome Version 79.0.3945.88 (Official Build) (64-bit)

Running the local Hugo server works just fine and the pages seem to compile and be visible from the /public folder. Uploading new files to the S3 server, the site works just fine. But after a day or two, suddenly I get error messages in Chrome “Failed to find a valid digest in the ‘integrity’ attribute” for the main CSS file.

Looking through support topics on StackOverflow, I hit on the idea of manually editing my static HTML files to include empty integrity checks. This appears to resolve the issue for now, but obviously I’d rather not have to do this for every page, every time it changes.

So can anyone tell me why this is happening? Is there a way to disable integrity checks? I’d rather not but if they’re rendering the site inoperable, that’s not better?

If you do not add an integrity attribute, then Chrome should not perform any integrity check. This is all in your templates, which I don’t … see.

Fair enough. But I’m using a stock Hugo theme and didn’t actually ask for them, either.

As for the templates, I’m using Hugo Fresh. Here is one sample of how the css is being called into the template:

{{ partial "meta.html" . }} {{ block "title" . }}{{ .Site.Title }}{{ end }} {{ partial "css.html" . }}

Nothing in the stock config.yaml file indicates whether or not I would like to use integrity checks or not. So I’m not sure where they’re being created. Also: it makes sense to me to keep integrity checks in place, but I’m confused as to why they’re not working on S3?

I’m guessing here, but as Hugo Fresh uses SASS/SCSS to compile the CSS, my best guess is that this fails in your build to Amazon S3 – as this requires the extended version of Hugo…? But you should see this in the build log etc. But I don’t know how you build this project.