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

Closed
opened 2025-05-30 17:18:30 +02:00 by mrouissi · 2 comments
Owner

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)"
### 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: <!-- snap/docker/tar/etc --> 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)" ```
Author
Owner

Der Bug wurde auf dem offiziellen GitHub von Rocket.Chat gemeldet: https://github.com/RocketChat/Rocket.Chat/issues/36078

Der Bug wurde auf dem offiziellen GitHub von Rocket.Chat gemeldet: https://github.com/RocketChat/Rocket.Chat/issues/36078
Author
Owner

Getestet und hat einwandfrei funktioniert.

Getestet und hat einwandfrei funktioniert.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Apps/rocketchat#2
No description provided.