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

Comments

ashutosh.mishra created an issue. See original summary.

ashutosh.mishra’s picture

Issue summary: View changes
ashutosh.mishra’s picture

Issue summary: View changes
amitvin’s picture

Check if you have Xdebug enabled. If yes then try disabling it.
https://www.drupal.org/project/drupal/issues/3371010

yevko’s picture

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.
This is happening in the server, no Xdebug

dpagini’s picture

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).

klemendev’s picture

Possible duplicate/related to https://www.drupal.org/project/advagg/issues/3308099. 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

capellic’s picture

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.

la vague illuminee’s picture

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

Regards !