webapp
webapp copied to clipboard
New topic occasionally gets stuck on "no access to messages"
Describe the bug Occasionally, when creating a new topic group, the messages screen will be stuck on "no access to messages". This happens very occasionally on PC (<5% of the time for me) and goes away after a couple seconds. However, this seems to happen more often on mobile, and the screen never goes away on mobile (gets stuck permanently).
To Reproduce Steps to reproduce the behavior:
- Go to sandbox.tinode.co
- Create a new group
- You should get stuck on a "no access to messages" screen. If you don't, try repeating these steps again. At this point, the loading spinner should've disappeared, but the "no access to messages" screen is still there.
- When the component is refreshed (e.g. swapping to another chat and back, refreshing the page), the screen always disappears.
Expected behavior After creating a new group, it should not get stuck on the "no access to messages" screen. Rather than having to refresh, it should update automatically.
Screenshots
Here's what the console looks like when this bug happens on PC:
Here's what the console looks like when the bug doesn't happen:
Example video: https://github.com/tinode/webapp/assets/84942946/bae1c63b-ddec-425f-9b64-323395c1f576
The logs are not very useful in this case. It's probably a data race.
Also, when inviting someone else into a group, they sometimes appear as "unnamed" until the screen is refreshed. I think it's for a similar reason as this issue.