[Flask] wrong response sent to client

Corey Boyle coreybrett at gmail.com
Tue Sep 20 07:59:06 EDT 2022


I don't know where to start with this issue.

I am using Nginx -> UWSGI -> FLASK

I have had users report that they clicked on a link for one page, but
got the wrong page in response, and that after this, they were logged
in as someone else.

It seems like the server sent them the wrong response.

Unfortunately, this only happens on occasion and I don't know how to
trigger it in my dev environment.

Seems like it is probably related to threading in some way, but not
sure how to even start.

I did setup Sentry.io a few weeks ago, and noticed that Flask is
throwing "AssertionError: Popped wrong request context." messages,
maybe one a day, but I am not sure if that is related.

Any thoughts?


More information about the Flask mailing list