Refused to execute script from /files/js/js_yvkkgN0iKZ30AdwlfXvVMCtPnsFwBKc9nQ8FkcPYRzY.js because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Created on 13 July 2023, 12 months ago
Updated 17 April 2024, 2 months ago

Problem/Motivation

I am getting issue after upgrade Drupal 10.1.1 .

Refused to execute script from
'files/js/js_yvkkgN0iKZ30AdwlfXvVMCtPnsFwBKc9nQ8FkcPYRzY.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Its working fine if disable advagg Module

Steps to reproduce

Upgrade Drupal 9.5.8 to 10.1.1
advagg : 6.0.0-alpha1
PHP 8.1.12

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.0

Component

General CSS/JS

Created by

🇮🇳India ashutosh.mishra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ashutosh.mishra
  • 🇮🇳India amitvin

    Check if you have Xdebug enabled. If yes then try disabling it.

  • 🇫🇮Finland YevKo Espoo

    I am getting the same errors. I found out that it is not the disabling of the Advanced aggregation, but disabling of Aggregate CSS files and
    Aggregate JavaScript files what leads to the site getting up again.

  • 🇺🇸United States dpagini

    I have also encountered this error (or similar) a few times on my production site. I haven't been able to determine if it's related to this module, though, but I am using this module, still on Drupal 9.
    On my site, however, I am seeing that Drupal is loading a script at <script type="text/javascript" src="/"></script> (the homepage).

  • 🇸🇮Slovenia KlemenDEV

    Possible duplicate/related to https://www.drupal.org/project/advagg/issues/3308099 📌 Document which parts of the module are still relevant after aggregation changes in 10.1.0 Needs review . Seems at the time of writing advagg is not suitable for use with Drupal 10.1.x+. We are waiting for maintainers to make a plan forward with this module, but for now it may be better to use core aggregation and compression features

  • 🇺🇸United States capellic Austin, Texas

    Thanks @YevKo, this helped me:

    I found out that .. disabling .. Aggregate CSS files and Aggregate JavaScript files what leads to the site getting up again.

  • 🇫🇷France Guillaume Aveline

    We had the same issue on one of our website.
    The issue is the variable in system.performance is deprecated, and was deleted by D9 -> D10 migration.

        stale_file_threshold:
          type: integer
          label: 'Stale file threshold'
          deprecated: 'The system.performance.stale_file_threshold config key is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3301744'
    

    During the cron, AdvAgg tries to delete files modified after this value.
    Since it's now empty, it means 0, so files are deleted immediatly.

    In the cache, file is still mark as active, drupal tries to load it, but it results in a "404 - not found"

    We managed to solve this issue by re submiting AdvAgg settings form which sets back the stale_file_threshold value.

    I thins a better approch would be to patch the module with the patch present in this issue: https://www.drupal.org/project/advagg/issues/3410820 🐛 'stale_file_threshold' is not a supported key RTBC

    Regards !

Production build 0.69.0 2024