Missing Assets Anyone Have a Solution?


In a number of my production sites I’m seeing constant entries like this in the log files:

yii\base\InvalidRouteException: Unable to resolve the request "assets/6853c47c/lang/en.js

The site is operating normally but I’d like to understand why Yii is reporting all of these errors. There are hundreds of them in the log files.


Because something is trying to access these files.

Hi samdark:

The problem is that the site is running fine but on multiple sites that I’m using Yii the log files are filled with messages like this:

2017-04-19 09:19:38 [][376][nbbkkira5mtg5m9v94l1gic4b5][error][yii\web\HttpException:404] exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "assets/f7fefe06/lang/en.js".' in /mnt/padata/www/pa/vendor/yiisoft/yii2/base/Module.php:532

Stack trace:

#0 /mnt/padata/www/pa/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('assets/f7fefe06...', Array)

#1 /mnt/padata/www/pa/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))

#2 /mnt/padata/www/pa/backend/web/index.php(18): yii\base\Application->run()

#3 {main}

Next exception 'yii\web\NotFoundHttpException' with message 'Page not found.' in /mnt/padata/www/pa/vendor/yiisoft/yii2/web/Application.php:114

Stack trace:

#0 /mnt/padata/www/pa/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))

#1 /mnt/padata/www/pa/backend/web/index.php(18): yii\base\Application->run()

#2 {main}

But the site is operating normally - no true exceptions. Is there anyway to address what this is or at least clean up the code somehow so I don’t get all of these messages?

You can exclude 404s or direct them to separate file via logger configuration.