Hello Jun,

A jsessionid cookie simply stores a hash, it cannot by itself cause a 
crash. 

What's happening is that the hash is taken from the cookie, and used to 
look up the Entity representing the user in the memcache/datastore. You 
probably changed the user data model between v15 and v17, so when the user 
data is pulled out of the datastore, App Engine is unable to deserialize 
into the model that it's expecting, and errors out.

What I would do is add an additional entry to your Users model, listing the 
version of the application that the User entity was created under. Then do 
an equality test when the user hits your application: If the user's data 
model and the current application code are identical (ie v15/v15 or 
v17/v17), then everything's OK. Let the user pass. If the data model was 
created under v15 and the current application is v17, delete the cookie, 
delete the user entity, and kick the user out to a login page. 

Second way: Rewrite your home page to be entirely static; just a .html 
file, not a .jsp or servlet (this prevents AppEngine from processing 
anything, since instances don't handle static assets). Insert Javascript 
code to access and delete all cookies (you can do this via 
document.cookie). Users will have to click to another page to login.

Third way: Change your user data model to be identical under v15 and v17. 
(Also known as the less fun way.)

-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

@GOV on AppDotNet: https://alpha.app.net/gov


On Friday, April 12, 2013 10:45:45 AM UTC-5, Jun Ho Huh wrote:
>
>
> Hi all,
>
> We are having trouble transitioning from an old version of the code (v15) 
> to a newer version (v17). If a user is logged in (we use our own User 
> model, not one provided by GAE) to v15, and when we make v17 the default 
> version, the logged in user gets Internal Server 500 error when they try to 
> access our website. If the user is not logged in, then this issue does not 
> exist when we transit to v17.
>
> We noticed that the issue has something to do with the jsessionid cookie 
> which gets created and updated when user logs into our website. We know 
> this because if we delete this cookie (when a user is logged in) and change 
> it to v17, the error 500 doesn't appear. So something is crashing 
> internally when it tries to bring back the session information from the old 
> cookie that was created through v15. And this problem disappears when the 
> user is logged out: so the problem only exists for users who are logged in 
> through v15 (so when they come back they go straight to the logged in 
> state) and gets exposed to v17 while the session cookie captures their 
> logged in state.
>
> It's a hard problem to solve (and we've been spending weeks on this) 
> because nothing gets logged on GAE admin console, and we couldn't reproduce 
> the problem in localhost (i.e., switching back and forth between different 
> versions that we get from our SVN server). There's no information that is 
> useful for us to see what might be causing this to happen, and this issue 
> is stopping us from going to the updated version of the website.
>
> Has anyone ever encountered this kind of problem, and figured out 
> workarounds?
>
> Any kind of help would be much appreciated.
>
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to