Roadmap Reveal 🗺 What's next for Rocket.Chat, Sep 22

Stream-notify-room subscription bug

Description

Hi, I found a (supposed) bug in the subscription to stream-notify-room in realtime api.

I followed the instruction to subscribe to ‘typing’ (a event of stream-notify-room) but instead of receive ‘ready’ answer I receive ‘nosub’.

I used ddp lib that provides the unique subscription-id. The others parameters are in the format specified by the documentation (https://developer.rocket.chat/api/realtime-api/subscriptions/stream-notify-room).

Is it an error of RocketChat server or do I make a mistake? Thanks

Server Setup Information

Version of Rocket.Chat Server: 3.15.0

Operating System: Ubuntu 20.04.2

Deployment Method: snap

Number of Running Instances: 1

DB Replicaset Oplog: Enabled

NodeJS Version: 12.22.1

MongoDB Version: 3.6.14

Proxy: nginx

Firewalls involved: none

Any additional Information

To replicate the issue:

1 creation of ddp client using ddp lib

2 connection to server using ddp client

3 login with ddp client using ddp-login lib

4 register the guest (call to livechat:registerGuest)

5 send the first message that creates the room (call to sendMessageLivechat)

6 subscription

ddpClient.subscribe("stream-notify-room", [roomId+"/typing", false], () => { console.log("subscription"); } );   

7 listen to new message

Hi.

Before you do anything, please use the latest version of Rocket.Chat to test - you can easily spin up a docker instance. You are going to get asked to do that if you report a bug.

Test on that and see if you can replicate the issue.

Thanks John. I’ve update to the latest version (3.16.3) but the issue endures.

OK, think you opened this as a bug here:

In the issue you opened you mentioned this as well:

Expected behavior:

receive { msg: 'ready', subs: [ ' number ' ] }

Actual behavior:

receive { msg: 'nosub', id: ' number ' }

I need to try and get someone more knowledgeable than me to look. Please bear with me.

Hi John, yes it was me.
Also in the latest version (3.17.0) there is the same problem.
Thank you very much