We always updated Matomo to the newest version using its built-in update options. The update to the newest version was offered inside Matomo/Piwik.
However, Matomo 3.4.0 has been released already some days ago and the update is not offered inside Matomo. In addition, we also did not reveive an e-mail informing us about the new release, which has always been the case for new versions in the past.
When checking for updates inside Matomo 3.3.0, the check returns that the current version of Matomo is already installed.
This problem occurs on multiple independent installs of Matomo.
Any help on how to update automatically is highly appreciated.
Unfortunately both solutions did not solve the problem, the update check still shows that I am using the latest version although the version is 3.3.0. I also deleted the contents of the temporary directory, but it had no effect.
I know that I can replace the files on the server with the current release, but is there any way to fix the problem or to invoke the update routine via Matomo’s interface?
Any suggestions are appreciated. The problem affects multiple (all of my) installs of Matomo which are running on different systems.
Please open the DevTools of your browser and navigate to the network tab. Than press the “search for updates” button in Matomo. Tell us what happens in the devtools
According to the dev tools of the current version of Firefox:
When clicking the “search for updates” button, a HTTP POST request to “…/index.php?date=today&module=CoreHome&action=checkForUpdates&idSite=1&period=day” is made that gets answered with HTTP status code 200 OK.
Now the update check (the POST with &action=checkForUpdates) will print the URL it checks on the Matomo API to display if there is a new error.
For me the URL is http://api.matomo.org/1.0/getLatestVersion/?piwik_version=3.4.0&php_version=7.1.15-1&mysql_version=5.5.5&release_channel=latest&url=http%3A%2F%2Flocalhost%2Fpiwik%2Findex.php&trigger=CoreHome&timezone=Europe%2FVienna and it properly returns 3.4.0.
The line I added reveals that the $latestVersion variable contains the HTML code of a SQUID error page, text content:
ERROR
The requested URL could not be retrieved
The following error was encountered while trying to retrieve the URL: http://api.matomo.org/1.0/getLatestVersion/?
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is root.
Generated Fri, 13 Apr 2018 14:50:12 GMT by [proxy server] (squid/3.5.20)
It seems that Http::sendHttpRequest does not throw an error because the SQUID proxy server returns the SQUID error page’s content. I will contact the server administrator as it seems that for some unknown reason the HTTP request to the Matomo API gets blocked by SQUID.
If these findings are correct, I suggest to extend the function posted above to check the validity of the content (version number expected) received by the HTTP request.
I have contacted the server admin the configure an exception for api.matomo.org.
To my knowledge the updater will download the current release from the matomo.org server via HTTP. It would be great if you could provide the domain name + subdomain so I can forward them to the server admin too.