Skip to content

Asset indexes utility throws error on Craft Cloud #91

@jamesmacwhite

Description

@jamesmacwhite

Description

When running an asset index on a Craft Cloud FS or Amazon S3 filesystem, the following error is logged after getting to the last asset item:

2025-05-19 06:03:46 [web.WARNING] [application] The assetindexdata table is empty; Can’t proceed with indexing. {"memory":9714456} 
sh: $'yii\rbacBaseManager': command not found
2025-05-19 06:03:46 [web.ERROR] [Error] Attempt to increment/decrement property "processedEntries" on null {"trace":["#0 /var/task/vendor/craftcms/cms/src/services/AssetIndexer.php(356): craft\\services\\AssetIndexer->incrementProcessedEntryCount(Object(craft\\models\\AssetIndexingSession))","#1 /var/task/vendor/craftcms/cms/src/controllers/AssetIndexesController.php(152): craft\\services\\AssetIndexer->processIndexSession(Object(craft\\models\\AssetIndexingSession))","#2 [internal function]: craft\\controllers\\AssetIndexesController->actionProcessIndexingSession()","#3 /var/task/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)","#4 /var/task/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams(Array)","#5 /var/task/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction('process-indexin...', Array)","#6 /var/task/vendor/craftcms/cms/src/web/Application.php(361): yii\\base\\Module->runAction('asset-indexes/p...', Array)","#7 /var/task/vendor/craftcms/cms/src/web/Application.php(660): craft\\web\\Application->runAction('asset-indexes/p...', Array)","#8 /var/task/vendor/craftcms/cms/src/web/Application.php(323): craft\\web\\Application->_processActionRequest(Object(craft\\web\\Request))","#9 /var/task/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest(Object(craft\\web\\Request))","#10 /var/task/web/index.php(12): yii\\base\\Application->run()","#11 {main}"],"memory":10678552,"exception":"[object] (Error(code: 0): Attempt to increment/decrement property \"processedEntries\" on null at /var/task/vendor/craftcms/cms/src/services/AssetIndexer.php:874)"} 

Seeing a shell error, potentially highlights where something might be going wrong:

sh: $'yii\rbacBaseManager': command not found

I can index the S3 volume without error on my local development environment.

Steps to reproduce

  1. Run an asset index request for a Craft Cloud FS or S3 volume on Craft Cloud
  2. The above error is logged after the indexing request reaches all asset items.

Additional info

  • craftcms/cms version: 5.7.6
  • craftcms/cloud version: 2.14.1
  • PHP version: 8.3
  • Database driver & version: MySQL 8.0.39
  • Plugins & versions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Cloud ExtensionSync to LinearbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions