Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using threads blocks users from writing to groups in an iframe #35003

Open
marcin-dardzinski opened this issue Jan 22, 2025 · 1 comment
Open

Comments

@marcin-dardzinski
Copy link

Description:

I use Rocket.Chat iframe embedded in my app. Since 7.2.0 update I've noticed that using threads may cause users to lock out in group, when rocket chat is displayed in an iframe.

Steps to reproduce:

  1. Use an iframe integration with embedded layout
  2. Send a message to a private group
  3. Send a reply to your message (you or somebody else)
  4. Reload the page / iframe

Expected behavior:

User can chat with the group as usual.

Actual behavior:

User cannot write any messages in the iframe. All the icons at the bottom are greyed out. There is a big blue 'join' button but it doesn't work. Removing and adding a user to the group again solves the issue.

In a 'regular' Rocket.Chat website this user is able to write to the group, the issue only occurs in the iframe

Image

Server Setup Information:

  • Version of Rocket.Chat Server: 7.2.0
  • License Type: Community
  • Number of Users: ~7000
  • Operating System: Ubuntu
  • Deployment Method: docker on AKS
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v20.18.0
  • MongoDB Version: 5.0.30 / wiredTiger (oplog Enabled)

Client Setup Information

  • Desktop App or Browser Version: Google Chrome 132.0.6834.83
  • Operating System: Ubuntu

Relevant logs:

In the browser console I can see the following error

CachedChatSubscription.ts:124 Uncaught (in promise) TypeError: e.lr.getTime is not a function
    at e.mergeWithRoom (CachedChatSubscription.ts:124:60)
    at e.handleReceived (CachedChatSubscription.ts:25:15)
    at e.handleRecordEvent (CachedCollection.ts:230:26)
    at e.upsertSubscription (CachedChatSubscription.ts:129:15)
    at onSuccess (RoomOpenerEmbedded.tsx:59:28)

This points me to the following line of code

lm: subscription.lr ? new Date(Math.max(subscription.lr.getTime(), lastRoomUpdate?.getTime() || 0)) : lastRoomUpdate,
I can trace it back to the following api call api/v1/subscriptions.getOne?roomId=6790f0c1c1a08316ff047d9c which indeed has some date value there - looks like some date parsing is missing. I don't know if this is the cause of the error, but I don't get this logged after user is re-added.

Image

@reetp
Copy link

reetp commented Jan 22, 2025

As per the bug reporting guidelines you MUST test any issues on the latest code.

So at least 7.2.1 and preferably on 7.3-develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants