pimutils / vdirsyncer

📇 Synchronize calendars and contacts.

Home Page:https://vdirsyncer.pimutils.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vdirsyncer hangs on google re-authentication

merzak274j opened this issue · comments

I'm having trouble re-connecting Google after running vdirsyncer successfully for several years.

I deleted my token file and ran vdirsyncer discover

All is well and the URL for authorization appears but mentions there's an issue since my server does not have a built in web browser.

After assigning the redirect URI to the exact value in the auth link generated by vdirsyncer ( I noticed the port number changes every time ) I pulled the code from the URL as mentioned in #975 (comment)

However pasting the code into my ssh session has no effect, vdirsyncer hangs and I also noticed that there is no new authorized app in my google profile.

How can I debug this issue and was I supposed to delete the token file in order to re-authorize google to vdirsyncer ?

Any help would be greatly appreciated

Below is the output of pip freeze

aiohttp==3.8.3
aiohttp-oauthlib==0.1.0
aiosignal==1.3.1
aiostream==0.4.5
async-timeout==4.0.2
asynctest==0.13.0
atomicwrites==1.4.0
attrs==22.2.0
certifi==2021.10.8
charset-normalizer==2.0.11
click==8.0.3
click-log==0.3.2
click-threading==0.5.0
frozenlist==1.3.3
idna==3.3
importlib-metadata==4.11.0
multidict==6.0.4
oauthlib==3.2.0
requests==2.27.1
requests-oauthlib==1.3.1
requests-toolbelt==0.9.1
typing_extensions==4.0.1
urllib3==1.26.8
vdirsyncer==0.19.0
yarl==1.8.2
zipp==3.7.0

commented

How can I debug this issue and was I supposed to delete the token file in order to re-authorize google to vdirsyncer ?

Yeah, that's usually the right approach. I suspect vdirsyncer is trying to open the page on a browser on the remote machine, that fails, and that breaks.

I suggest setting it up on your local machine, and then copy that token file onto the remote machine via SSH. The current flow isn't really well suited for setting up remote machines.

Thank you for the reply.

your suggestion has worked, the issue may be closed.

As well I came to realize that it is not necessary to specify any port number in the URI, in case this helps other users.

Unless there is a problem with doing so, I suggest updating the docs to specify the URI as well as a call out explaining this workaround. Perhaps I’m not the only one that would like to run vdirsyncer headless.

thank you again for this program

commented

The docs have been updated, I just need to tag a new release: 2138c43