lemmy-ui
lemmy-ui copied to clipboard
[Bug]: Lemmy.ml - profile menu had another user's username
Requirements
- [X] Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
- [X] Did you check to see if this issue already exists?
- [X] Is this only a single bug? Do not put multiple bugs in one issue.
- [ ] Is this a server side (not related to the UI) issue? Use the Lemmy back end repo.
Summary
I just loaded the front page of lemmy.ml and in the top right where my username (drspod) usually appears, there was another user's username (glymfeather).
The page is not using my selected theme (dark mode) and when I click the username or notification button, nothing happens, which is what I usually experience if the page has not loaded correctly.
Loading the page again in a new tab fixed the issue and showed me my front page with my theme and username in top right.
Steps to Reproduce
- Load the front page of https://lemmy.ml
- The displayed page had been generated for a different user.
Technical Details
Javascript console contains:
Loading failed for the <script> with source “https://lemmy.ml/static/js/client.js”. lemmy.ml:510:54
Error: Promised response from onMessage listener went out of scope 12 init.js:75:34
in addition to some CSS errors and blocked cookie warnings.
Version
0.17.4
Lemmy Instance URL
lemmy.ml
It just happened again:
The posts in the feed appear to be my own subscriptions. It seems unlikely that the user whose name appears in the top-right is subscribed to the exact same communities as me. So the issue seems to be with putting incorrect user details in the top-right of the page, even though the feed was generated correctly (minus correct theme styling).
When I clicked the notifications button it took me to my own notifications page (correctly themed), so I was not able to view the other user's notifications. I don't know how this would be affected if the user had some active notifications that might create the popup toast text on the main page though.
Cannot reproduce in 0.18. If this continues to be a problem, please comment or reach out and we'll address it.
Hi @alectrocute I can confirm this has been an issue since I started using Lemmy.
I'll try to sign up for lemmy.ml since I tested on lemmy.world which is 0.17.4 still.
In this 2 minute clip of Ctrl+F5ing I was briefly:
- CountZero0 (long period of Ctrl F5 working fine)
- T-800
- fireweed
- Shuzen_chin
- Cory
This actually seems to have gotten worse today as on mobile I loaded a users' entire profile in Jerboa.
My lemmy.ml account just got approved. I can verify this is still occuring on 0.18.0. Let me grab video and I'll edit it onto this comment.
Edit:
Shows:
- chewy6982 (after a few attempts)
It seems to be significantly less common on lemmy.ml. I'm not sure if this is because of the version difference or resource load differences. It does
Thanks for the follow up. Reopening.
@alectrocute I can confirm #1641 did not resolve the issue (if it was released in 0.18.1)
Tested today on Lemmy.world
#1882 Potential solution is proposed here.
TLDR: Using JS Singleton may be causing the issue in conjunction with SSR. Storing UserService in react context may resolve this issue.
This happens to me frequently on lemmy.world -- I'd say more than 50% chance on any given page reload (more if this is the same bug that sometimes initially causes me to appear not to be logged in). I can reproduce it in the very latest version -- UI: 0.18.2 and BE: 0.18.2-1-g68276b2f9 as per the site footer.
What really made me notice this bug today is the way that it interacts with the user script LemmyTools, which provides a logged-in user with a sidebar containing a list of the communities to which the user is subscribed. The script fetches this information immediately after the initial page load, which means that whenever the bug hits I am left with a persistent list of some other random user's subscriptions (until I refresh the page). This seems like something that could have privacy implications -- although I understand that a lot of user information which is not exposed by the web UI can nevertheless be requested through the API used for federation, and thus isn't truly private. So perhaps nothing that is actually secret can be leaked in this way.
@alectrocute I can confirm #1641 did not resolve the issue (if it was released in 0.18.1)
Tested today on Lemmy.world
GIF image
I have a similar small bug that generally doesn't interfere with daily usage but concerns me with regard to privacy, where often I'd often see it looking like I'm logged out temporarily. But strangely, also showing a different username - this is also temporary and has only happened twice so far.
Last time I was able to find the user on the instance by loading his profile by typing in his name on the url (u/username), though this time it didn't seem to appear. I assume somehow a fake or suspended account showed up.
Hope this helps.
This happens on feddit.de, too:
https://feddit.de/post/6731353
This is still an issue, I'm on lemmy.ml. I can also click the other username and then interact with profile and settings. Did not click anything in the settings though, not sure if it would change mine or theirs.
This is happening to me for months now. It's showing another username for a short instant, before returning to my username. The problem seems to happen only on lemmy.ml, I haven't seen it on lemmy.world.
I believe this is fixed on main by this:
https://github.com/LemmyNet/lemmy-ui/blob/610789242bfd8ddf5749bd21ac81f206ae9bfca1/src/server/handlers/catch-all-handler.tsx#L145-L149
I haven't seen this bug again for a little while now, so it looks to have been fixed. Using lemmy.ml which is currently running 0.19.4