Skip to content

Google chart API used by Magento dashboard scheduled to be turned off #21599

Closed
@eerorika

Description

@eerorika

Magento uses a Google web API http://chart.apis.google.com/chart to draw the admin dashboard graph. The API has been deprecated in 2012 and has been scheduled to be turned off on March 14, 2019

Preconditions (*)

  1. Any Magento version (including Magento 1 and) up to at least 2.2 (tested) and 2.3 dev branch (not tested, but the URL is still in the code, so it is presumably affected too)
  2. The deprecated API has been turned off (March 14, 2019)

Steps to reproduce (*)

  1. a) Either wait for the deprecated API to be turned off (March 14, 2019)
    b) Or simulate it by adding 127.0.0.1 chart.apis.google.com into /etc/hosts
  2. Login as admin
  3. If it is not the default, open dashboard

Expected result (*)

  1. The dashboard graph should work
  2. No critical errors are produced in log

Actual result (*)

As the API isn't turned off yet, the exact behaviour is speculative and depends on how gracefully Google plans to execute the take down. Following is one potential undesired result:

  1. The graph in the dashboard does not work.
  2. In log, something like:
main.CRITICAL: Unable to read response, or response is empty {"exception":"Zend_Http_Client_Exception: Unable to read response, or response is empty in vendor/magento/zendframework1/library/Zend/Http/Client.php:1093
Stack trace:
#0 vendor/magento/framework/HTTP/ZendClient.php(52): Zend_Http_Client->request('GET')
#1 vendor/magento/module-backend/Controller/Adminhtml/Dashboard/Tunnel.php(68): Magento\\Framework\\HTTP\\ZendClient->request('GET')
#2 generated/code/Magento/Backend/Controller/Adminhtml/Dashboard/Tunnel/Interceptor.php(24): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel->execute()
#3 vendor/magento/framework/App/Action/Action.php(107): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->execute()
#4 vendor/magento/module-backend/App/AbstractAction.php(235): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#5 vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#6 vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->___callParent('dispatch', Array)
#7 vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#8 vendor/magento/framework/Interception/Interceptor.php(135): Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(Object(Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor), Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))
#9 vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#10 generated/code/Magento/Backend/Controller/Adminhtml/Dashboard/Tunnel/Interceptor.php(143): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->___callPlugins('dispatch', Array, NULL)
#11 vendor/magento/framework/App/FrontController.php(55): Magento\\Backend\\Controller\\Adminhtml\\Dashboard\\Tunnel\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#12 vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#13 vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', Array)
#14 vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))
#15 generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', Array, Array)
#16 vendor/magento/framework/App/Http.php(135): Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))
#17 generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\\Framework\\App\\Http->launch()
#18 vendor/magento/framework/App/Bootstrap.php(257): Magento\\Framework\\App\\Http\\Interceptor->launch()
#19 pub/index.php(37): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))
#20 {main}"

Another potential behaviour is an error message in the graph image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CmsIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions