laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.82k stars 636 forks source link

The horizon dashboard does not have stylesheet loaded #1425

Closed bensondevs closed 2 months ago

bensondevs commented 2 months ago

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 commented 2 months ago

@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 commented 2 months ago

@bensondevs PR#1427 should solve your issue

hanicab commented 2 months ago

I have the same issue, thank you

sts-ryan-holton commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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