tinode / webapp

Tinode web chat using React
Apache License 2.0
315 stars 197 forks source link

New topic occasionally gets stuck on "no access to messages" #132

Open tandr3w opened 1 year ago

tandr3w commented 1 year ago

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:

  1. Go to sandbox.tinode.co
  2. Create a new group
  3. 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.
  4. 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: image

Here's what the console looks like when the bug doesn't happen: image image

Example video: https://github.com/tinode/webapp/assets/84942946/bae1c63b-ddec-425f-9b64-323395c1f576

or-else commented 1 year ago

The logs are not very useful in this case. It's probably a data race.

tandr3w commented 1 year ago

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.