Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add new calendar IDs without the process failing ("API call to calendar.events.list failed with error: Sync token is no longer valid, a full sync is required.") #3

Open
Etheride opened this issue Aug 23, 2022 · 5 comments
Assignees
Labels
bug Something isn't working help-wanted Extra attention is needed

Comments

@Etheride
Copy link

Etheride commented Aug 23, 2022

Hello!

I would like to use this script to sync between Notion and GCal however there are issues when I try to add a new calendar ID to CalendarID.js such as the script fails to execute once I add a new Calendar ID as the error "10:13:20 AM Error
Error: API call to calendar.events.list failed with error: Sync token is no longer valid, a full sync is required.". I do not know how to patch this as I am not profficient in JS.

Would it be possible for you to add me on discord as I would like help with another issue :P
ether#9925

The Stack Trace is

Error: API call to calendar.events.list failed with error: Sync token is no longer valid, a full sync is required.
syncFromGCal	@ main.gs:143
main	@ main.gs:30

The calendar ID constants is below

  /* Add calendars here. 
  The key (string before ':') is what you name the calendar. 
  The value (string after ':') is the calendar ID. 
  E.g. "My calendar name"]: "mycalendarid", */
  ["Primary"]: "primary",
  ["Birthdays"]: "addressbook#[email protected]",
};

@hk21702 hk21702 added the bug Something isn't working label Aug 23, 2022
@hk21702 hk21702 self-assigned this Aug 23, 2022
@hk21702
Copy link
Owner

hk21702 commented Aug 23, 2022

I was able to replicate this issue. The birthday calendar you're using seems to be one of the autogenerated ones made by Google. I'll look into how to handle it later when I can, but from initial testing it seems like for some reason these kinds of calendars are treated differently by the Google Calendar API.

@Etheride
Copy link
Author

The same thing occurs with Google Classroom's calendar as well

@hk21702
Copy link
Owner

hk21702 commented Aug 23, 2022

Yea, it seems like any of the auto generated calendars such as birthdays or public holidays won't work. It's not even the fact that the calendar is read only since the call fail is just at trying to list all the events in the calendar. This might be a limitation of the API itself to be honest unfortunately. I'm not sure about the case for Google Classroom's calendar. That may also count as an auto generated calendar, but I haven't checked for myself.

@hk21702 hk21702 added the help-wanted Extra attention is needed label Aug 23, 2022
@hikarizun
Copy link

hikarizun commented Dec 24, 2022

Hi! I've been using this script and it worked fine for the past month. But recently I've been getting this same error message:

Error: API call to calendar.events.list failed with error: Sync token is no longer valid, a full sync is required.
syncFromGCal @ main.js.gs:183
main @ main.js.gs:38

I only have very rudimentary knowledge of coding, so I don't know how to perform this full sync. Hope you can assist!

@hk21702
Copy link
Owner

hk21702 commented Dec 25, 2022

@hikarizun Please look at #45. In the future, please don't comment on unrelated issue threads and instead make a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants