Update from V3.8.1 to V3.9.1 failed

Hi folks,
after having problems with the update to the version V3.9.0 two days agao, I’ve restored my installation from a backup to the version V3.8.1.

Today Matomo showed me the new version V3.9.1 in the user interface and I tried to update from V3.8.1 to V3.9.1.

Unfortunately, the update failed again with the following error message:
Matomo encountered an error: Call to undefined method Piwik\Plugin\Manager::getPluginDirectory() (which lead to: Circular dependency detected while trying to resolve entry ‘Piwik\Twig’)

As a test, I ran the archive job “core:archive”. That worked without any problems and without errors. With V3.9.0 this job failed with several errors.

Nevertheless, I decided to restore the version V3.8.1 from my backup, waiting for an newer Version.

My configuration:
Debian Jessie(V8.11)
MySQL-Version: 5.5.62-0+deb8u1-log
PHP-Version: 5.6.40-0+deb8u1

Greetings,
RPF

Hi,

3.9.1 works, the fix for that error simply did not work as intended… I’ll open an issue for you.

Greetings

1 Like

Yes, I am also able to reproduce this error from v3.8.1 to 3.9.1.

Same here. (Debian 8.11, PHP 7.2, MySql 5.5) Localized in French, if that makes any difference.
Best, GC

Can you try to add
use Piwik\Plugin;

in
plugins/Installation/Installation.php

It’s ok for me after that

unfortunately, while it tells me it fails it does after refresh reload and works fine. It’s almost as if we’re getting a false positive on the error.
Did you update get the error, add your fix and then try again or did you add the fix and then try the update?

I update file but no update database was proposed by the UI.
Maybe because i have this in config/common.config.ini.php

[General]
; Tell Matomo we are running a multi server environment
multi_server_environment = 1

; Disable installing new plugins and (de)activating plugins.
enable_plugins_admin = 0

; Disable the one-click auto-update as we have multiple servers
enable_auto_update = 0

The archive job won’t run because they are missing table :

Table ‘matomo.matomo_log_media_plays’ doesn’t exist - in plugin MediaAnalytics

I saw the core and plugins version in database was wrong

I perform a ./console cache:clear
cache was cleared
and ./console core:update
Nothing happens (no output)

I saw this php errors in my log
PHP Fatal error: Class ‘Piwik\Plugin’ not found in […]/htdocs/plugins/Installation/Installation.php on line 23

I add
in Plugins/Installation/Installation.php
use Piwik\Plugin;
a ./console cache:clear and
./console core:update work and the update was ok

I don’t think it’s false positive but a dependency missing
I think the update by UI work if you refresh because the function needed was cached at the reload, but was not call in good time to work on the first load.

I don’t know if my fix is at the right place but it permit to perform the update by the console