# Mautic upgrade to 3.3.1 a mess again

**URL:** <https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [March 7, 2021, 3:29pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471 "2021-03-07T15:29:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 7, 2021, 3:29pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/1 "2021-03-07T15:29:02Z")

</div>

Mautic 3.2.5  
7.2  
MariaDB

Upgrade button in admin has never worked anyway, so I followed the command line steps that worked on previous upgrades, using wget to get 3.3.1-update.zip, then applying with this:

php bin/console mautic:update:apply --update-package=3.3.1-update.zip

My installation is now all f\*\*\*ed up again with the following errors showing up in SSH:

Failed to remove file “/home/myusername/public\_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic\_Transport\_Momentum\_Service\_SwiftMessageService.php”: unlink(/home/myusername/public\_html/mautic/var/cache/prod/ContainerBxexpyi/getMautic\_Transport\_Momentum\_Service\_SwiftMessageService.php): Permission denied.

After that on any other php bin/console command I try, I get this error:

In ListModel.php line 78:

Type error: Argument 1 passed to Mautic\LeadBundle\Model\ListModel::\_\_construct() must be an instance of Mautic\CategoryBundle\Model\CategoryModel, instance of Mautic\CoreBundle\Helper\CoreParametersHelper given, called in /home/myusername/public\_html/mautic/var/cache/prod/ContainerBxexpyi/appProdProjectContainer.php on line 9592

What can I try next to fix this mess?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 9, 2021, 5:54am UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/2 "2021-03-09T05:54:45Z")

</div>

1. Check permissions (who is running mautic)  
If you logged in as root, and ran the update command as root, you mess up the permissions. You’ll need to chown it to the proper user.
2. Clear the cache

If you have any errors post it here

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 9, 2021, 6:35am UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/3 "2021-03-09T06:35:31Z")

</div>

Thanks for the response. I was not logged in as root and have chowned the entire folder again after the fact to be sure. It did not clear up the error.

I can’t clear the cache. Any command I run now I get that same error message - ListModel.php line 78 etc. I am stuck. How can I get beyond this error?

What does the line 78 error mean?

Is there another (manual) way to clear the cache now SSH commands don’t work?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 9, 2021, 7:46am UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/4 "2021-03-09T07:46:45Z")

</div>

Hmm - no other way besides SSH.  
Did you have any special plugin enabled prior to the 3.3.1 update?  
What is the SMTP method you are using?  
Joey

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 9, 2021, 7:59am UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/5 "2021-03-09T07:59:05Z")

</div>

No plugins used whatsoever.

SMTP? Simple Mail Transfer Protocol? Where would that be involved? I don’t have any general connection issues with SSH.

There should be a way to fix the error manually; SSH is not magic. What does the error mean? Could I temporarily remove/disable a file/check to get passed it and clear the cache etc.?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 9, 2021, 1:07pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/6 "2021-03-09T13:07:57Z")

</div>

I asked about SMTP, because sometime certain mail provider’s API is messed up, and you can turn it off to pass the checks.  
Just an intuition, that you have to poke around there, but I might be wrong: “getMautic\_Transport\_Momentum\_Service\_SwiftMessageService.php”  
So I can’t help.  
J

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 9, 2021, 1:13pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/7 "2021-03-09T13:13:43Z")

</div>

I don’t use a mail provider and don’t see any connection with ListModel.php line 78:

Is there anyone involved with the inner workings of Mautic who can point me in the right direction, specifically what this error means and how to get beyond it?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 9, 2021, 1:22pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/8 "2021-03-09T13:22:58Z")

</div>

Hi there - sounds frustrating!

As has already been said, you need to clear your cache.

If you were able to run the command

`php bin/console mautic:update:apply --update-package=3.3.1-update.zip`

you should be able to run the command

`php bin/console cache:clear`

If you cannot do that then delete the cache folder - Mautic recreates it on first load (assuming that your file and folders have the correct permissions - check [this page](https://docs.mautic.org/en/troubleshooting/file-ownership-and-permissions) for info).

Clearing the cache is a required step in every update.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 9, 2021, 1:41pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/9 "2021-03-09T13:41:17Z")

</div>

Thank you for your response.

I had cleared the cache before my upgrade attempt; that is when I got that first error, ‘Failed to remove file’.

I tried the upgrade nevertheless - my mistake, did not think that one file would be fatal. After that I get the ListModel.php line 78 error on any php bin/console command, so completely stuck.

I’ll try to manually delete the cache tonight, after my day job…

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [March 9, 2021, 1:55pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/10 "2021-03-09T13:55:59Z")

</div>

Yes - if you look at the error the file paths are pointing to things in the cache directory.

> Failed to remove file “/home/myusername/public\_html/mautic/ **var/cache/prod** /ContainerBxexpyi/getMautic\_Transport\_Momentum\_Service\_SwiftMessageService.php”: unlink(/home/myusername/public\_html/mautic/ **var/cache/prod** /ContainerBxexpyi/getMautic\_Transport\_Momentum\_Service\_SwiftMessageService.php): **Permission denied**.

> Type error: Argument 1 passed to Mautic\LeadBundle\Model\ListModel::\_\_construct() must be an instance of Mautic\CategoryBundle\Model\CategoryModel, instance of Mautic\CoreBundle\Helper\CoreParametersHelper given, called in /home/myusername/public\_html/mautic/ **var/cache/prod** /ContainerBxexpyi/appProdProjectContainer.php on line 9592

So this suggests that there were insufficient permissions to complete the action, and hence the issues you are seeing I suspect!

Fingers crossed that will fix the issue!

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [March 13, 2021, 6:41pm UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/11 "2021-03-13T18:41:46Z")

</div>

After manually clearing **/mautic/var/cache/** the upgrade scripts went through.

---

<div class="post-metadata">

**Author:** ![jaypatel5213](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jaypatel5213/32/4612_2.png) [@jaypatel5213](https://forum.mautic.org/u/jaypatel5213)\
**Post date:** [August 28, 2021, 8:34am UTC](https://forum.mautic.org/t/mautic-upgrade-to-3-3-1-a-mess-again/18471/12 "2021-08-28T08:34:26Z")

</div>

Mautic was not working after clear cache.  
I was run this command.

```auto
php bin/console cache:clear

```
