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

Invalid grant, Code is already redeemed while fetching gmail contacts in production. #133

Open
sumitsv21 opened this issue Apr 20, 2015 · 2 comments

Comments

@sumitsv21
Copy link

I got this unique problem where omnicontacts for gmail contacts fetching is working correctly in staging and development, but not in production. After much debugging, i found this internal error:
Invalid grant
Code is already redeemed

On seeing the production.log i m noticing that there are two get callback requests at the interval of 30s approx.

Started GET "/contacts/gmail" for ### at 2015-04-20 20:05:14 +0000

Started GET "/contacts/gmail/callback?code=4/5-ghyNx0qoiU8R-ZBoNCBLvc-93LG1dWcmmOf30KBWw.Use9bIzzg9QQcp7tdiljKKaHnN6wmQI" for ### at 2015-04-20 20:05:15 +0000
Started GET "/contacts/gmail/callback?code=4/5-ghyNx0qoiU8R-ZBoNCBLvc-93LG1dWcmmOf30KBWw.Use9bIzzg9QQcp7tdiljKKaHnN6wmQI" for ### at 2015-04-20 20:05:46 +0000

These two get callback requests are showing only in production and not in staging or development.
It should be a single get callback.

Due to the timeout set for 30s, it is killing the worker and i am redirected to the failure path with the above error.

@thomasgallagher
Copy link

I've had a report of this too, did you manage to diagnose the issue? Not sure where to start as my Google account seems to connect and disconnect without a problem.

@ritec
Copy link

ritec commented Oct 21, 2015

Did anyone figure this out? I am having a similar issue in development while working with the returned values with an ajax form. For some reason every time the submit button is pressed on my ajax form and I get a 200 OK back omnicontacts tries to reach gmail again?

Completed 200 OK in 27.2ms (Views: 6.8ms | ActiveRecord: 3.8ms) Error internal_error while processing /invites/gmail/contact_callback: { "error" : "invalid_grant", "error_description" : "Invalid code." }

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