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

Gcal is stuck infinitely in 'Fetching List of Calendars...` #6

Closed
nikitavoloboev opened this issue Jun 22, 2018 · 6 comments
Closed

Comments

@nikitavoloboev
Copy link

I think it started happening after I ran Clear Cached Calendars & Events.

Now if I run gcal I get this:
2018-06-22 at 18 48

And this lasts for multiple minutes with no resolving.

Here is what Debugger shows during it:

[2018-06-22 18:49:17][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:17][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:17][STDERR: input.scriptfilter] 18:49:17 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:17 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:17 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:17 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:17 cmd_events.go:43: 0 active calendar(s)
18:49:17 feedback.go:431: Sent 1 result(s) to Alfred
18:49:17 workflow.go:790: ---------------------- 6ms -----------------------
[2018-06-22 18:49:17][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}
[2018-06-22 18:49:17][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:17][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:17][STDERR: input.scriptfilter] 18:49:17 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:17 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:17 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:17 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:17 cmd_events.go:43: 0 active calendar(s)
18:49:17 feedback.go:431: Sent 1 result(s) to Alfred
18:49:17 workflow.go:790: ---------------------- 5ms -----------------------
[2018-06-22 18:49:17][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}
[2018-06-22 18:49:18][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:18][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:18][STDERR: input.scriptfilter] 18:49:18 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:18 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:18 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:18 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:18 cmd_events.go:43: 0 active calendar(s)
18:49:18 feedback.go:431: Sent 1 result(s) to Alfred
18:49:18 workflow.go:790: ---------------------- 5ms -----------------------
[2018-06-22 18:49:18][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}
[2018-06-22 18:49:18][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:18][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:18][STDERR: input.scriptfilter] 18:49:18 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:18 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:18 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:18 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:18 cmd_events.go:43: 0 active calendar(s)
18:49:18 feedback.go:431: Sent 1 result(s) to Alfred
18:49:18 workflow.go:790: ---------------------- 4ms -----------------------
[2018-06-22 18:49:18][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}
[2018-06-22 18:49:18][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:18][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:18][STDERR: input.scriptfilter] 18:49:18 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:18 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:18 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:18 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:18 cmd_events.go:43: 0 active calendar(s)
18:49:18 feedback.go:431: Sent 1 result(s) to Alfred
18:49:18 workflow.go:790: ---------------------- 4ms -----------------------
[2018-06-22 18:49:18][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}
[2018-06-22 18:49:19][input.scriptfilter] Queuing argument ''
[2018-06-22 18:49:19][input.scriptfilter] Script with argument '' finished
[2018-06-22 18:49:19][STDERR: input.scriptfilter] 18:49:19 gcal.go:301: [env] SCHEDULE_DAYS=5
18:49:19 gcal.go:301: [env] EVENT_CACHE_MINS=15
💜
18:49:19 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
18:49:19 gcal.go:233: command=events, calendarID=, query=, startTime=2018-06-22 00:00:00 +0200 CEST, endTime=2018-06-23 00:00:00 +0200 CEST, dateFormat=
18:49:19 cmd_events.go:43: 0 active calendar(s)
18:49:19 feedback.go:431: Sent 1 result(s) to Alfred
18:49:19 workflow.go:790: ---------------------- 5ms -----------------------
[2018-06-22 18:49:19][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "12ODY56BVP4PEAYJN27GMPAI"
  },
  "rerun": 0.3,
  "items": [
    {
      "title": "Fetching List of Calendars…",
      "subtitle": "List will reload shortly",
      "valid": false,
      "icon": {
        "path": "icons/reload.png"
      }
    }
  ]
}

I tried to uninstall Gcal and install it again thinking that may solve this but the issue is still there. I am not sure perhaps I have to reauthorise the workflow? But not sure how to do that either.

Thank you for any help.

@nikitavoloboev
Copy link
Author

Want to also note that same thing happens when I run gcalconf -> Active Calendars:
2018-06-22 at 18 57

It seems to never resolve.

@deanishe
Copy link
Owner

You can't see the error in the debugger because the update happens in the background.

Use gdate worfklow: and open the log file. You could also try deleting the cache the same way to log you out: it's possible the access token has expired.

@nikitavoloboev
Copy link
Author

nikitavoloboev commented Jun 22, 2018

I get this error there:

21:59:06 [update] reloading calendars…
21:59:06 [ERROR] couldn't load calendars: Get https://www.googleapis.com/calendar/v3/users/me/calendarList?alt=json: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error" : "invalid_grant",
  "error_description" : "Bad Request"
}
21:59:06 Get help at https://github.com/deanishe/alfred-gcal/issues

I ran Clear Cached Calendars & Events multiple times. Same error.

@nikitavoloboev
Copy link
Author

nikitavoloboev commented Jun 22, 2018

Oh okay, delcache in workflow: magic argument solved this. Thank you.

@nikitavoloboev
Copy link
Author

Perhaps it would be nice to inform the user in Alfred if there is Bad Request error happening and offer a solution.

@deanishe
Copy link
Owner

Added #7

Not sure of the best way to handle it. In that particular case, it might be best to simply delete the tokens and force re-authentication.

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

No branches or pull requests

2 participants