Hi,
We need to identify the source of the error. So, to do that, when you get the error go to Errors & Debug screen and post the details of the error.
Depending on the details we’ll try to identify the source error. Re-authorizing each time isn’t a solution.
So let’s start with the error details and we’ll go from there.
-
This reply was modified 9 years, 4 months ago by
Alin Marcu.
Thread Starter
maxidg
(@maxidg)
hi there man …
so for example this is from one customer site:
what do you think, that u need all log from all my customer site?
Last Error: 2017-01-16 17:02:49: exception ‘Google_Auth_Exception’ with message ‘Error refreshing the OAuth2 token, message: ‘{
“error” : “invalid_grant”
}” in /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php:331
Stack trace:
#0 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php(264): Google_Auth_OAuth2->refreshTokenRequest(Array)
#1 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php(240): Google_Auth_OAuth2->refreshToken(‘1/VjfOZSx1yVZTx…’)
#2 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Service/Resource.php(215): Google_Auth_OAuth2->sign(Object(Google_Http_Request))
#3 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Service/Analytics.php(1909): Google_Service_Resource->call(‘get’, Array, ‘Google_Service_…’)
#4 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(277): Google_Service_Analytics_DataGa_Resource->get(‘ga:133838602′, ’30daysAgo’, ‘yesterday’, ‘ga:sessions,ga:…’, Array)
#5 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(415): GADWP_GAPI_Controller->handle_corereports(‘133838602′, ’30daysAgo’, ‘yesterday’, ‘ga:sessions,ga:…’, Array, ‘qr3_1510921441’)
#6 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(805): GADWP_GAPI_Controller->get_bottomstats(‘133838602′, ’30daysAgo’, ‘yesterday’, false)
#7 /var/www/virtual/cilli-snc.it/htdocs/wp-content/plugins/google-analytics-dashboard-for-wp/admin/ajax-actions.php(108): GADWP_GAPI_Controller->get(‘133838602’, ‘bottomstats’, ’30daysAgo’, ‘yesterday’, false)
#8 [internal function]: GADWP_Backend_Ajax->ajax_item_reports(”)
#9 /var/www/virtual/cilli-snc.it/htdocs/wp-includes/plugin.php(525): call_user_func_array(Array, Array)
#10 /var/www/virtual/cilli-snc.it/htdocs/wp-admin/admin-ajax.php(89): do_action(‘wp_ajax_gadwp_b…’)
#11 {main}
Got it!
Can you tell me if you’re authorizing more than 25 sites using the same Google Account and also if they are all hosted at the same hosting provider?
Thread Starter
maxidg
(@maxidg)
hmhmh maybe yes more then 25 … not all are in the same account .. for example the code i sent u before the customer is on tiscali ..
🙁
In case you do authorize more than 25 sites with the same account, here are some solutions and also on the FAQ page.
Basically, there’s a limit of refresh tokens allowed per Client/Account pair. For details see https://developers.google.com/analytics/devguides/config/mgmt/v3/authorization#invalid_grant
Thread Starter
maxidg
(@maxidg)
thanks …
i saw on dev page … this note:
The limit of 25 refresh tokens is subject to change.
maybe will be more .. 🙂