Bug - Upgrade from 3.29.1 to 3.30.0

Hi, Having some problems upgrading the community edition 3.29.1 to 3.30.0. Followed the repository update and docker switch but it fails on this when starting:

eramba          |  == 20260519143000 ComplianceManagementSingleCustomFieldValuesDeduplicateMigration: migrating
eramba          | Class "CustomFields\Model\Table\CustomFieldsTable" not found
eramba          | Data migrations failed.
eramba          | Migration process failed.
eramba          | Initialisation process failed.

It then just loops around. Tested it on our database and on a clean 3.29.1 database and the same thing happens.

AI came up with this which might help further

Community 3.30.0 upgrade fails — data migration references CustomFieldsTable class absent from Community image; reproduced on clean data

Environment: Community, Docker (simple-install), upgrading 3.29.1 → 3.30.0 (image 3.30.0-19, also reproduced via 3.x tag).

Failure: Structural migrations complete successfully. Data migrations fail on 20260519143000_ComplianceManagementSingleCustomFieldValuesDeduplicateMigration with Class "CustomFields\Model\Table\CustomFieldsTable" not found. Container crash-loops; transaction rolls back.

Root cause evidence: The migration file contains use CustomFields\Model\Table\CustomFieldsTable; and references CustomFieldsTable::TYPE_* constants, but CustomFieldsTable.php does not exist anywhere in the Community image (find /var/www/eramba -name CustomFieldsTable.php returns nothing in both eramba:latest and eramba:3.x). Appears the migration depends on a CustomFields plugin class not shipped in the Community build.

Great product by the way, hoping to upgrade to Enterprise soon! Thanks

Hi,

I ran into a similar issue during the update as well, not with the loop but with the CustomFieldsTable. I was able to resolve it in the end by using the release-3.30.0 image instead of the 3.30.0-x image.

Might be worth a try in your case too.

@Tom Thanks! Using the release-3.30.0 image worked

Thanks

Thanks for reporting this. We’re already looking into it and I’ll let you know as soon as we have an update

I got another error message on the same setup (after many, many trials)

---------------------------------------------------------------
[2026-07-17 15:02:32] Looking for Job ...
Running Job of type "Queue.Execute"
Executing: `/usr/local/bin/php /var/www/eramba/app/upgrade/bin/cake.php post_process run`
PHP Fatal error: Trait "App\Model\Traits\LastAutomationFailedDynamicStatusTrait" not found in /var/www/eramba/app/upgrade/src/Model/Table/SecurityServiceAuditsTable.php on line 60
2026-07-17 15:02:32 error: [Cake\Error\FatalErrorException] Fatal Error: Trait "App\Model\Traits\LastAutomationFailedDynamicStatusTrait" not found in /var/www/eramba/app/upgrade/src/Model/Ta
ble/SecurityServiceAuditsTable.php on line 60
Stack Trace:
- CORE/src/Error/ExceptionTrap.php:278
- [internal]:??
- [main]:

2026-07-17 15:02:32 warning: Throwable - Failed to render error template `error500`. Error: No detector set for type `api`.
Stack Trace
: #0 /var/www/eramba/app/upgrade/src/Controller/ErrorController.php(67): Cake\Http\ServerRequest->is('api')
#1 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Event/EventManager.php(334): App\Controller\ErrorController->beforeRender(Object(Cake\Event\Event))
#2 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Event/EventManager.php(312): Cake\Event\EventManager->_callListener(Object(Closure), Object(Cake\Event\Event))
#3 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php(88): Cake\Event\EventManager->dispatch(Object(Cake\Event\Event))
#4 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Controller/Controller.php(698): Cake\Controller\Controller->dispatchEvent('Controller.befo...')
#5 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php(419): Cake\Controller\Controller->render('error500')
#6 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Error/Renderer/WebExceptionRenderer.php(290): Cake\Error\Renderer\WebExceptionRenderer->_outputMessage('error500')
#7 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Error/ExceptionTrap.php(240): Cake\Error\Renderer\WebExceptionRenderer->render()
#8 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Error/ExceptionTrap.php(327): Cake\Error\ExceptionTrap->handleException(Object(Cake\Error\FatalErrorException))
#9 /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Error/ExceptionTrap.php(278): Cake\Error\ExceptionTrap->handleFatalError(1, 'Trait "App\\Mode...', '/var/www/eramba...', 60)
#10 [internal function]: Cake\Error\ExceptionTrap->handleShutdown()
#11 {main}
Cache clearing finished with statuses: Array
(
[settings] => 1
[default] => 1
[mcp_prompt_limits] => 1
[_cake_core_] => 1
[_cake_model_] => 1
[_cake_routes_] => 1
[short] => 1
[medium] => 1
[long] => 1
[hourly] => 1
[infinite] => 1
[authErrors] => 1
[translations] => 1
[translations_frontend] => 1
[acl] => 1
[menu] => 1
[updates] => 1
[news] => 1
[ldap] => 1
[cron] => 1
[field_data] => 1
[widget_data] => 1
[widget_settings] => 1
[app_notification] => 1
[reports_settings] => 1
[notification_system_settings] => 1
[advanced_filters_settings] => 1
[trash_settings] => 1
[custom_fields_settings] => 1
[custom_fields] => 1
[layout_toolbar] => 1
[custom_labels] => 1
[dynamic_status] => 1
[import_tool] => 1
[mapping] => 1
[report_block] => 1
[report_view] => 1
[license_check] => 1
[purifier] => 1
)

Laravel cache clearing finished with statuses: 1

He is missing files. I saw this in cron log. But nothing in docker log. On web interface only a

...
2026-07-17 15:12:48 info: Creating emergency database backup at /var/www/eramba/app/upgrade/tmp/sqlbackup.sql.
2026-07-17 15:12:51 info: Database backup created with size 20.77 MB.
2026-07-17 15:12:51 debug: Profiling "createDatabaseBackup", took 2.35588 second(s) to complete, having result: Ok.
2026-07-17 15:12:51 info: Starting to run database migrations.
2026-07-17 15:12:51 info: Scheduling post-process job to the worker with priority.
2026-07-17 15:12:52 info: Rolling back database to version: 20260306080030.
2026-07-17 15:12:54 info: Starting to rollback files after failed update.
2026-07-17 15:13:12 debug: Profiling "_run", took 64.12269 second(s) to complete, having result: Error.
...

Installation seems to be healthy. Don’t understand why he is missing files.

starting the worker by the hand I see

Job Finished.
---------------------------------------------------------------
[2026-07-17 15:25:54] Looking for Job ...
Running Job of type "Queue.Execute"
Executing: `/usr/local/bin/php /var/www/eramba/app/upgrade/bin/cake.php update --fetch-latest --queued`
Class "Doctrine\Inflector\InflectorFactory" not found
Data migrations failed.
Migration process failed.

followed by

2026-07-17 15:27:21 warning: The connection is going to be closed but there is an active transaction.
2026-07-17 15:25:58 info: Support server said we are going to update from version 3.29.1 to version: 3.30.0.
2026-07-17 15:25:58 info: Downloading update package from `https://support-v3.eramba.org/api/download/6fd01830acbbb05d02031631eecaf0127915d3f799470304b274767c602b00fc` to `/var/www/eramba/app/upgrade/tmp/updates/update.zip`.
2026-07-17 15:26:15 info: Starting update process using package: phar:///var/www/eramba/app/upgrade/tmp/updates/update.zip
2026-07-17 15:26:15 info: Cleanup.
2026-07-17 15:26:21 info: Datasource for this update process is set to: default
2026-07-17 15:26:21 info: Emergency rollback for database version is set to: 20260306080030
2026-07-17 15:26:21 info: Starting to validate filesystem permissions.
2026-07-17 15:26:22 info: Starting to mirror all files from the update package.
2026-07-17 15:26:25 info: Copying files from the package.
2026-07-17 15:26:57 info: Finished mirroring of 66915 source code files(s).
2026-07-17 15:26:57 info: Creating emergency database backup at /var/www/eramba/app/upgrade/tmp/sqlbackup.sql.
2026-07-17 15:26:59 info: Database backup created with size 20.81 MB.
2026-07-17 15:26:59 info: Starting to run database migrations.
Database is currently not empty.
Running structural migrations.
using connection default
using paths /var/www/eramba/app/upgrade/config/Migrations
ordering by creation time

 == 20260320113000 AccountReviewFeedsAutomationMigration: migrating
 == 20260320113000 AccountReviewFeedsAutomationMigration: migrated 0.1801s

 == 20260323140500 McpDailyUsageCountersMigration: migrating
 == 20260323140500 McpDailyUsageCountersMigration: migrated 0.1391s

 == 20260326151000 McpDailyPromptUsageCountersMigration: migrating
 == 20260326151000 McpDailyPromptUsageCountersMigration: migrated 0.1528s

 == 20260327170000 AuthenticationSettingsMcpToggleMigration: migrating
 == 20260327170000 AuthenticationSettingsMcpToggleMigration: migrated 0.0338s

 == 20260410120000 TriggerLogsReferenceMigration: migrating
 == 20260410120000 TriggerLogsReferenceMigration: migrated 0.0282s

All Done. Took 0.5479s
Running data migrations.
using connection default
using paths /var/www/eramba/app/upgrade/plugins/DataMigrations/config/Migrations
ordering by creation time

 == 20251014153021 SecurityServiceCalendarCleanupMigration: migrating
2026-07-17 15:27:00 info: Scheduling post-process job to the worker with priority.
2026-07-17 15:27:00 info: Rolling back database to version: 20260306080030.
using connection default
using paths /var/www/eramba/app/upgrade/config/Migrations
ordering by creation time

 == 20260410120000 TriggerLogsReferenceMigration: reverting
 == 20260410120000 TriggerLogsReferenceMigration: reverted 0.0256s

 == 20260327170000 AuthenticationSettingsMcpToggleMigration: reverting
 == 20260327170000 AuthenticationSettingsMcpToggleMigration: reverted 0.0297s

 == 20260326151000 McpDailyPromptUsageCountersMigration: reverting
 == 20260326151000 McpDailyPromptUsageCountersMigration: reverted 0.0538s

 == 20260323140500 McpDailyUsageCountersMigration: reverting
 == 20260323140500 McpDailyUsageCountersMigration: reverted 0.0467s

 == 20260320113000 AccountReviewFeedsAutomationMigration: reverting
 == 20260320113000 AccountReviewFeedsAutomationMigration: reverted 0.0916s

All Done. Took 0.2644s

Dumping the current schema of the database to be used while baking a diff

Writing dump file `/var/www/eramba/app/upgrade/config/Migrations/schema-dump-default.lock`...
Dump file `/var/www/eramba/app/upgrade/config/Migrations/schema-dump-default.lock` was successfully written
2026-07-17 15:27:02 info: Starting to rollback files after failed update.
2026-07-17 15:27:20 info: Notifying support servers that the update failed.
2026-07-17 15:27:21 info: Clearing the cache.
2026-07-17 15:27:21 info: Worker process 66 marked for termination (will finish current job)
Error (code 1)

2026-07-17 15:27:21 error: Queue.Execute (job 105788)
Queue\Model\QueueException: Failed with error code 1: `/usr/local/bin/php /var/www/eramba/app/upgrade/bin/cake.php update --fetch-latest --queued` [87s, 20MB/4096M] (pid 66) {d3c0bb2e64ac}
Job did not finish, requeued after try 1.
---------------------------------------------------------------
root@d3c0bb2e64ac:/var/www/eramba# 

(which is what I want to see in web interface to check the reason)

After some strange executes in docker containers I was successful. I don’t know why.

One problem in my stack (which is partially other then the original von github because of traefik usage) can be that the crontab starts every minute and makes his job. But while update there are two workers. So crontab.log contains the error message and the update stucks. Can it be? Running commands from inside the container is usually a wrong idea, but the only way to get the error messages. Maby I forgot to start it as www-data and set wrong file permissions as root?

It could help to log directly to /dev/stdout inside the cron container. So the messages will be put to docker compose log’s output.

AFAIK:

We have faced a similar issue when upgrading eramba to the latest version.

We had to update the repository as in:

It somehow relies to a repository/url that doesn’t exist anymore.

Unfortunately the engineer who fixed it, is currently not available. Otherwise i would have asked for clear instructions.

Were you performing the update through the Eramba UI? The update from 3.29 to 3.30 requires an image switch, which is the update itself. Once the image switch is performed, you wil be on version 3.30 there is no need to update through the UI afterwards.

Do you mean this repository?

That repository has definitely not changed the URL. I would guess that the local git remote was modified or removed at some point, so fetch/pull was pointing to somewhere that doesn’t exist. If you mean something else let me know :slightly_smiling_face: