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

List of calendars not getting updated (requires --refresh to update the list) #622

Open
jason-mehmel opened this issue Dec 13, 2021 · 6 comments
Labels
Milestone

Comments

@jason-mehmel
Copy link

I've recently been given access to a new calendar as a reader in my Google Calendar account, but I'm not seeing it reflected in my Agenda.

I'm not sure how to update the calendars that gcalcli has access to. Do I need to recreate the API or anything to absorb the new calendar's access?

@ComedyTomedy
Copy link

Had the same problem just now. And I did recreate the API, which was silly. But the fix is actually very simple:

rm ~/.gcalcli_cache

@jason-mehmel
Copy link
Author

What happened after you ran that command?

After that removes the cache, does it basically just reset itself after when gcalcli runs again? Or did you have to reauthorize everything?

@ComedyTomedy
Copy link

No reauth, just runs as normal but fetching a fresh list of calendars etc. :)

@jason-mehmel
Copy link
Author

That worked great! Thank you!

@dbarnett dbarnett changed the title Adding / Updating Calendar access list? List of calendars not getting updated (requires deleting cache file to refresh the list) Sep 14, 2024
@dbarnett dbarnett added the bug label Sep 14, 2024
@dbarnett dbarnett changed the title List of calendars not getting updated (requires deleting cache file to refresh the list) List of calendars not getting updated (requires --refresh to update the list) Sep 14, 2024
dbarnett added a commit that referenced this issue Sep 16, 2024
Useful in the case of caching bugs like #622 (though note it's a workaround, not a fix).
@dbarnett
Copy link
Collaborator

This still needs a proper fix, but FWIW you can now run gcalcli util reset-cache to conveniently delete the cache files (at HEAD now or in upcoming 4.5 release).

@dbarnett
Copy link
Collaborator

For reference, I also discovered this is the reason sometimes calw/calm/etc seem to require different auth than list, because it can still show the calendar list from cache after auth is broken but other commands will get stuck needing authentication.

Along with better cache invalidation here, it might be worth showing warnings when gcalcli list is successfully showing a cached copy but detects it's lacking auth to refresh or do any especially useful operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants