8

There is below information in the log, but no idea what could cause this :(

a:5:{i:0;s:45:"Unable to read response, or response is empty"; i:1;s:1003:"#0 lib/Varien/Http/Client.php(61): Zend_Http_Client->request('GET')
#1 app/code/core/Mage/Adminhtml/controllers/DashboardController.php(100): Varien_Http_Client->request('GET')
#2 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->tunnelAction()
#3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('tunnel')
#4 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#6 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 index.php(83): Mage::run('my_store', 'store')
#8 {main}";
s:3:"url";s:543:"/index.php/admin/dashboard/tunnel/key/ba90f30f2af450c5980c4c6353c49d61/?ga=..&h=..";
s:11:"script_name";s:10:"/index.php";
s:4:"skin";s:5:"admin";}

3 Answers 3

5

The tunnel action is the action that retrieves the chart data on the dashboard.

As you may know the dashboard chart are generated by Google Chart Api.

As you can see from the method, the tunnel action calls the API URL to generate the chart:

public function tunnelAction()
{
    $httpClient = new Varien_Http_Client();
    $gaData = $this->getRequest()->getParam('ga');
    $gaHash = $this->getRequest()->getParam('h');
    if ($gaData && $gaHash) {
        $newHash = Mage::helper('adminhtml/dashboard_data')->getChartDataHash($gaData);
        if ($newHash == $gaHash) {
            $params = json_decode(base64_decode(urldecode($gaData)), true);
            if ($params) {
                $response = $httpClient->setUri(Mage_Adminhtml_Block_Dashboard_Graph::API_URL)
                        ->setParameterGet($params)
                        ->setConfig(array('timeout' => 5))
                        ->request('GET');

                $headers = $response->getHeaders();

                $this->getResponse()
                    ->setHeader('Content-type', $headers['Content-type'])
                    ->setBody($response->getBody());
            }
        }
    }
}

With:

const API_URL = 'http://chart.apis.google.com/chart';

The problem could be that your store is behing a proxy and thus it cannot retrieve the Google Chart API URL data.

2
  • Recently we have got this problem, I'm wondering could it be due to our new checkout extension which includes "Amasty_Geoip.xml"?
    – Zinat
    Jul 12, 2016 at 9:12
  • @Zinat I highly doubt it but to find out, disable this module and see if that stops the error from happening Jul 12, 2016 at 9:15
3

From the official website : https://developers.google.com/chart/image/

Warning: This API is deprecated and is scheduled to be turned off on March 14, 2019. Please use the actively maintained Google Charts API instead.

It seems it is now turned off.

1
  • Yes, you can disable dashboard chart in configuration. Mar 6, 2019 at 8:54
0

The temporary fix is to disable charts in 1.x

System > Configuration > Advanced > Admin > Dashboard

Set enable charts to no

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.