kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
432 stars 47 forks source link

deferred error "oauth2-auto: Unknown provider: org-gcal" #209

Closed mfuchs1 closed 1 year ago

mfuchs1 commented 1 year ago

Hello,

org-gcal was working fine until now. I've updated org-gcal via melpa and I got this error message when running org-gcal-fetch or org-gcal-sync:

deferred error : (error "oauth2-auto: Unknown provider: org-gcal")

I'm using GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12

OS: Manjaro KDE 22.0.0

Thanks for your help.

telenieko commented 1 year ago

Try calling (org-gcal-reload-client-id-secret) after setting the org-gcal-client-** variables.

mfuchs1 commented 1 year ago

Yes, thank you! That did the trick. org-gcal is working again. I can fetch events from google calendar and post events from org-mode to google. It's even better - there are no

"Received HTTP 412 ETag stale for will averwirte this entry with event from server"

messages anymore. Thank you. I think you can close this issue.

telotortium commented 1 year ago

@mfuchs1 Did you see the warning "org-gcal: must set ‘org-gcal-client-id’ and ‘org-gcal-client-secret’ for this package to work. Please run ‘org-gcal-reload-client-id-secret’ after setting these variables."? I thought I detected this case here.

mfuchs1 commented 1 year ago

@mfuchs1 Did you see the warning "org-gcal: must set ‘org-gcal-client-id’ and ‘org-gcal-client-secret’ for this package to work. Please run ‘org-gcal-reload-client-id-secret’ after setting these variables."? I thought I detected this case here.

No, I didn't see this warning - I'm sorry. I've set the ‘org-gcal-client-id’ and ‘org-gcal-client-secret’ in my init.el - already before this new update. The ‘org-gcal-reload-client-id-secret’ resolved the issue.

telotortium commented 1 year ago

That's interesting, because with both ‘org-gcal-client-id’ and ‘org-gcal-client-secret’ set, ‘org-gcal-reload-client-id-secret’ should have automatically been called when the package was loaded (I just tested it, and I can confirm ‘org-gcal-reload-client-id-secret’ was called). Perhaps Melpa upgrades don't automatically re-evaluate the package somehow? I tend to upgrade in one of two ways, since I use Doom Emacs:

  1. Doom downloads and recompiles the files. Then, I usually restart Emacs.
  2. I make a change to org-gcal while developing and then call eval-buffer.