@Nitesh I am having the same issue in Piwik 3.2.0 version. Even after modifying the files as you mentioned the error persists.
The error log displays the below message: [Tue Feb 20 12:46:52 2018] [error] [client 10.54.21.40] Error in Piwik: There was an error reading the response from the Marketplace: Please try again later., referer: http://piwik-test.swissre.com/piwik/index.php?module=CoreAdminHome&action=home&idSite=1&period=day&date=today
Lukas
(Lukas Winkler)
February 20, 2018, 7:27pm
#2
Hi,
You can find the line here:
{
$endpoint = sprintf('%s/api/%s/', $this->domain, $this->version);
$query = Http::buildQuery($params);
$url = sprintf('%s%s?%s', $endpoint, $action, $query);
$response = $this->download($url);
$result = json_decode($response, true);
if (is_null($result)) {
$message = sprintf('There was an error reading the response from the Marketplace: Please try again later.');
throw new Service\Exception($message, Service\Exception::HTTP_ERROR);
}
if (!empty($result['error'])) {
throw new Service\Exception($result['error'], Service\Exception::API_ERROR);
}
return $result;
}
It means that Matomo tries to access something on plugins.matomo.org and Matomo just got something that canāt be decodes as JSON.
Can you try adding var_dump($response)
to see what response you get?
1 Like
I was able to fix this issue by changing the domain value to $domain = āhttp://plugins.matomo.org/ā; in the config file under the below path (Posting an image as I am not allowed two post two links being a new user ):
I believe the redirection from piwik to matomo was not defined which was creating the issue. Is there any other files we will have to make this kind of changes in future?
Regards
Lukas
(Lukas Winkler)
February 21, 2018, 3:54pm
#6
Hi,
Thatās really odd. Such a modification shouldnāt be necessary as the forward works correctly for everyone else.
Can you describe if you are Windows and which PHP (and PHP curl) versions you are using?