ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3. All your data has been successfully migrated to Mautic 3, but this error very likely needs to be fixed before you can start using Mautic 3

MAUTIC3
My PHP version is : 7.3.6
My MySQL/MariaDB version is: 5.7.31

Updating/Installing Errors [2020-08-08 18:54:00] ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3. All your data has been successfully migrated to Mautic 3, but this error very likely needs to be fixed before you can start using Mautic 3.

Command output:
// Clearing the cache for the prod environment with debug true

In ClassExistenceResource.php line 181:

Class “Mautic\CoreBundle\EventListener\CommonSubscriber” not found while loading “MauticPlugin\MauticCronTesterBundle\EventListener\ButtonSubscriber”.

cache:clear [–no-warmup] [–no-optional-warmers] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

*I am Updating mautic 2.16.3 for mautic 3
*Upgrading Command Line

These errors are showing in the installer :ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3. All your data has been successfully migrated to Mautic 3, but this error very likely needs to be fixed before you can start using Mautic 3.

Command output:
// Clearing the cache for the prod environment with debug true

In ClassExistenceResource.php line 181:

Class “Mautic\CoreBundle\EventListener\CommonSubscriber” not found while loading “MauticPlugin\MauticCronTesterBundle\EventListener\ButtonSubscriber”.

These errors are showing in the Mautic log :

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) :

Your problem Internal Server Error try to open mautic
My problem is : how to solve ?

Steps I have tried to fix the problem :

Try to delete the cache and retry

so… I hit this error today too… is there a solution to it? (I’ve deleted var/cache/prod several times)

ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3…

next steps?

What is your upgrade log showing?

[2020-08-31 18:10:24] Done! Your user data has been restored. Your Mautic 3 installation is ready. Just one more thing:
[2020-08-31 18:10:24] Cleaning up installation files that we no longer need…
[2020-08-31 18:10:24] Cleaned up successfully!
[2020-08-31 18:10:24] Building cache for Mautic 3…
[2020-08-31 18:10:24] ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3. All your data has been successfully migrated to Mautic 3, but this error very likely needs to be fixed before you can start using Mautic 3.

Command output:
// Clearing the cache for the prod environment with debug true

In ClassExistenceResource.php line 181:

Class “Mautic\CoreBundle\EventListener\CommonSubscriber” not found while loading “MauticPlugin\MauticRecaptchaBundle\EventListener\FormSubsc
riber”.

cache:clear [–no-warmup] [–no-optional-warmers] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

I’ve tried deleting the cache/prod folder… to no avail.

Also - the last 10,000 lines in the error_log are:
02-Sep-2020 13:30:39 UTC] ReflectionException: Class “Mautic\CoreBundle\EventListener\CommonSubscriber” not found while loading “MauticPlugin\MauticRecaptchaBundle\EventListener\FormSubscriber”. - in file /home/imrodmartin/info.imrodmartin.com/vendor/symfony/config/Resource/ClassExistenceResource.php - at line 181
(obviously coming from a form that can’t load on my blog)

Any help would be appreciated! (I have training videos to make LOL)

anyone? - i’d appreciate any more thoughts :slight_smile:

ok… so it turns out that at some point I had installed the Mautic 2.x re-captcha plugin and it’s not compatible with M3. (CommonSubscriber was removed in M3). Huge thanks to a good friend who caught that at the bottom of the log file.

1 Like

Thank you for this information. I found this error too in my logs, because of the plugin “MauticExtendeeToolsBundle”.

Correct. All non M2 compatible plugins must be removed before upgrade. You can add the M3 version of these plugins afterwards.