After installing and setting up the API key and the OAuth via the Google Developer Console, the 500 Internal Server Error appears when you click on "Analytics" in the backend.
As described in the documentation, I created everything necessary in the Developer Console (API Key, OAuth, Analytics API activated). Then I added in my Settings.yaml applicationName, clientId, clientSecret, eveloperKey.
Linking the Google Account is not possible.
I test it on Neos 4.0 and 4.2. both times comes the error.
Exception #401 in line 66 of /srv/www/domain.de/Packages/Libraries/guzzlehttp/guzzle/src/Middleware.php: Client error:
POST https://www.googleapis.com/oauth2/v4/token` resulted in a 401 Unauthorized
response:
{
"error": "unauthorized_client",
"error_description": "Unauthorized"
}
59 GuzzleHttp\Exception\RequestException::create(GuzzleHttp\Psr7\Request, GuzzleHttp\Psr7\Response)
58 GuzzleHttp\Middleware::GuzzleHttp{closure}(GuzzleHttp\Psr7\Response)
57 GuzzleHttp\Promise\Promise::callHandler(1, GuzzleHttp\Psr7\Response, array|3|)
56 GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
55 GuzzleHttp\Promise\TaskQueue::run(true)
54 GuzzleHttp\Promise\Promise::invokeWaitFn()
53 GuzzleHttp\Promise\Promise::waitIfPending()
52 GuzzleHttp\Promise\Promise::invokeWaitList()
51 GuzzleHttp\Promise\Promise::waitIfPending()
50 GuzzleHttp\Promise\Promise::wait()
49 GuzzleHttp\Client::send(GuzzleHttp\Psr7\Request, array|1|)
48 Google\Auth\HttpHandler\Guzzle6HttpHandler::__invoke(GuzzleHttp\Psr7\Request)
47 Google\Auth\OAuth2::fetchAuthToken(Google\Auth\HttpHandler\Guzzle6HttpHandler)
46 Google_Client::fetchAccessTokenWithRefreshToken("1/m2Xj4Vd6VGVQbtgqN-FdN9HuAvWLo3-jOYNxrqdTLb0")
45 Google_Client::refreshToken("1/m2Xj4Vd6VGVQbtgqN-FdN9HuAvWLo3-jOYNxrqdTLb0")
44 Neos\GoogleAnalytics\Service\ClientFactory_Original::create()
43 Neos\GoogleAnalytics\Service\GoogleAnalytics::__construct()
42 Neos\Utility\ObjectAccess::instantiateClass("Neos\GoogleAnalytics\Service\GoogleAnalytics", array|0|)
41 Neos\Flow\ObjectManagement\ObjectManager::instantiateClass("Neos\GoogleAnalytics\Service\GoogleAnalytics", array|0|)
40 Neos\Flow\ObjectManagement\ObjectManager::get("Neos\GoogleAnalytics\Service\GoogleAnalytics")
39 Neos\GoogleAnalytics\Controller\ConfigurationController::Neos\GoogleAnalytics\Controller{closure}()
38 Closure::__invoke()
37 Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy::_activateDependency()
36 Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy::__call("requireAuthentication", array|0|)
35 Neos\GoogleAnalytics\Controller\ConfigurationController_Original::getGroupedProfiles()
34 Neos\GoogleAnalytics\Controller\ConfigurationController_Original::indexAction()
33 Neos\GoogleAnalytics\Controller\ConfigurationController::indexAction()
32 call_user_func_array(array|2|, array|0|)
31 Neos\GoogleAnalytics\Controller\ConfigurationController::Flow_Aop_Proxy_invokeJoinPoint(Neos\Flow\Aop\JoinPoint)
30 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
29 Neos\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(Neos\Flow\Aop\JoinPoint)
28 Neos\Flow\Aop\Advice\AroundAdvice::invoke(Neos\Flow\Aop\JoinPoint)
27 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
26 Neos\GoogleAnalytics\Controller\ConfigurationController::indexAction()
25 call_user_func_array(array|2|, array|0|)
24 Neos\Flow\Mvc\Controller\ActionController_Original::callActionMethod()
23 Neos\GoogleAnalytics\Controller\ConfigurationController_Original::callActionMethod()
22 Neos\Flow\Mvc\Controller\ActionController_Original::processRequest(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response)
21 Neos\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response)
20 Neos\Flow\Mvc\Dispatcher_Original::dispatch(Neos\Flow\Mvc\ActionRequest, Neos\Flow\Http\Response)
19 Neos\Neos\Controller\Backend\ModuleController_Original::indexAction(array|3|)
18 Neos\Neos\Controller\Backend\ModuleController::indexAction(array|3|)
17 call_user_func_array(array|2|, array|1|)
16 Neos\Neos\Controller\Backend\ModuleController::Flow_Aop_Proxy_invokeJoinPoint(Neos\Flow\Aop\JoinPoint)
15 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
14 Neos\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(Neos\Flow\Aop\JoinPoint)
13 Neos\Flow\Aop\Advice\AroundAdvice::invoke(Neos\Flow\Aop\JoinPoint)
12 Neos\Flow\Aop\Advice\AdviceChain::proceed(Neos\Flow\Aop\JoinPoint)
`