This report is unavailable (400) "error" : invalid grant

QUESTIONS & ANSWERSCategory: WordPressThis report is unavailable (400) "error" : invalid grant
Profile photo of David MartinDavid Martin asked 2 months ago

As it appears is happening with several others, my site tracking is no longer being displayed. It stopped suddenly a few days ago, although the adsense page itself suggests tracking is still occurring. Under “Error Details” it says “None.”

Last Error: 2016-11-12 18:56:00: exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{
  "error" : "invalid_grant"
}'' in /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php:331
Stack trace:
#0 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php(264): Google_Auth_OAuth2->refreshTokenRequest(Array)
#1 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php(240): Google_Auth_OAuth2->refreshToken('1/yp6LmCBr3vxuC...')
#2 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Service/Resource.php(215): Google_Auth_OAuth2->sign(Object(Google_Http_Request))
#3 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Service/Analytics.php(1909): Google_Service_Resource->call('get', Array, 'Google_Service_...')
#4 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(277): Google_Service_Analytics_DataGa_Resource->get('ga:100628239', '365daysAgo', 'yesterday', 'ga:sessions,ga:...', Array)
#5 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(415): GADWP_GAPI_Controller->handle_corereports('100628239', '365daysAgo', 'yesterday', 'ga:sessions,ga:...', Array, 'qr3_3751503531')
#6 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php(805): GADWP_GAPI_Controller->get_bottomstats('100628239', '365daysAgo', 'yesterday', false)
#7 /nas/content/live/agentsofgame/wp-content/plugins/google-analytics-dashboard-for-wp/admin/ajax-actions.php(108): GADWP_GAPI_Controller->get('100628239', 'bottomstats', '365daysAgo', 'yesterday', false)
#8 [internal function]: GADWP_Backend_Ajax->ajax_item_reports('')
#9 /nas/content/live/agentsofgame/wp-includes/plugin.php(524): call_user_func_array(Array, Array)
#10 /nas/content/live/agentsofgame/wp-admin/admin-ajax.php(91): do_action('wp_ajax_gadwp_b...')
#11 {main}

I haven't found anything particularly helpful in the searches, I've tried some of the suggestions offered to no avail. Any ideas?


1 Answers
Profile photo of Alin MarcuAlin Marcu Staff answered 2 months ago

See

Profile photo of Calvin Dooney
I have been using Google Analytics for about a year now and this has only recently happened. I updated the plugin a few weeks back (maybe 5-6 weeks ago) …

.

Profile photo of David MartinDavid Martin replied 2 months ago

You linked me to another similar question, and the only response is from you, saying that you answered this three years ago, with no link to the answer. I’ve seen this response already, so I searched several of the many, many answers from three years ago. Perhaps I didn’t find the answer you’re referring to, but none of what I looked through or attempted resolved my issue. If you’re going to link me to something, can you please link me to the thread where this was answered three years ago?

Profile photo of Alin MarcuAlin Marcu Staff replied 2 months ago

Clear the authorization and re-authorize the plugin. The link I gave you is from a question posted 2 days ago.

Profile photo of David MartinDavid Martin replied 2 months ago

Now it worked. When I clicked the link you gave following my last response, there was actionable instruction in your response, but the first time, it only said “answered three years ago.” Either way, the issue is now resolved, thanks to your quick follow-up response and help. Two thumbs up.