RocketChat / RocketChat/Rocket.Chat

iOS app cannot login - server TypeError in sauMonitorHooks.ts during authentication

Open
#36,078 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

iOS app login fails with the error "Oops! Your credentials were rejected! Please try again."
This occurs even after successful initial authentication (username/password) and also after successfully entering a 2FA code (if Email 2FA is enabled). Server logs indicate a TypeError in sauMonitorHooks.ts during an onLogin callback, suggesting a server-side bug?

Steps to reproduce:
  1. Attempt to log in to the Rocket.Chat server using the iOS mobile application (v4.60.0, build 79289 on iOS 18.4.1)
  2. Enter credentials
  3. If Email 2FA is enabled for the user account, the app prompts for a 2FA code, and an email with the code is successfully received.
  4. Enter the 2FA code received
  5. The login attempt fails, and the iOS app displays the error message: "Oops! Your credentials were rejected! Please try again."
Expected behavior:

Successful login to the Rocket.Chat workspace via the iOS application.

Actual behavior:

The iOS application displays the error message: "Oops! Your credentials were rejected! Please try again."

Server Setup Information:
  • Version of Rocket.Chat Server: 7.6.0 (Latest)
  • License Type: Starter (Self Hosted)
  • Number of Users: 2
  • Operating System: Debian 12
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: v22.15.0
  • MongoDB Version:7.0.20
Client Setup Information
  • Desktop App or Browser Version: N/A - Issue specifically with the iOS mobile app
  • Operating System: iOS 18.4.1
Additional context
  • Login to the same server and user account works correctly via the web client and the Android mobile client.
  • Nginx reverse proxy access logs show HTTP 200 OK for POST /api/v1/login requests from the iOS client
  • The issue persists even after temporarily disabling all forms of 2FA
Relevant logs:

Server Logs:

Mai 15 12:39:22 bnet002 rocketchat[52876]: Exception in onLogin callback TypeError: Cannot use 'in' operator to search for 'resume' in tH6-PKwcCTtwXd3gNy4rlUkbTOhdaxa3reLahq55VdO
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at server/hooks/sauMonitorHooks.ts:21:59
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at Array.find (<anonymous>)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at server/hooks/sauMonitorHooks.ts:21:37
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at packages/callback-hook/hook.js:187:18
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at packages/accounts-base/accounts_server.js:253:13
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at Hook.forEachAsync (packages/callback-hook/hook.js:156:20)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at AccountsServer._successfulLogin (packages/accounts-base/accounts_server.js:252:29)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at AccountsServer._attemptLogin (packages/accounts-base/accounts_server.js:489:18)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at processTicksAndRejections (node:internal/process/task_queues:105:5)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at AccountsServer._loginMethod (packages/accounts-base/accounts_server.js:509:12)
Mai 15 12:39:22 bnet002 rocketchat[52876]:     at MethodInvocation.verifyEmail (packages/accounts-password/password_server.js:763:14)

Nginx Access Log:

[15/May/2025:12:39:22 +0200] "POST /api/v1/login HTTP/1.1" 200 XXX "-" "RC Mobile; ios 18.4.1; v4.60.0 (79289)"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in server/hooks/sauMonitorHooks.ts at the onLogin callback and trace the login flow shown in the server stack, especially the failing find operation. Reproduce the iOS login against the described server setup and verify that authentication completes without the TypeError or the rejected-credentials message.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, typescript
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.