Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Troubleshooting

Gaelan Lloyd edited this page Dec 12, 2016 · 4 revisions

GAPI: Failed to authenticate user.

PHP Fatal error:  Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "{
 "error": "invalid_grant",
 "error_description": "Bad Request"
}
"' in /home/gaelan/git/laika/gapi.class.php:662
Stack trace:
#0 /home/gaelan/git/laika/gapi.class.php(54): gapiOAuth2->fetchToken('web-reporting@b...', 'client_secrets....', NULL)
#1 /home/gaelan/git/laika/fetch.php(119): gapi->__construct('web-reporting@b...', 'client_secrets....')
#2 {main}
  thrown in /home/gaelan/git/laika/gapi.class.php on line 662

Solution

Ensure that the system's clock is synchronized using NTP. If the system clock is too far out of sync, GAPI authentication will fail.


GAPI: User does not have sufficient permissions for this profile.

PHP Fatal error:  Uncaught exception 'Exception' with message 'GAPI: Failed to request report data. Error: "User does not have sufficient permissions for this profile."' in /home/gaelan/git/laika/plugins/gapi.class.php:208

Solution

Ensure that you have added the Google service reporting user to the Google Analytics property. shown in the error, and that you have given that reporting user the appropriate permissions.


Chart series labels are missing.

Solution

If the $sitesAsSeries parameter of getData() is TRUE, be sure to also pass $sitesAsSeries = TRUE to writeReport().

Clone this wiki locally