[appengine-java] Re: Session/Cookie problem with redirect

2011-10-06 Thread Miguel
I am really interested in oauth authentication. Can you post pieces of your code to explain how did you do to integrate with the GAE session? Thank you On Aug 29, 6:12 pm, Anders blabl...@gmail.com wrote: I think I have solved it now. The application passed an object from a third party library

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-29 Thread Anders
I checked the response headers (in Google Chrome). When the redirect fails, then no cookie is set in the response header. Curious how this only happens sometimes. The sign in is a redirect from another redirect. First the sign in goes to a Twitter OAuth sign in page, then it's redirected back

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-29 Thread Anders
Hmm... It seems that an OAuth call to a third party API sometimes throws a null pointer exception. Looks like a tricky bug, but probably not something that has to do with GAE (except if there is some server clock sync issue or something like that). -- You received this message because you are

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-29 Thread Anders
I think I have solved it now. The application passed an object from a third party library in a GAE session attribute. Sometimes when the object was retrieved from the session attribute it didn't work (often it worked but not always)! Now the application creates a new instance instead of passing

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I found something. Maybe not significant but could be. I saw in the log that two of the last sign ins that failed had a call to /_ah/warmup just prior to them. With the log text: This request caused a new process to be started for your application, and thus caused your application code to be

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Simon Knott
You're not placing anything in your session which isn't serializable are you? Given that everything seems to be failing when it's starting up a new instance, which is when it will attempt to read the session out of the datastore/memcache, it may be that it can't deserialize your data. --

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Mike Lawrence
have you tried viewing the http headers in each request using chrome, firebug, httpwatch, etc? sunshine is the best disinfectant I dont think redirects normally can set cookies maybe the prod server is striping your invalid host headers on a redirect On Aug 28, 7:32 am, Simon Knott

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
The object put into the session is serializable. The production server will throw an exception if the session is attempted to be set with a non-serializable object. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I haven't checked the http headers yet. The tricky thing is that it usually works fine even on the production server! It could be that I set the cookie in a non-standard way, but the session attribute is that a cookie too (I don't know fully how GAE manages sessions)? On Sunday, August 28,

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I noticed that when the sign in doesn't work the redirect goes to / the root. I have looked and looked for where this can happen in the code, but there is no place where the redirect can be / (unless I have missed finding it in the code). Can the sendRedirect() sometimes cause a redirect to /

[appengine-java] Re: Session/Cookie problem with redirect

2011-08-27 Thread Anders
An additional detail is that I think the problem only appears after I recently have done a sign out. In the sign out the cookie age value is set to zero and the session attribute removed and then the session is invalidated (so the removal of the session attribute is redundant code but anyway