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

Failed to find a valid digest in the 'integrity' attribute for resource. After upgrading to Laravel 11 #1435

Closed
MarceloLuis1997 opened this issue Apr 30, 2024 · 2 comments

Comments

@MarceloLuis1997
Copy link

Horizon Version

5.21

Laravel Version

11.0

PHP Version

8.3.6

Redis Driver

Predis

Redis Version

7.0.2

Database Driver & Version

MySQL 8.0.31

Description

After upgrading to Laravel 11 and PHP 8.3.6, my Horizon dashboard has ceased to function properly in production mode. Upon attempting to access /horizon, the console output indicates three errors:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://mywebsite.com.br/vendor/horizon/styles.css' with computed SHA-384 integrity 'jF5Ipw7xyM9ulJ6sSawoFGoP0DyWrNryxV3zg8zSKrTHPXJKG6vmTzV8x+swGakj'. The resource has been blocked.
Failed to find a valid digest in the 'integrity' attribute for resource 'https://mywebsite.com.br/vendor/horizon/styles-dark.css' with computed SHA-384 integrity 'SsyNiFtI+7ZBfSgg9Uzd5Ig0DDBnNbnv2pMqiH4QYYaUSEVpPud6rpiZjQ13ErZM'. The resource has been blocked.
Failed to find a valid digest in the 'integrity' attribute for resource 'https://mywebsite.com.br/vendor/horizon/app.js' with computed SHA-384 integrity '1a+yk9Q/GiPNVQWQIctwzo6wfiVom8RndXD8BddmOykTw//pM3RnTPjzVZK+Uvin'. The resource has been blocked.

All three integrity attributes differ from those listed in my public/vendor/horizon/manifest.json file. Strangely, in localhost, everything functions correctly, with the integrity attributes generated in the HTML matching those in my manifest.json file.

I've attempted to update Horizon assets using php artisan horizon:publish, but to no avail. Additionally, I've followed all the steps outlined in the Horizon upgrading guide.

Steps To Reproduce

Install laravel 11.0 and Laravel Horizon.

Run php artisan horizon:publish.

Access /horizon URL and it will not properly load the HTML and outputs errors in console.

@ValCanBuild
Copy link

This looks similar to #1426 which is already fixed and awaiting release.

@driesvints
Copy link
Member

This is now fixed in v5.24.4

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

No branches or pull requests

3 participants