I m facing this problem recently when I log in and after a while and suddenly I find myself connected with another user. for example I log in as administrator . after a while the user changes to another . name , profile , even permissions are changed , it’s like a literally logged with the other account . what is happening ?
+1
I am also facing. One of client complaining such behaviour.
An ABC user has no right for Purchase Module, though document shows commnet like ABC created and edited the document.
Hi,
Witch version of Frappe/ERPNext ?
Where are you hosted (VPS/frappecloud/Amazon, other)?
I faced this issue in both 12 and 13 . we are using our own servers to host our websites . it’s a normal ubuntu server with erpnext installed .
Hi there Bahaou, Currently i am facing the same issue in one of my system. Did you find the solution for this issue?
Hi @Suresh_Thakor I am facing the same issue with 2 of my system recently did you find any kind of solution for this, Let me know thanks!
Hi @bahaou I am facing the same thing now in 2 of my systems can you help me out with the solution or any method to avoid this issue! Please let me know thanks.
Hello. I actually didn’t find a solution and I left the company
. but I think latest versions are more stable so update your system if you using version 13 or 14
Hey there thanks for reverting back.
The sad part is its happening on Version 15 itself on 2 of the site’s version 14 is bit stable for me.
sorry I can’t help you . I didn’t find the reason for that problem . but for my second project I never faced that issue for 2 years now
No problem, Thanks
@Tuneachi I am sharing AI Summary, it may help in your next debug/ fix
Possible Causes & Workarounds
1. Cache/Session Management Issue
From https://discuss.frappe.io/t/frappe-session-user-returns-wrong-user-account-in-portal-pages/93583:
Solution for portal pages:
python
# Add this to EVERY .py file in www/ folder
no_cache = 1
Then run:
bash
bench clear-cache
2. Redis Session Cache Problem
Common patterns:
-
First user logs in → works fine
-
Second user logs in → gets first user’s session
-
Random switching during active sessions
-
Activity log shows:
"Logged into another session"
3. Possible Triggers
-
Proxy/VPN configurations
-
Load balancers (AWS, Azure)
-
Production mode (works fine in dev, breaks in production)
-
SSO configurations (Azure AD)
Edit: Additionally, If you are using custom app with some portal pages in www folder, check if no_cache = 1 is present or not
Also if you using proxy and load balancer, check how you passing headers.