RocketChat / RocketChat/Rocket.Chat
RC 5.4.8: Web UI not loading after OAuth login due to "uncaught promises"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I have a custom OAuth implementation. After logging in on the auth provider, I get redirected back to RC and hear the welcome sound, but I only see the three animated dots and do not get a chat interface.
Reloading the chat fixes the problem.
Steps to reproduce:
Not sure if this is reproducible with a plain RocketChat outside our special setup.
- Have a RocketChat instance with a custom OAuth provider (PHP-based, using league/oauth2-server as the base)
- Open the chat, click the button "Login via "
- Log in with the identity provider, get redirected back to the chat
- See the chat open, but breaking with the three animated dots
- The browser console shows uncaught exceptions in promises:

Expected behavior:
Chat opens normally.
Actual behavior:
Three animated dots, in the console I see uncaught exceptions within promises.
I tried tracing the exceptions to their unminified source, and I think it's these two places:
- https://github.com/RocketChat/Rocket.Chat/blob/cda0b40a3cea996f8a2f11723883f53ea44d6714/apps/meteor/app/notifications/client/lib/Notifications.js#L83
- somewhere in Meteor, in some part called "rocketchat:streamer"/client. The error occurs in in the subscribe() method in there:

I could unfortunately not find hat place within the code; I could, however, get the (probably not really helpful) stack trace from Chrome, see below.
Server Setup Information:
- Version of Rocket.Chat Server: 5.4.8
- Operating System: Ubuntu w/ Docker 23.0.3
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 14.19.3
- MongoDB Version: 5.0.16
- Commit Hash: cda0b40a3c
Client Setup Information
- Desktop App or Browser Version: Firefox 112 and Chrome 10x
- Operating System: Ubuntu 22.04
Additional context
Relevant logs:
Stacktrace from Chrome for the rocketchat:streamer error:
onStop @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1458
_livedata_nosub @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1366
onMessage @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1366
(anonymous) @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
forEachCallback @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
socket.onmessage @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
r.dispatchEvent @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
k._dispatchMessage @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
k._didMessage @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
o.ws.onmessage @ 63326d8399da4bede896e472cb4d732145c62c84.js?meteor_js_resource=true:1336
Contributor guide
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.
Research direction
Start with apps/meteor/app/notifications/client/lib/Notifications.js at the referenced line, then trace the client rocketchat:streamer subscribe() failure using the browser console and stack trace. Reproduce the custom OAuth redirect if possible; done means the chat interface loads normally after login without uncaught promise exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100