Error updating Mautic from 3.2.1 to 3.2.2

Hello there.
I hope you can help me to solve this issue.

My Mautic version
Mautic 3.2.1 - app/prod (kernel: app, env: prod, debug: false)

I cannot update Mautic from 3.2.1 to 3.2.2

My PHP version is : PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
My MySQL version is: Ver 8.0.22-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))

I am Updating via Command Line
php bin/console mautic:update:apply

These errors are showing in the installer :
Step 2 [–>-------------------------] Downloading update package… PHP Notice: Undefined index: message in /var/www/mautic/app/bundles/CoreBundle/Update/Step/InstallNewFilesStep.php on line 131

These are the lines that generates throw the error
if (isset($package[‘error’])) {
throw new UpdateFailedException($this->translator->trans($package[‘message’]));
}

These errors are showing in the Mautic log :
[2020-12-25 18:22:38] mautic.WARNING: Command mautic:update:apply exited with status code 1

Steps I have tried to fix the problem :
I cleared the cache
php bin/console cache:clear

Regards,
Wilt

Please also provide information on how can we upgrade to the latest version 3.2.2 from the browser itself.

Edit: the first time it worked for me I have just updated Mautic with the latest version 3.2.1 to 3.2.2

getting the same message.

System:
PHP 7.3.25 (cli) (built: Nov 24 2020 11:10:55) ( NTS )
mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1

mautic: 3.1.1

Me too. The same message.

Download the update zip file. Upload it to your mautic directory, unzip overwriting the existing files. Then run doctrine:schema:update --env=prod --force

I upgraded from 3.2.1-rc to 3.2.1 and then 3.2.2 with that method on a half dozen of my installs

1 Like

Thanks for your reply.

I downloaded the update zip and and renamed it “mautic-3.2.2-update.zip”

Overwrite the existing files with 3.2.2 version

cd /var/www
sudo unzip ~/mautic-3.2.2-update.zip -d ./mautic

#check for any outstanding database migrations
php bin/console doctrine:migration:status

#migrate database
php bin/console doctrine:migration:migrate

It seems it worked.

1 Like

Thanks for reporting this issue. We introduced a bug in 3.2.0 that was causing this problem for updates done through the CLI.

TL;DR here’s the official workaround:

wget https://github.com/mautic/mautic/releases/download/3.2.4/3.2.4-update.zip
php bin/console mautic:update:apply --update-package=3.2.4-update.zip
php bin/console mautic:update:apply --finish

A bit of background

We introduced a bug in 3.2.0 in the download step of the CLI update. Hence the workaround above, where you download the update package manually, mitigates this issue.

The bug has been fixed in 3.2.4. Users who have updated to that version won’t be affected by this issue anymore.

We deeply apologize for the inconvenience and will investigate potential improvements to our CI (Continuous Integration) pipeline to prevent issues like this one from occurring in the future.

2 Likes

For clarity sake, this 3.2.4-update.zip file goes in the root of your mautic directory.

@dennisameling can confirm, but you can download the file and upload manually or you can use cd command to change directory to the root of your mautic directory and then use the wget command.

Thanks a bunch @dennisameling

3 Likes