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

The horizon dashboard does not have stylesheet loaded #1425

Closed
bensondevs opened this issue Apr 24, 2024 · 6 comments · Fixed by #1427
Closed

The horizon dashboard does not have stylesheet loaded #1425

bensondevs opened this issue Apr 24, 2024 · 6 comments · Fixed by #1427
Labels

Comments

@bensondevs
Copy link

Horizon Version

5.14.2

Laravel Version

10.48.9

PHP Version

8.2

Redis Driver

PhpRedis

Redis Version

7

Database Driver & Version

No response

Description

After releasing the app to the production and running the indexing queue, the horizon dashboard starts to show a page without styling.

In the browser console, it shows several errors talking about the horizon stylesheet
[Error] Cannot load stylesheet https://stagent.com/vendor/horizon/styles.css. Failed integrity metadata check. Content length: 154254, Expected content length: -1, Expected metadata: sha384-4HOmv1E51xgqbUYzCYXaRXPRja5nEho6eq/L/CKs0LlidzTGNTk81VtCAHqLiYSC (dashboard, line 16) [Error] Cannot load stylesheet https://stagent.com/vendor/horizon/styles-dark.css. Failed integrity metadata check. Content length: 154644, Expected content length: -1, Expected metadata: sha384-/sLOxh+NTFEdcZ8svIuVTv/lSL65X3QGIXhExXAhntQYWjiez1CQbv4ICbtwRfd8 (dashboard, line 17)

Steps To Reproduce

  1. Install the latest version
  2. Import all indexes (big data) using Laravel Scout - Meilisearch
  3. Suddenly it will destroy the styling of the Laravel Horizon
@mmachatschek
Copy link
Contributor

mmachatschek commented Apr 24, 2024

@bensondevs it seams like your browser detects that the file integrity of the stylesheets are incorrect. is it possible you have cached .css files in you browser?

@mmachatschek
Copy link
Contributor

@bensondevs PR#1427 should solve your issue

@driesvints driesvints added the bug label Apr 25, 2024
@hanicab
Copy link

hanicab commented Apr 29, 2024

I have the same issue, thank you

@sts-ryan-holton
Copy link

I have this error, how do I resolve it:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://api.mysite.com/vendor/horizon/styles.css' with computed SHA-384 integrity 'jF5Ipw7xyM9ulJ6sSawoFGoP0DyWrNryxV3zg8zSKrTHPXJKG6vmTzV8x+swGakj'. The resource has been blocked.

@MarceloLuis1997
Copy link

I have this error, how do I resolve it:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://api.mysite.com/vendor/horizon/styles.css' with computed SHA-384 integrity 'jF5Ipw7xyM9ulJ6sSawoFGoP0DyWrNryxV3zg8zSKrTHPXJKG6vmTzV8x+swGakj'. The resource has been blocked.

I'm having this same error after upgrading to Laravel 11. In my localhost it works fine, the sha384 digest in the HTML is the same of the sha384 in my manifest.json file, but in my production server it tries to load a different digest and then outputs this error in console

@mmachatschek
Copy link
Contributor

@sts-ryan-holton @MarceloLuis1997 it will be solved with the next horizon release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants