WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] Google_AuthException - why just on this domain? (36 posts)

  1. Peter Le C
    Member
    Posted 1 year ago #

    Hi Ben,

    6.3.2 now running on all of my blogs bar one.

    All sites on same server, all running same version of WP and up to date themes, no issues with the theme on other domains. (WeaverII)

    I deactivated and deleted and reinstalled GA twice to no avail so a bit of a head scratch.... can you assist?

    The domain isn't new BTW.

    Thanks

    Fatal error: Uncaught exception 'Google_AuthException' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php:279 Stack trace: #0 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array) #1 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(216): Google_OAuth2->refreshToken('1/GANsPbyDZFm_5...') #2 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(166): Google_OAuth2->sign(Object(Google_HttpRequest)) #3 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_AnalyticsService.php(54): Google_ServiceResource->__call('list', Array) #4 /home/dirtytal/publi in /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 279

    http://wordpress.org/extend/plugins/google-analyticator/

  2. rustypete
    Member
    Posted 1 year ago #

    G'day, I've got this error msge twice after de-authenticating and re-authenticating.
    Regards, Pete

    Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Aga%3AUA-31187248-1&start-date=2012-08-15&end-date=2012-09-14&metrics=ga%3Avisits&dimensions=ga%3Adate&sort=ga%3Adate: (400) Invalid value 'ga:ga:UA-31187248-1'. Values must match the following regular expression: 'ga:[0-9]+'' in /home/footloos/public_html/painmanagement4u.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php:66 Stack trace: #0 /home/footloos/public_html/painmanagement4u.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 /home/footloos/public_html/painmanagement4u.com/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(177): Google_REST::execute(Object(Google_HttpRequest)) #2 /home/footloos/public_html/painmanagement4u.com/wp-content/plugins/google-analyticator/google-api-php-cl in /home/footloos/public_html/painmanagement4u.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php on line 66

  3. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Peter

    If you click Deauthorize Google Analyticator. and re-authenticate, does it work for you then? That can be the only difference b/w your two sites.

    Ben

    Hi rustypete

    That's a new error, I've not seen before. When you authenticate, do you see the dropdown of domain names to select?

    Ben

  4. Peter Le C
    Member
    Posted 1 year ago #

    Ben - Deauthorize Google Analyticator is not available from the plugin settings page. Hence I cannot test that option.

    A fresh install (deactivate, delete take new 6.3.2) same deal - go to settings and all you have is the enable/disable option plus the error message.

    SOMETHING must have corrupted some files in WordPress or something isn't actually deactivating the plug in but leaving remnants behind..
    where can I start looking?

    Appreciate your help!

  5. Peter Le C
    Member
    Posted 1 year ago #

    Additional:

    GA appears in my list of widgets, but I have no active widgets now visible, in other words I can't add or edit any of the existing widgets. Its very similar to the problem of yesterday morning, prior to 6.3.2

    Hope of help.

  6. dsmith00
    Member
    Posted 1 year ago #

    Hello All,

    I have a similar fatal exception also:

    Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Aga%3Awww.david-allen-studios.com&start-date=2012-08-16&end-date=2012-09-15&metrics=ga%3Avisits&dimensions=ga%3Adate&sort=ga%3Adate: (400) Invalid value 'ga:ga:www.david-allen-studios.com'. Values must match the following regular expression: 'ga:[0-9]+'' in /home/content/40/7682940/html/blog/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php:66 Stack trace: #0 /home/content/40/7682940/html/blog/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 /home/content/40/7682940/html/blog/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(177): Google_REST::execute(Object(Google_HttpRequest)) #2 /home/content/40/7682940/html/blog/wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_ in /home/content/40/7682940/html/blog/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php on line 66

    I went in settings and tried to put my actual UID number instead of my domain name--which this plugin filled in for me, but could not change it.

    -david
    http://www.david-allen-studios.com/blog/

  7. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Peter

    Someone had success by totally cleaning out their wp_options table of any option with ga_ in it. This may help if you clean it out completely and start a new?

    In the plugin option there should be a RESET link, near activate/edit etc for the plugin itself

    Ben

  8. Peter Le C
    Member
    Posted 1 year ago #

    Hi Ben

    The reset makes no difference I', afraid ;-(
    Certainly it looks like something in GA is essentially leaving detritus post installation.

    I'm not savvy enough to check the wp_options tables myself however.

    Can follow instructions though ;-)

    Thanks for assistance so far.

    Kind regards

    Peter

  9. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Peter,

    We are going to put out 6.3.3 really soon, and one of the added features will to clean out the wp_options table of all Google Analyticator preferences - so it should help you out!

    Keep an eye out!

    Ben

  10. Bet Hannon
    Member
    Posted 1 year ago #

    I've also been having this same issue-- and it continutes even after updating to 6.3.3.

    The affected site is one site in a multisite install, and all the other sites updated/authenticated just fine.

    Fatal error: Uncaught exception 'Google_AuthException' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php:279 Stack trace: #0 /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array) #1 /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(216): Google_OAuth2->refreshToken('1/0cHcgb9ZCvHpH...') #2 /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(166): Google_OAuth2->sign(Object(Google_HttpRequest)) #3 /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google in /nfs/c08/h04/mnt/123041/domains/churchwebsiteprogram.com/html/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 279

  11. Bet Hannon
    Member
    Posted 1 year ago #

    BTW, I've also tried the "reset" option from the installed plugins page, but no luck.

  12. mmwine
    Member
    Posted 1 year ago #

    I've upgraded to 6.3.3, hit reset about 100 times, and still get the oAuth error

    There was an Analytics API service error 400:Error fetching OAuth2 access token, message: 'invalid_grant'

    I'll delete the GA% out of my wp_options table next

  13. Peter Le C
    Member
    Posted 1 year ago #

    Looks like this one is proving a toughie to sort.

    For sure its a GA issue though - as we have have reset, deactivated, de-authorized and then re laid GA on our blogs... it's not theme related as I have multiple themes all configured the same way - all on the same server all on the same WP version.

    My sites are single, not multi.

  14. mmwine
    Member
    Posted 1 year ago #

    deleted anything ga% out of the wp_options table and reset/ reactivated twice. still getting
    here was an Analytics API service error 400:Error fetching OAuth2 access token, message: 'invalid_grant' Warning: Invalid argument supplied for foreach() in /home/content/html/wp/wp-content/plugins/google-analyticator/google-analyticator.php on line 427
    Tracking Settings

  15. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    I've taken a look through Google API docs, and they have the following message for when we get the "invalid_grant" error.

    Solving invalid_grant errors
    Make sure your server's clock is in sync with NTP.

    https://code.google.com/p/google-api-php-client/wiki/OAuth2#Solving_invalid_grant_errors

    So, this may be an issue with your host. Only a very small number of users are having this error, so it may be a server related error.

  16. Peter Le C
    Member
    Posted 1 year ago #

    Ben I have 52 blogs on two servers. Only one blog returns the errors stated above.

    I've also removed everything by FTP and tried again. Same issue.

    So it's something else. ( If it was the clock synch issue all other installations of WP on the same server with the same themes etc. would be so effected. They aren't.)

    What I can't do is to delete everything and start afresh. There the medicine is more harmful than the disease. But there remains something that I'm sure you will find.

    Good hinting and if I sound ungrateful I'm not! I really appreciate your work. The only plugin I guess that I'd pay for without wingeing! - it's THAT useful! ;-)

  17. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    This is indeed a weird one!

    So, the site that doesn't work - site x - what is different about it?

    To manually remove all the settings from the DB - go to phpMyAdmin for site x's database and open wp_options

    http://i.imgur.com/GRhXZ.png

    Click Search and enter ga_% for the option name

    http://i.imgur.com/GUTCY.png

    That will show you all the values we are about to delete.

    Now, click on SQL tab

    paste in

    delete from wp_options where option_name like 'ga_%'

    And run that. It will delete all options prefixed with ga_ from the wp_options table.

    That will totally delete all Google Analyticator preferences from the DB.

    Ben

  18. Bet Hannon
    Member
    Posted 1 year ago #

    Peter beat me to the reply! I have multiple sites in this hosting account, but this is the only one with a GA issue. Seems like it HAS to be something else...

  19. Bet Hannon
    Member
    Posted 1 year ago #

    I don't think I should start mucking about in the database because my affected site is one of 40+ in a multisite install. I'm afraid I'd create more issues than I'd solve! But I am interested in resolving this, so let me know if there's anythng else I can do that would be helpful.

  20. Peter Le C
    Member
    Posted 1 year ago #

    Hi Ben ;-)

    <So, the site that doesn't work - site x - what is different about it?>

    Content is the only variable.

    I vary the header widths of my blogs and sundry decorative items to try and reduce sameness with the Great Google, but the blogs run with exactly the same plugins, exactly the same WP and i just use FireFox as my browser when doing any WP work.

    I thank you for the mySql screenshot, here in Moldova ( Eastern Europe) it's getting late, I've had a drink and that combination is a no no for the obvious reasons! I'll check tomorrow! Thanks for your help!

    ;-)

    Peter

  21. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    I don't think I should start mucking about in the database because my affected site is one of 40+ in a multisite install. I'm afraid I'd create more issues than I'd solve! But I am interested in resolving this, so let me know if there's anythng else I can do that would be helpful.

    Oh- hang on - Peter is yours also a Multisite install? Or individual installs?

    @bethannon1 - Yes If you are running multisite, dont do what I mentioned above, or it will wipe for all the sites the GA settings!

    So GA is working for most of your sites on the same MU site, yea? apart from just one

  22. Peter Le C
    Member
    Posted 1 year ago #

    Ben all my installs are individual.

    All working apart from the one. I am serious when i say my sites are simple replicated ones that earn be $30-50 a day every day so I keep it simple. Same boring settings... don't mend what isn't broken premise!

    Best Regards

    Peter

  23. Bet Hannon
    Member
    Posted 1 year ago #

    Just the one site in this multisite install is having GA issue.

  24. tommcgee
    Member
    Posted 1 year ago #

    I changed line 224 in /plugins/google-analyticator/class.analytics.stats.php from

    'ga:' . $this->accountId,

    to this:

    $this->accountId,

    And the error messages have gone away. The analytics code still appears on the pages; we'll see tomorrow whether the reports are still working the way they should.

  25. Selif
    Member
    Posted 1 year ago #

    @tommcgee I just tried that fix and I'm still getting this error:

    GA is working fine in all of my other blogs. They're all hosted on the same server (though they're individual installs. The only real difference with this one is that it's a subdomain and the others aren't. Could that be messing things up somehow?

    Fatal error: Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Ablog.peculiarplace.com&start-date=2012-08-18&end-date=2012-09-17&metrics=ga%3Avisits&dimensions=ga%3Adate&sort=ga%3Adate: (400) Invalid value 'ga:blog.peculiarplace.com'. Values must match the following regular expression: 'ga:[0-9]+'' in /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php:66 Stack trace: #0 /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(177): Google_REST::execute(Object(Google_HttpRequest)) #2 /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/google-analyticator/google-api-php-client/src/contr in /home/peculiarblog/blog.peculiarplace.com/wp-content/plugins/google-analyticator/google-api-php-client/src/io/Google_REST.php on line 66

  26. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi All,

    I believe I've been able to figure out the problem here, and it being an old variable used in 6.2 and the old system.

    Working on a fix now. Should be up in a couple hours!

    Ben

  27. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Please update to latest version and let us know if it's fixed the problem!

    Ben

  28. Peter Le C
    Member
    Posted 1 year ago #

    Updated and sorry to say, no cigar:>

    Fatal error: Uncaught exception 'Google_AuthException' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php:279 Stack trace: #0 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array) #1 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php(216): Google_OAuth2->refreshToken('1/GANsPbyDZFm_5...') #2 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/service/Google_ServiceResource.php(166): Google_OAuth2->sign(Object(Google_HttpRequest)) #3 /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_AnalyticsService.php(54): Google_ServiceResource->__call('list', Array) #4 /home/dirtytal/publi in /home/dirtytal/public_html/very/wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 279

  29. Peter Le C
    Member
    Posted 1 year ago #

    Cancel that.
    I hit reset after doing the update that sorted it.
    Now working on all my blogs ;-)
    Thanks for your perseverance! Hopefully all input helps.

    Best regards

    Peter

  30. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Good to hear Peter!

    If you wouldn't mind, would you go to the plugin page and under compatibility, select "Works"

    Will mark this as resolved, as it was originally your post!

    cheers,
    Ben

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.