This is still driving me nuts.  I have an app that works some of the
time and totally inexplicably fails other times.  When it fails it is
because it gets a new session_id value for every transaction with
web2py.

I have a table where I keep information created by the user during
their session.  They add to the table by clicking on a text field and
an AJAX call adds a item to the table with the session_id as a key.
The user is supposed to select all of the items in one place, then
they will be processed on another page.  When it gets a unique
session_id for every item added, there is no way for the user to "see"
any of their items at all.  The website completely fails.

I have tried storing sessions on the file system.  I tried storing
them in a table.  I do not store anything in the session variable
except an integer and a string.  All other data is kept in a table
referenced by the session_id, to prevent pickling problems.

It almost seems as though the site cannot make a *new* cookie on my
browser.  If I already have a cookie from web2py -- even if it is old
and for a different session -- the site works perfectly.  If I go to a
new computer or browser which has never seen the site before, it
fails.  If I have a friend try the site it fails.

I have WingIDE and I can start putting breakpoints around
session.connect() but this is sort of a hard bug to reproduce.  As
soon as I'm in the admin interface I have "logged on" and everything
works perfectly.  Once I have it working on a browser, it's really
REALLY hard to get it in the failing state again.

I fear it is a Heisenbug. (ref:http://en.wikipedia.org/wiki/
Unusual_software_bug#Heisenbug )

-- Joe B.

On Sep 1, 10:41 am, Joe  Barnhart <joe.barnh...@gmail.com> wrote:
> I have an application where I desperately need to track state while
> users navigate through the site.  For a variety of reasons it is not
> appropriate to force them to sign up, so Auth is turned off.  What I
> am finding is that the variable "response.session_id" takes on a
> unique value with every mouse click and AJAX send!
>
> Please tell me there is a simple way around this.  This is a very
> critical problem for my new site!
>
> Warm regards,
>
> Joe

Reply via email to