Getting 500 Error processing OAuth 2 request sometimes before requesting access token.

4,626 views
Skip to first unread message

Aditya Hajare

unread,
Sep 14, 2011, 10:02:12 AM9/14/11
to oauth2-dev
I'm getting following error sometimes after user have clicked allow
access button.. i.e. before requesting access token.
Error Response from google server :
HTTP/1.0 500 Error processing OAuth 2 request Cache-Control: no-cache,
no-store, max-age=0, must-revalidate Pragma: no-cache Expires: Fri, 01
Jan 1990 00:00:00 GMT Date: Wed, 14 Sep 2011 13:33:34 GMT Content-
Type: text/html; charset=UTF-8 X-Content-Type-Options: nosniff X-Frame-
Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE
Error processing OAuth 2 request
Error 500

I have tried with many different gmail accounts and same error is
returned sometimes. It does not occur regularly.
Kindly Help. Cheers!

Marius Scurtescu

unread,
Sep 14, 2011, 10:43:39 AM9/14/11
to oauth...@googlegroups.com
Hi,

Are you seeing this error when swapping the authorization code? Not
sure what flow you are using.

Thanks,
Marius

Aditya Hajare

unread,
Sep 14, 2011, 9:52:46 PM9/14/11
to oauth2-dev
Yes that is when i'm seeing it.
I've followed this documentation : http://code.google.com/apis/accounts/docs/OAuth2.html
Thanks and Cheers!

David Primmer

unread,
Sep 15, 2011, 12:11:15 AM9/15/11
to oauth...@googlegroups.com
Hello,

We appreciate your help debugging this. Is it possible for you to send
the url that is in the address bar when you are on the approval page?
I know by the time you get the 500 it's probably too late to get the
url, but if all your requests are the same, it will help narrow it
down a little.

davep

Aditya Hajare

unread,
Sep 15, 2011, 1:05:18 AM9/15/11
to oauth2-dev

David Primmer

unread,
Sep 15, 2011, 3:04:16 PM9/15/11
to oauth...@googlegroups.com
Hi again,

I've tried those URLs a few times and I can't seem to reproduce your
issue. Are you doing anything odd like doing lots of these same
requests very quickly? Or maybe doing lots of grants with no revokes?
If you see the issue again, please respond quickly and we might be
able to catch it in our logs.

davep

Leo Zhu

unread,
Sep 18, 2011, 10:27:22 PM9/18/11
to oauth...@googlegroups.com
I am facing the same issue.
And someone else in this thread: https://groups.google.com/forum/#!topic/oauth2-dev/NOg-bzxhT1I


I can get the access token if I redo the request to https://accounts.google.com/o/oauth2/token


Aditya Hajare

unread,
Sep 20, 2011, 11:54:10 PM9/20/11
to oauth2-dev
Hello David,
There are same requests with approx 2 - 5 mins intervals.
Another thing is i'm granting permission without revoking old grants.
But the problem is, this happens even at the first time grants on
different gmail accounts.
Rite now i'm resending request to https://accounts.google.com/o/oauth2/token
if i get above error. These requests are sent after 1000ms delay (5
tries). Now it seems the problem has reduced to 20% - 30% but sure it
does occur 70% times.
You may check our logs because there has been many such errors i have
generated rite now. Thanks for all your help.
Cheers!

Aditya Hajare

On Sep 16, 12:04 am, David Primmer <prim...@google.com> wrote:
> Hi again,
>
> I've tried those URLs a few times and I can't seem to reproduce your
> issue. Are you doing anything odd like doing lots of these same
> requests very quickly? Or maybe doing lots of grants with no revokes?
> If you see the issue again, please respond quickly and we might be
> able to catch it in our logs.
>
> davep
>
>
>
>
>
>
>
> On Wed, Sep 14, 2011 at 10:05 PM, Aditya Hajare <adity...@gmail.com> wrote:
> > Hello David,
> > This is the url in approval page addressbar when 500 is encountered :
> >https://accounts.google.com/o/oauth2/auth?scope=https://www.google.co...
>
> > This is the url in approval page addressbar when everything is working
> > fine :
> >https://accounts.google.com/o/oauth2/auth?scope=https://www.google.co...

Aditya Hajare

unread,
Sep 24, 2011, 11:12:02 PM9/24/11
to oauth2-dev
Hello David,
After going through numerous codes and oAuth mechanisms several times,
i would like to ask you, does my website, google's server and user
being geographically in different places causing this error?
I think there might be some user data redundancy is caused in these
moments which is causing google's server to reject token. If above
cause is true then as far as i can guess, this is actually caused by
delay between requests due to geographical dispersion. Currently i
cannot think of any quick patch on this rather than just adding some
delay between repetitive requests to obtain access token. Still this
will fail 70% times.
You asked for my ip on 21st Sep. Did you get anything from it?
Thanks alot for all your time and concern. I strongly appreciate it.
Cheers!

P.S. If the problem i mentioned above is true then does google already
working on it? how long can we expect to get this issue fixed? Cheers!

Aditya Hajare

On Sep 16, 12:04 am, David Primmer <prim...@google.com> wrote:
> Hi again,
>
> I've tried those URLs a few times and I can't seem to reproduce your
> issue. Are you doing anything odd like doing lots of these same
> requests very quickly? Or maybe doing lots of grants with no revokes?
> If you see the issue again, please respond quickly and we might be
> able to catch it in our logs.
>
> davep
>
>
>
>
>
>
>
> On Wed, Sep 14, 2011 at 10:05 PM, Aditya Hajare <adity...@gmail.com> wrote:
> > Hello David,
> > This is the url in approval page addressbar when 500 is encountered :
> >https://accounts.google.com/o/oauth2/auth?scope=https://www.google.co...
>
> > This is the url in approval page addressbar when everything is working
> > fine :
> >https://accounts.google.com/o/oauth2/auth?scope=https://www.google.co...
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages