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
Matomo should throw an error if the request to api.matomo.org fails #12724
Comments
The To prevent this issue on Matomo site, a new function should be added to public static function sendHttpRequestWithExpectedResult($aUrl,
$expectedPattern,
$timeout,
$userAgent = null,
$destinationPath = null,
$followDepth = 0,
$acceptLanguage = false,
$byteRange = false,
$getExtendedInfo = false,
$httpMethod = 'GET',
$httpUsername = null,
$httpPassword = null)
{
// Do the same as in sendHttpRequest but do a preg_match() against the body afterwards.
} If you like this solution I'll provide a PR for that. |
Any opinions? |
Maybe we could add a system check for it? To test we receive a version number? |
@tsteur That won't help people who have a proxy blocking the request without their knowledge. |
Sorry not sure I get it. I read the forum post... as we probably don't really want to fail during run time when that request fails, it may be better to show it in a system check (which is also shown on Admin Home) that something is wrong / not working? |
Ah, sorry my mistake. A system check is a great idea. (I read system test, which wouldn't make any sense) |
👍 That check should also allow to see the returned error message if there is one. |
After long debugging of an issue where no update was found, it turned out that a proxy was blocking the request.
https://forum.matomo.org/t/update-from-3-3-0-to-3-4-0-not-offered-in-matomo/27786
In my opinion the updater should not act as if no update is available if the request fails.
On the contrary always showing warnings may be annoying in case api.matomo.org is down once. Maybe a warning could only be shown after repeated retries.
The text was updated successfully, but these errors were encountered: