Google Service Exception when trying to add an Event

Created on 27 January 2025, 3 months ago

Problem/Motivation

I was trying to add a new event from my calendar and I jumped into this exception:

Google\Service\Exception: { "error": { "errors": [ { "domain": "calendar", "reason": "requiredAccessLevel", "message": "You need to have writer access to this calendar." } ], "code": 403, "message": "You need to have writer access to this calendar." } } in Google\Http\REST::decodeHttpResponse() (line 134 of /var/www/html/vendor/google/apiclient/src/Http/REST.php).

I am not really versed in the Google API Services, does anyone have any clue of how this could be fixed?

Here's the whole backtrace if anyone is interested

Backtrace	
#0 /var/www/html/vendor/google/apiclient/src/Http/REST.php(107): Google\Http\REST::decodeHttpResponse()
#1 [internal function]: Google\Http\REST::doExecute()
#2 /var/www/html/vendor/google/apiclient/src/Task/Runner.php(187): call_user_func_array()
#3 /var/www/html/vendor/google/apiclient/src/Http/REST.php(66): Google\Task\Runner->run()
#4 /var/www/html/vendor/google/apiclient/src/Client.php(967): Google\Http\REST::execute()
#5 /var/www/html/vendor/google/apiclient/src/Service/Resource.php(248): Google\Client->execute()
#6 /var/www/html/vendor/google/apiclient-services/src/Calendar/Resource/Events.php(150): Google\Service\Resource->call()
#7 /var/www/html/web/modules/contrib/google_calendar_service/src/CalendarEditEvents.php(187): Google\Service\Calendar\Resource\Events->insert()
#8 /var/www/html/web/modules/contrib/google_calendar_service/src/Form/CalendarEventForm.php(171): Drupal\google_calendar_service\CalendarEditEvents->addCalendarEvent()
#9 [internal function]: Drupal\google_calendar_service\Form\CalendarEventForm->save()
#10 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array()
#11 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
#12 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm()
#13 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
#14 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#15 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#16 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#17 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#19 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#20 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#22 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#25 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#26 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#27 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#29 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#30 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#31 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#32 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#33 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#34 {main}
🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada danrod Ottawa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024