Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

bug: Profile email not displaying when navigating to Profile screen immediately after app launch

Open JASIM0021 opened this issue 9 months ago • 1 comments

Profile email not displaying when navigating to Profile screen immediately after app launch

When the app is launched and the user immediately navigates to the Profile screen, the email field does not appear.

However, if the user waits for a few seconds (around 5 seconds) after launching the app before opening the Profile screen, the email renders correctly.

This suggests a possible delay in data fetching or user state initialization that causes the email not to be available instantly on app start.

Steps to Reproduce

left drawer → Profile option), the email field does not appear.

Expected Behavior

The email should be displayed on the Profile screen immediately, even if the user navigates to it after launching the app.

Actual Behavior

When the app is launched and the user immediately navigates to the Profile screen, the email field does not appear.

Rocket.Chat Server Version

Any

Rocket.Chat App Version

Any

Device Name

Any

OS Version

Any

Additional Context

https://github.com/user-attachments/assets/d9b43b8e-dbb2-4240-9a90-70a21884ea95

JASIM0021 avatar Apr 13 '25 16:04 JASIM0021

Hi! I noticed PR #6612 has been open since August but has failing checks and appears stale. I'd like to help get this fixed.

My analysis of the issue: The root cause is a race condition where the Profile screen renders before the user object is fully loaded from Redux/database. The useForm hook initializes with defaultValues but if user is still loading, the email field gets null and doesn't update reactively.

I just checked the latest develop branch (as of Nov 13, 2025) and can confirm this issue still exists.

DSingh0304 avatar Nov 13 '25 09:11 DSingh0304