Mautic Notification and repeated 500 error after update to 4.2

A notification alert popped up that there a new update when I clicked on it then it state this is a “composer installed” Mautic etc etc that I needed to updated it via CLI.

I recently did switch to composer install in 4.1 after I saw the announcement about the marketplace being only available on composer installed Mautic.

Anyhow, I ssh’ed in and did a “composer update” which gave me an all green “OK” after it completed. I logged back in Mautic and got an 500 error message … ugh … I decided to empty my browser cache and try again … this time I was able to log in but the announcement alerted that new 4.2 update is available however on the lower corner shows that my Mautic is at 4.2.0 .

I clicked on the announcement bell thinking I could get rid of the alert and again got 500 error grrrrrrrrr … so again I closed browser and emptied cache then log back in and went back to the announcement pop up … I clicked on “clear all notification” and did clear the red dot but the update announcement is still there in the window

I clicked a few more buttons and messed around in Mautic for a bit to see if that 500 error will happen again but so far nothing … seems stable other than the upgrade announcement is still pestering me if I log off for a bit then come back later and the alert will come back.

Is this normal or something is off?

Thank you.

Did you:

  • delete the mautic app cache in var/cache/dev/ var/cache/prod/?
  • did you run php bin/console mautic:plugins:reload --env=prod

No, i didn’t do those … I will go do it now

Is this a required step for every after composer update?

Its a rule of thumb. Yes, you should clear the cache.

Alright thanks … I’ll make a note of this steps to do after each update.

I just recently switched from zip installed to composer installed where I never had any issue with zip install but still learning something new every day!

Thanks again!

I follow your steps and gotten an email with this

In Configuration.php line 63:

Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must
implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Compo
nent\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.o
rg/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 23
29

Now my site will not load at all after doing what you posted


Here what in the log

[31-Mar-2022 14:51:01 UTC] PHP Warning: require(/home/agwmadmin/mas.agwm.org/vendor/composer/…/myclabs/deep-copy/src/DeepCopy/deep_copy.php): failed to open stream: No such file or directory in /home/agwmadmin/mas.agwm.org/vendor/composer/autoload_real.php on line 71
[31-Mar-2022 14:51:01 UTC] PHP Fatal error: require(): Failed opening required ‘/home/agwmadmin/mas.agwm.org/vendor/composer/…/myclabs/deep-copy/src/DeepCopy/deep_copy.php’ (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /home/agwmadmin/mas.agwm.org/vendor/composer/autoload_real.php on line 71
[31-Mar-2022 14:51:10 UTC] PHP Warning: require(/home/agwmadmin/mas.agwm.org/vendor/composer/…/myclabs/deep-copy/src/DeepCopy/deep_copy.php): failed to open stream: No such file or directory in /home/agwmadmin/mas.agwm.org/vendor/composer/autoload_real.php on line 71
[31-Mar-2022 14:51:10 UTC] PHP Fatal error: require(): Failed opening required ‘/home/agwmadmin/mas.agwm.org/vendor/composer/…/myclabs/deep-copy/src/DeepCopy/deep_copy.php’ (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /home/agwmadmin/mas.agwm.org/vendor/composer/autoload_real.php on line 71
[31-Mar-2022 14:53:43 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 14:53:47 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 14:54:52 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 14:56:34 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 14:56:41 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerOuaJwcS/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63

For reference, the documentation on how to update when you are using Composer is here:

Have you tried to follow the link @rcheesley provided?

By the looks of it vendor packages are not fully installed, ensure they are, clear the cache by deleting the files in var/cache/prod/ and then run php bin/console cache:clear --env=prod so that the app creates warmup cache

Yes … I am waiting on sys admin to send me over the backup from yesterday. It seems that today’s backup occur right around the time I am trying to do an update.

That the steps I used when I did the first clean install and then again for the update …

One site showing me it still at 4.2.0 even I issue the update commands several times and it repeatedly said update ok

yes I did all the clear and database update commands … still showing 4.2.0 and the alert still giving a notification of 4.2.1 available

it looks like that that update was performed in CLI but nothing happened to Mautic itself

So I had another fresh install Mautic on another site and I did the same steps to update it which gave me the “OFFLINE” warning message

I would to add no matter what php command I issued … all came back with this error or similar to it

Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must
   implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Compo
  nent\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.o
  rg/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 23
  29

The server error log all show the same thing over and over again

[31-Mar-2022 18:08:01 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 18:08:11 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 18:08:18 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 18:09:22 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63
[31-Mar-2022 18:09:29 UTC] TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/prod/ContainerVQGWsFM/appAppKernelProdContainer.php on line 2329 - in file /home/agwmadmin/mas.agwm.org/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63

Topic should had said update from 4.2 to 4.2.1 - my bad

Anyhow,

I restored it back to 4.2 and it working again …

I am trying again to update to 4.2.1 via composer step by step on the page you linked to

First I restored the Mautic back to yesterday 4.2 and it back to working again …

Then followed the guide provided by @rcheesley to try to update it again to 4.2.1. Only thing in the guide that gave me message was

bin/console cache:clear 

Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Ada
  pter\ArrayAdapter given, called in /home/agwmadmin/mas.agwm.org/var/cache/pro_/ContainerW3NC4C5/appAppKernelProdContainer.php on line 2329

It does show files being updated and still loading for me after the update but I am still showing 4.2.0 not 4.2.1 at the lower corner of Mautic also it giving me notification alert that 4.2.1 is available to update.

I am not sure if it even updated or if it did updated but there an error with the version numbering. It seems to have issue with cache management

When I tried to manually delete all cache … that when it crashed for me until I have to restore from yesterday Mautic and start over.

Hmm,

what version of php is used to install dependencies (run composer) and what version to to run bin/console?

Do all dependencies and post install script execute without an error? I know that one time I had to remove executables in bin directory (all except console).

I have one instance that I need to update from 4.2.0 to 4.2.1 via composer, maybe after I do an update myself can provide more input.

The same php 7.4 is used to install and update.

I did a git clone then

composer install

about a week ago or two (no error or message)

Then I did the

composer update mautic/core-lib --with-dependencies

and then the php command to clear cache (gave that message) and update database (no error)

When that didn’t change the 4.2.0 to 4.2.1 I came here asking about it and it was mentioned that cache need to be emptied.

Next I did the rm (cache folders) and that cause Mautic to stop working until I restored it from yesterday backup again.

After restoring it, I did the composer update again and the php commands. Php still gave error on the clear cache but no error on updating the database

Seems to be pointing to the cache being the culprit during update I went home for the day but I will do further testing tomorrow

The composer was installed on server via YUM repository.

@mzagmajster @rcheesley

Where do I begin to troubleshoot this? I would like to try to get this figure out and sorted.

Hi, have not really updated composer based Mautic install, but I had issues when using --with-dependencies flag during update in general.

Is it at all possible that you delete vendor packages and install them again (this time with the latest Mautic version)?

One more thing if you are installing this in prod. you do not need development packages, so I would also try: composer install --no-dev

Just delete the /vendor/ folder and do a compose install -no-dev in /mautic/ folder?

Will it keep my contacts and information?

(I have a backup of it all if needed to restore from there too)