Fix not calling OpenApp command when transitioning to NewDot from OldDot - #59835
Conversation
|
@QichenZhu Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 @mountiny has triggered a test app build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
I will fix the lint errors, they are due to need of change the imports types to named. |
…to fix-not-calling-openApp-command-when-transitioning
| initializePusher(); | ||
| // Sometimes when we transition from old dot to new dot, the client is not the leader | ||
| // so we need to initialize the client again | ||
| if (!isClientTheLeader() && isTransitioning) { |
There was a problem hiding this comment.
Wondering if we should always call init when there is no clientLeader because I suspect that maybe it was the same case for Doza here https://callstack-hq.slack.com/archives/C05LX9D6E07/p1743436382386309 @mountiny and the ReconnectApp command wasnt called
There was a problem hiding this comment.
from high level that makes sense to me
|
@kubabutkiewicz I tested the solution on macOS Chrome and it works 🎉. Could I get some clarification on the root cause?
Does the race condition originate from the Onyx library or E/App? I logged the Before this PR: (Correct --> Wrong) After this PR: (Correct --> Wrong --> Correct) Screenshots |
|
Sorry @QichenZhu didn't see the notification for that. Yeah you are right it is more masking it right now. But I was struggling to find the exact root cause of that. So that was just a solution of that problem I could figure out right now. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-native.mp4Android: mWeb Chromeandroid-web.moviOS: Nativeios-native.mp4iOS: mWeb Safariios-web.movMacOS: Chrome / Safarimac-web.movMacOS: Desktopmac-desktop.mov |
mountiny
left a comment
There was a problem hiding this comment.
Thanks! Callstack is looking for someone to dig deeper to also fix the RCA
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.28-15 🚀
|


Explanation of Change
This change addresses an issue that occasionally occurs during the transition from olddot to newdot, where data fails to load properly into Onyx. The root cause is that the
OpenAppAPI is not being called. This occurs because during initialization, likely due to a race condition or Onyx not being fully initialized, the clientId fromActiveClientManageris not successfully added to theactiveClientsarray, resulting in the absence of aleaderClientId. The implemented solution ensures that when no leader client ID is detected during a transition, theinitmethod fromActiveClientManageris called again to properly establish the leader client ID.Fixed Issues
$ #59800
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
old-dot-bug.mp4
MacOS: Desktop