A nosub with an error deletes the subscription entry; one without keeps it
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, distributed-systems
Research direction
Start with ADR-0004 and trace the DDP response handling used by subscribe and subscribeAll, focusing on nosub messages with and without an error field. Compare the two bookkeeping paths against the reported driver behavior; done means the intended behavior is decided and either documented and pinned or consistently implemented.
Written by the indexing model from the issue text.
Description
What happens
The SDK never inspects msg === 'nosub'. The only discriminator on a DDP response is the presence of an error field, so the two refusal shapes a server can send take opposite paths through the subscription bookkeeping:
- A
nosubcarrying an error rejects thesendwith aDDPError, andsubscribeforgets the entry under that id (the ADR-0004 rule). - A
nosubwithout an error settles the wait as a success with nosubs, sosubscribewrites nothing new but also forgets nothing — an existing entry survives, unconfirmed.
Measured against the real driver: after an errored nosub both recorded entries were gone (subscribeAll re-sent nothing); after an errorless one both survived.
The real Rocket.Chat server sends the destructive shape. Meteor itself does not check auth on sub; the publication does, and Rocket.Chat's stream-notify-user rule is Boolean(this.userId) && this.userId === userId, which throws not-allowed and produces { msg: 'nosub', id, error: {...} }. The EE ddp-streamer behaves the same.
Question
Should the two shapes keep taking opposite paths? If the distinction is deliberate it deserves to be stated and pinned; if it is an accident of where the error field is read, the paths should be unified.
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/Rocket.Chat.js.SDK
-
refactor: delete the unused replaceLog and silence exports from lib/log.tsPossibly taken @ayushi-wq claimed this 81 days ago. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RocketChat/Rocket.Chat.js.SDK#380 · 1 comment ·
-
refactor: delete the unassigned messages and joinedIds fields on DriverPossibly taken @arbazkhan971 claimed this 68 days ago. Openbug ready-for-agent
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RocketChat/Rocket.Chat.js.SDK#379 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RocketChat/Rocket.Chat.js.SDK#308 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/Rocket.Chat.js.SDK#306 ·
-
bug
Difficulty 2/5 Half a day Newbie friendliness 78/100
RocketChat/Rocket.Chat.js.SDK#254 ·
All issues in RocketChat/Rocket.Chat.js.SDK
Similar issues
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPossibly taken @bardrop claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
codercops/discord-bot#152 ·
Maintainers usually reply within 1 day
-
bug i18n
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
endora-commerce/endora-commerce#1315 ·
Maintainers usually reply within 1 day
-
area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
enorm-labs/event-junkie#5136 ·
Maintainers usually reply within 1 day
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day