Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access fresh install - Stylesheets fail integrity metadata check #31

Open
J0n4t4n opened this issue Dec 22, 2022 · 4 comments
Open
Labels
bug Something isn't working

Comments

@J0n4t4n
Copy link

J0n4t4n commented Dec 22, 2022

Hi all,

I have installed Mastodon using this Helm Chart on my cluster and I am having trouble accessing it.
I have an Nginx Ingress Controller in front of the containers with Domain and a valid SSL cert configured.
Every time I navigate to the URL I only see 2 icons and receive a lot of errors regarding the integrity of the stylesheets in the console:

Screenshot 2022-12-22 at 13 05 50

Judging by the network tab, the stylesheets are loading fine and the content looks okay as well.
I couldn't find any errors in any of the pods either and the precompile command ran successfully also.
Using Safari or Chrome result in the same issue.

Does anyone have an idea what the error could be or even just how I could go about debugging this?
I tried manually port-forwarding port 3000 from the web container to see if I could access the site that way, but my connection seems to get refused immediately.

Thanks a lot!

@renchap renchap added the bug Something isn't working label Feb 17, 2023
@DmitriyLyalyuev
Copy link

Same issue here. Did you find solution?

@J0n4t4n
Copy link
Author

J0n4t4n commented Nov 3, 2023

I went a different route back then, back as far as I know now it should be related to the assets not having been precompiled successfully.
This can happen, if it runs out of memory while doing that, it probably other reasons.

You can try manually running the command ```
RAILS_ENV=production rails assets:precompile

in the web container, that's the command that fixes it on a normal install.

It might either just work, or you can see why it fails. Maybe pay attention to the memory usage, while it's doing it to see if there is an issue there.

@ddimick
Copy link

ddimick commented Dec 9, 2023

UPDATE: purging Cloudflare's cache appears to have resolved this issue for me.

I'm encountering this issue on multiple versions, including 4.2.3 but going back quite a ways. I see a warning when precompiling assets, but it doesn't appear to be the problem to me.

$  RAILS_ENV=production bundle exec rake tmp:cache:clear
$  RAILS_ENV=production bundle exec rails assets:precompile
Compiling...
Compiled all packs in /home/mastodon/live/public/packs
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/home/mastodon/live/node_modules/babel-plugin-lodash/node_modules/@babel/types/lib/validators/generated/index.js:2740:35)
    at PluginPass.Program (/home/mastodon/live/node_modules/babel-plugin-lodash/lib/index.js:102:44)

From browser console:

[Error] Cannot load stylesheet https://my-mastodon-site/packs/css/common-a729b6b0.css. Failed integrity metadata check. Content length: 29086, Expected content length: -1, Expected metadata: sha256-KDzFV9ckqn2zELncHPapWY+nN4HgaUP+jxBFg4sinFA=
[Error] Cannot load stylesheet https://my-mastodon-site/packs/css/default-4f83ea19.chunk.css. Failed integrity metadata check. Content length: 408121, Expected content length: -1, Expected metadata: sha256-eYdfX79Ubn6duY8xO++/LEF39DicmJgwbEVWJ1h6ORc=
[Error] Cannot load script https://my-mastodon-site/packs/js/common-f4585afb150ba2e9cb38.js. Failed integrity metadata check. Content length: 1459083, Expected content length: -1, Expected metadata: sha256-2b/hmjAkRebM3ziUseoouSsIJjHASrwc80Qk8HV0XmU=
[Error] Cannot load script https://my-mastodon-site/packs/js/application-de50c0d962d466c06dca.chunk.js. Failed integrity metadata check. Content length: 86728, Expected content length: -1, Expected metadata: sha256-1M1jN1sotP1opum7SZ2YDFa8hidCoqHo+81qzHGyOCc=
[Warning] The resource https://my-mastodon-site/packs/js/locale/en-json-f5510c22fd7d55be6ad5.chunk.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.

@macstainless
Copy link

UPDATE: purging Cloudflare's cache appears to have resolved this issue for me.

Thank you for posting this. I've spent an hour trying to figure out what's going on and it was Cloudflare. Cache cleared and my front-end is loading once more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants