myuhe / org-gcal.el

Org sync with Google Calendar
450 stars 113 forks source link

org-gcal-sync no longer working - change in Google's API program? #117

Open jandrusk opened 6 years ago

jandrusk commented 6 years ago

I noticed recently that org-gcal-sync has not been working as the minibuffer just sits trying to connect to www.googleapis.com:443.

I then went to the Google Developers page where I had my creds setup and couldn't find them anywhere and then noticed that they have a new Google Cloud Key Management section where they want you to setup a billing account.

Is this what we have to do to get syncing to function again?

DiogoFerrari commented 6 years ago

+1

uli6 commented 6 years ago

Same here

arnyeinstein commented 6 years ago

I don't know if this is the same issue, but I get the message: Could not contact remote service. Please check your network connectivity (a few months ago it worked fine

jandrusk commented 6 years ago

Looks like they changed the API changed and that org-gcal-sync needs to be updated to support the change.

DaoHuyTuan commented 6 years ago

same here

AlexLewandowski commented 6 years ago

I was able to get org-gcal-sync to work, but I'm unsure if billing information is required since I have it set-up for Google compute. Try searching for calendar here, and then set-up credentials again.

mtekman commented 6 years ago

@AlexLewandowski Awesome, I genuinely thought this was dead.

A few questions:

  1. Can you tell me what your calendar entries look like?

    • Do you use subheadings, or TODO keywords?
    • Are your timestamps in square or triangle brackets?
  2. Can you tell me what Eval: org-modules outputs?

Thanks in advance!

lkmokadam commented 5 years ago

It's working. https://www.reddit.com/r/emacs/comments/atjm9q/google_calendar_synchronization_with_orgmode/

arnyeinstein commented 5 years ago

Hi, I still don't get it working (partly due to the outdated documentation on google projects). I followed the instructions up to the letter, but still get Could not contact remote service. Please check your network connectivity. Any ideas are welcome Renger

englishm-llnw commented 5 years ago

I hadn't used org-gcal.el for a quite some time and when I recently tried to set it up again, I thought maybe I was running into an issue with possibly changed APIs as described here.

However, after reading through comments here and on reddit, I eventually found this helpful report from @dominic998 in the commends on another issue, which solved my problem:

I had this problem. To fix I evaluated (C-x C-e, just in scratch buffer): (org-gcal-request-token)

Which opened a google page in my browser, I signed in and entered the token I got on the page into the minibuffer as instructed. I hope that works for other people as well.

https://github.com/myuhe/org-gcal.el/issues/82#issuecomment-296931413

Cross-posting here in the hopes that it might help save time for someone else whose initial troubleshooting also brings them to this open issue.

If anything could be classified as a bug in my case it might just be this (from same comment above):

Perhaps org-gcal.el is not correctly recognising when it needs to ask google for authorisation again.


Note: I did notice some lines in *Messages* which looked like errors, but may have been the result of the state I had my debugger in at the time. After setting the token, and running M-x org-gcal-sync, my gcal.org was successfully re-generated.

The messages looked something like this (I've redacted anything that looked at all sensitive or unique):

#s(request-response nil nil nil nil nil "https://www.googleapis.com/oauth2/v3/token" nil (:type "POST" :data "client_id=REDACTED.apps.googleusercontent.com&client_secret=REDACTED&code=REDACTED&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&grant_type=authorization_code" :parser org-gcal--json-read :success #[REDACTED [org-gcal-token-plist org-gcal-token-file plist-member :data org-gcal--save-sexp] 5 "

(fn &key DATA &allow-other-keys)"] :error #[REDACTED [plist-member :error-thrown message "Got error: %S"] 5 "

(fn &key ERROR-THROWN &allow-other-keys)"] :url "https://www.googleapis.com/oauth2/v3/token" :response #0) #<buffer  *request curl*> nil nil curl ("/var/folders/mk/REDACTED/T/emacs-requestREDACTED"))
englishm-llnw commented 5 years ago

Re-reading the README more carefully now, I also noticed that there is an org-gcal-refresh-token and the README notes:

OAuth token expired in 3600 seconds, You should refresh token on a regular basis.

Having a hook to run that automatically, if needed ,before org-gcal-sync, might help.

bobberb commented 5 years ago

The community left this repo for

https://github.com/kidd/org-gcal.el/

And that repo is what MELPA currently references

telotortium commented 4 years ago

Hi everyone! This repository is obsolete - the actively developed fork is now https://github.com/kidd/org-gcal.el, which is also the "org-gcal.el" on MELPA (see #115). I'm one of the maintainers of https://github.com/kidd/org-gcal.el. I can't directly close issues or PRs on this repo, but please download https://github.com/kidd/org-gcal.el and see if your issue or PR is still applicable. If so, open an issue or PR on https://github.com/kidd/org-gcal.el. In any case, you should close your issue or PR in this repo.