2

I'm trying to sync Google Calendar over OAuth2 using org-caldav. However, when I execute M-x org-caldav-sync, the following error occurs:

*Messages*:

Contacting host: www.googleapis.com:443
json-read: End of file while parsing JSON

I can't seem to figure out which process is parsing JSON. Even when I set org-caldav-debug-level to 2, the debug buffer only displays a syncing message:

*org-caldev-debug-buffer*:

========== Started sync

The only thing which has happened is the creation of an empty appointments.org file.

Is there a way to solve this, or debug what is going wrong?

This my init config (I've added the OAuth providers after reading this closed ticket):

(use-package org-caldav
  :config
  (setq org-caldav-oauth2-providers
        '((google
           "https://accounts.google.com/o/oauth2/v2/auth"
           "https://www.googleapis.com/oauth2/v4/token"
           "https://www.googleapis.com/auth/calendar"
           "https://apidata.googleusercontent.com/caldav/v2/%s/events"))
        org-caldav-url 'google
        org-caldav-oauth2-client-id "xxx"
        org-caldav-oauth2-client-secret "xxx"
        org-caldav-calendar-id "xxx"
        org-caldav-inbox "~/org/calendar/appointments.org"
        org-caldav-files '("~/org/calendar/org-caldav.org")))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.