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

Fedora 21 - Can't get past: "Type in the received code:" #91

Open
philiprhoades opened this issue Feb 22, 2015 · 2 comments
Open

Fedora 21 - Can't get past: "Type in the received code:" #91

philiprhoades opened this issue Feb 22, 2015 · 2 comments

Comments

@philiprhoades
Copy link

gsync will be perfect for me if I can get it working! - Many thanks for doing it!

I see there is a forward slash as the second character in the code - could that be causing the problem?

Thanks,

Phil.

@bdklahn
Copy link

bdklahn commented Mar 2, 2015

I think I might be encountering the same issue.
I, actually, cloned the git repo into git/gsync (to have the latest code), then installed on my PC-BSD (FreeBSD) system with:
sudo pip install -e git/gsync

I enter the retrieved token and the prompt returns after:
gsync --authorize
. . . and I see the .gsync config directory is created.

When I run gsync, as below, I get prompted again with:
"Authorization is required to access your Google Drive."

gsync -vr drive://a_folder /full/path/to/local/folder

After getting and entering another code, I get the same prompt again.

I put a print statement to verify the token text gotten from raw_input() was what I had typed in, because I swear I had some issue with that in the past (strange characters, or cut and paste issues, or . . .). But it was what I had entered.

I wondered if you hit your limit on your Google API key, so I enabled the drive API in my developer's console, and created my own key. I downloaded and copied to client.json, in .gsync. But I still got the same error.

Another thing: .gsync/credentials is an empty file. If the authorization is successful, shouldn't that "cache" info?

@x09
Copy link

x09 commented May 21, 2015

i have same problem too.

DEBUG: FlowExchangeError('invalid_grantCode was already redeemed.',): invalid_grantCode was already redeemed.
DEBUG: FlowExchangeError('invalid_grantCode was already redeemed.',): File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/EGG-INFO/scripts/gsync", line 82, in main
Crawler(src, dest).run()
File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/crawler.py", line 76, in init
info = self._drive.stat(self._dst)
File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 668, in stat
ents = self._query(parent_id=parent_id)
File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 49, in wrapped_f
return Retrying(_dargs, *_dkw).call(f, _args, *_kw)
File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 212, in call
raise attempt.get()
File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "/usr/lib/python2.6/site-packages/retrying-1.3.3-py2.6.egg/retrying.py", line 200, in call
attempt = Attempt(fn(_args, *_kwargs), attempt_number, False)
File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 936, in _query
with self.service() as service:
File "/usr/lib64/python2.6/contextlib.py", line 16, in enter
return self.gen.next()
File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 347, in service
credentials = self._obtain_credentials()
File "/usr/lib/python2.6/site-packages/gsync-0.1.14-py2.6.egg/libgsync/drive/init.py", line 491, in _obtain_credentials
credentials = flow.step2_exchange(code)
File "/usr/lib/python2.6/site-packages/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/usr/lib/python2.6/site-packages/oauth2client/client.py", line 2014, in step2_exchange
raise FlowExchangeError(error_msg)

gsync: invalid_grantCode was already redeemed.
gsync error: FlowExchangeError at drive(491) [client=0.1.14]

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

3 participants