New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One-click upgrade sometimes fails with errors such as "Call to undefined method Piwik\Plugin\Manager::getPluginDirectory() " (fails only once, works after a refresh) #14227
Comments
Thanks for the report. We were able to reproduce this (also in https://forum.matomo.org/t/problems-while-upgrading-to-3-9-0/32112 ) and after a refresh (go to Matomo root) it works. Have you tried going to your Matomo (without any path) and does it work? |
Yes, apart from the warning described in #14226 the installation seems to work fine. |
Same issue here. Is the matomo installation now broken? I run manually |
@poldixd No, the installation should work fine after a page reload. |
But I got some errors when I run the
|
That's an unrelated problem discussed there #14229 |
Same happened to me, was about to post this as new issue, but see it is already open. This happened to me today on 2 different servers (one VPS self-managed running 3.8.9, another shared cPanel hosting running 3.7.0). On one-click update page I received this message in Browser (not error log):
This is not a coincidence or a temporary glitch. However, from that point things were different: [1] on VPS version 3.8.9 in which I manually fixed database (there was something posted here what we should do, check some missing table or something like that), simple hitting back in browser produced another error notice (this was in log):
And that was it. Refreshing the page and all returned back everything to normal. [2] On shared hosting version 3.7.0 I entered into the login page (again) and database required upgrade page, and then it was completed. I guess this part was normal, since some more things changed in between 370/390. Interesting enough, there was nothing about that Twig thing in php error log. |
Also just happened to me, on two different servers, Matomo seems to work fine. But it's never great to be greeted with an error like
From 3.9.0 Upgrade Errors |
👋 Same as above "Error after upgrading via browser" PHP: 7.1.27 Surely there will be version 3.9.1 🎉 😉 |
I got the same error after updating, using PHP 7.2.15. Reload root page works so far, but I got warnings on all pages.
As you can see, there is a "/" missing bewteen "htdocs" and "plugins" |
Updated from 3.8 to 3.9 After reload index.php no error, looks like everything is fine. Another misstype piwik vs matomo ? php 5.6.40 |
I've got the same issue on three different servers. On all of them I hit refresh and clicked on "Back to Matomo". Then all seems fine. But I am still curious if the update was done successfully because it was very fast for that installation size. |
I answered too early. I now get bombarded with errors of my Matomo cronjobs. It looks like this:
|
same problem here |
@NicolasGoeddel Please apply this patch and report back if it solved the problem: https://patch-diff.githubusercontent.com/raw/matomo-org/matomo/pull/14239.patch |
It solved the cronjob issue. It runs fine now. I will now check the smaller servers. |
My error log is empty, nothing interesting besides above error message that it is already up to date / version 3.9.0 . |
The smaller servers with only one site on it did not show any issues but I patched them anyway. |
That patch will go live soon(tm) with version 3.9.1. |
Got the same warnings after update to 3.9.0 like @pitgrap and change this file, too. |
Now I understand the meaning of ❗ in update notifications 😃 (you're gonna hate me for this joke, I know...) |
This is still happening to me on several installations during update from 3.7.0 or 3.8.9 to 3.9.1 - is this normal/expected?
Also, this happened in one setup (3.8.9 -> 3.9.1) when I hit back in browser:
Then I edited URL to visit home matomo page and this was shown:
Then I hit refresh in browser and was presented with database update required page. From there, everything seems to be fine. |
Ok, my PHP error log is filled with these lines (after the update no new error log entries were found - will keep monitoring it next couple of days):
|
@dev-101 Does the file |
I can confirm that it is now in new location (old location was removed during update, probably). Thanks! |
Unfortunately, yes. The bug is in the old code and occurs right before the update finishes, when the old code is still in memory. Which means the update process can't get rid of the bug in time (so-to-speak). It won't happen when upgrading from 3.9.1, but I don't think there's a way to get rid of it on upgrading from before then since the bug is in the one click update process itself. @mattab we may want to patch old releases if we want to avoid users seeing this error. |
Ok, there is one new error entry (forgot to check before replying to sgiehl above, my initial checks were fine an hour ago):
Not sure why that one happen, need to monitor and determine what actually triggers it. Update: Well, just cleared the log and tried accessing main matomo page couple of times, no errors. @diosmosis |
Unfortunately, this is not a glitch, it is still happening and here are the timestamps from the log:
Roughly, it occurs once per hour and it seems that this is either triggered by some cron internal process, or some visitor session (it is not triggered by myself visiting dashboard for sure). Update: just checked my other shared-hosting installations logs, same happens there, too - at irregular intervals e.g. once in 1-4 hours, which suggests something from above (e.g. cron and/or relation to number of visits). Interestingly enough, this doesn't happen on VPS servers, logs are silent about this (occasionally get unable to start session message for some visits, but's that is another Matomo's unrelated issue). |
I just updated from 3.9.0 to 3.9.1, and it went fine, without any errors. |
I just updated from 3.8.1 to 3.9.1 and the first thing that happens:
After reloading I can go back to the dashboard. Anyways, the issue is not resolved yet, I'm afraid. Edit: It happened again with my second Matomo instance I just updated |
Same here, while updating from 3.8.1 to 3.9.1 with automatic update |
@kghbln @Polfo see my comment: #14227 (comment) |
@diosmosis Thanks for the pointer and the insight. This bug was advertised as fixed which is obviously not always the case. This is confusing if users do not get a note about this information. Or |
Anyone else getting According to php manual:
Hope this is already the case. |
No. |
@kghbln Yes, we should probably mention this to users somehow, otherwise there will probably be many more reports like this cc @mattab |
Updating to 3.9.0 using the one click updater failed to me with the following 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’)
At least one other users had this issue and reported it in the German forum: https://forum.matomo.org/t/update-fehler-matomo-3-9-0/32109
After that broken update, I'm now left with the issue described in #14226. Maybe there is a connection between the two, as both errors/warnings are about the plugin directory.
The text was updated successfully, but these errors were encountered: