Magento2: Google chart API used by Magento dashboard scheduled to be turned off

Created on 6 Mar 2019  路  11Comments  路  Source: magento/magento2


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.

Cms Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.2.x Reproduced on 2.3.x

Most helpful comment

http://chart.apis.google.com/chart appears to be fully offline now, and blocks a connection for a period of time before responding with a 502 error. http://chart.apis.google.com returns 404.

All 11 comments

Hi @eerorika. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@eerorika do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [x] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • _Next steps are available in case you are a member of Community Maintainers._

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

:white_check_mark: Confirmed by @engcom-backlog-nazar
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98583, MAGETWO-98584 were created

Issue Available: @engcom-backlog-nazar, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

http://chart.apis.google.com/chart appears to be fully offline now, and blocks a connection for a period of time before responding with a 502 error. http://chart.apis.google.com returns 404.

Oh no! Did google actually do something when they said they would?

Its ok the deprecation was only... 5 years?

The API seems to be back online as of right now.

The API seems to be back online as of right now.

Not sure what you mean. This was shutdown a few days ago.

The API seems to be back online as of right now.

Not sure what you mean. This was shutdown a few days ago.

I mean the google API is working again right now for some reason.
https://chart.googleapis.com/chart?chs=120x120&cht=qr&chl=test

Weird, but we should not trust this. Well, Google often change their decision. But it seems we are already working on a solution.

Magento released a patch for Magento 1, see announcement.
No news yet on Magento 2 I think.

Hello @eerorika @rougou @DanielRuf @hostep @durzel

Thank you for contribution and collaboration!

The corresponding internal ticket MAGETWO-98583was fixed and delivered by Magento team

Please see details in the next commits:

  • f92c8fd
  • 8b34651
  • 2f23922
  • 83cb9a0
  • 07a1570
  • a7d1f1b
  • eb81913
Was this page helpful?
0 / 5 - 0 ratings