Error when manually triggering cron jobs

Your software
My Mautic version is: 4.3.1
My PHP version is: 7.4 (tested also in 8.0)
My Database type and version is: MySQL 5.7

Your problem
My problem is:

Hello, when I run any email cron job line in terminal it gives me a lot of strange errors. It will trigger campaigns, update campaigns, send messages but won’t send emails. Sidenote, if I delete the cache, then the error won’t appear the first time, but once the cache folder has data the error reappears. The errors are:


xxxx@xxxx.xxxx.com [~]# php /home/xxxx/public_html/marketautomation/bin/console mautic:emails:send

[WARNING] Some commands could not be registered:

In TransifexFactory.php line 21:

Argument 1 passed to Mautic\CoreBundle\Factory\TransifexFactory::__construct() must be an instance of Psr\Http\Client\ClientInterface, instance of GuzzleHttp\Client given, called in /home/xxxx/pub
lic_html/marketautomation/var/cache/prod/ContainerOVtgi3G/getTransifex_FactoryService.php on line 9

In TransifexFactory.php line 21:

Argument 1 passed to Mautic\CoreBundle\Factory\TransifexFactory::__construct() must be an instance of Psr\Http\Client\ClientInterface, instance of GuzzleHttp\Client given, called in /home/xxxx/pub
lic_html/marketautomation/var/cache/prod/ContainerOVtgi3G/getTransifex_FactoryService.php on line 9

[WARNING] Some commands could not be registered:

In TransifexFactory.php line 21:

Argument 1 passed to Mautic\CoreBundle\Factory\TransifexFactory::__construct() must be an instance of Psr\Http\Client\ClientInterface, instance of GuzzleHttp\Client given, called in /home/xxxx/pub
lic_html/marketautomation/var/cache/prod/ContainerOVtgi3G/getTransifex_FactoryService.php on line 9

In TransifexFactory.php line 21:

Argument 1 passed to Mautic\CoreBundle\Factory\TransifexFactory::__construct() must be an instance of Psr\Http\Client\ClientInterface, instance of GuzzleHttp\Client given, called in /home/xxxx/pub
lic_html/marketautomation/var/cache/prod/ContainerOVtgi3G/getTransifex_FactoryService.php on line 9


Never saw something like that

These errors are showing in the log:

Steps I have tried to fix the problem:
Tried to find the error online but nothing close

Reinstall php dependenices, clear the cache and try again.

I installed mautic with softaculous (an auto app installer) and haven’t managed to migrate it to composer, even changed server for composer on mautic.

Is there a way to do that without composer?

First backup your current vendor folder somewhere. Then I would try to download mautic release 4.3.1 from GitHub and replacing vendor folder on your server with the one from newly downloaded release.

After you replace the folder, delete the cache with rm -rf /var/cache/dev/* /var/cache/prod/*

Make sure permissions on files and folders are correct and try again.

Thanks, will try that!

Well was not mautic core. Did what you told me and still the error.
So I discovered I had an outdated plugin called Gautit Backups (great plugin, but too old now) that was causing the problem.

Thanks for your time!

1 Like