-
Notifications
You must be signed in to change notification settings - Fork 17
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
Transient Session Token Errors #295
Comments
Looking into this a little @cassidysymons and yeah I see in the implementation that the token can expire before the session when page is left open. microsetta-interface/microsetta_interface/implementation.py Lines 881 to 888 in 9ce12d1
I'm curious what the participant was exactly doing to cause this? Maybe there's a part where the token isn't being set in the session? You said were able to recreate this error on few different paths? |
@ayobi I haven't been able to recreate it, but I haven't actively tried to recreate it yet. The interesting thing is that in these cases, the user isn't being logged out, they're hitting code that expects the token to be there and it's not. Below, I've copied all of the tracebacks from the log where this happened, which perhaps might provide a hint of where to look next. I redacted unique account/source IDs from the log entries but they're irrelevant to the errors. One other point that I'm not sure is causative or correlative is that this doesn't seem to have happened before the 2023.8 release. We changed a lot of code with that release and I know we expanded our usage of the session scope, but I didn't observe this error during testing on our staging server before the release (but it's a transient and infrequent error, so not observing it doesn't mean much).
|
Ah ok, this was a good exercise to get more familiar with the code base. I looked through some of the changes and see that there's some additions that look like they're attached to some of the filepaths that are in the logs you added. I know you mentioned it might not be the filepath but I found it curious that all the logs mention filepaths that had new code in the new release. Two that jump out that I've noticed additions/changes on are the ffq and the consent/reconsent. microsetta-interface/microsetta_interface/implementation.py Lines 831 to 846 in 9ce12d1
microsetta-interface/microsetta_interface/implementation.py Lines 1088 to 1111 in 9ce12d1
I'll continue playing but it may take some time to truly diagnose the issue. |
Since re-launch, I've observed a few instances of transient exceptions where the "token" key doesn't exist in the session scope. My initial suspicion was it was a situation where browsers were left open, sessions expired, and there was some scenario where the expiration wasn't handled gracefully. However, there was an error yesterday where the participant was actively using the system, the exception occurred, then they went on using the system successfully.
The exception has occurred on a few different paths - registering an FFQ, reconsenting, and viewing a signed consent - so it doesn't seem to be a path-specific issue. This is not high-urgency, as in all instances, the users have been able to continue using the system. However, I plan to look into potential causes and resolution after clearing the list of development tasks necessary for hard launch.
The text was updated successfully, but these errors were encountered: