-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CP Staging] Fix app crash when viewing member profile after Expensify Card feature is enabled #48872
[CP Staging] Fix app crash when viewing member profile after Expensify Card feature is enabled #48872
Conversation
UPD: it's a known issue #48867@mountiny During testing I've found a separate issue on android. When user navigates to the member details screen he always sees not found page first: android_bug.mp4It caused by shouldShowNotFoundPage flag is true, because member has a falsy value. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-09-10.at.1.39.56.in.the.afternoon.movAndroid: mWeb ChromeScreen.Recording.2024-09-10.at.1.35.57.in.the.afternoon.moviOS: NativeScreen.Recording.2024-09-10.at.1.30.41.in.the.afternoon.moviOS: mWeb SafariScreen.Recording.2024-09-10.at.1.34.30.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-09-10.at.1.31.52.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-09-10.at.1.40.49.in.the.afternoon.mov |
@VickyStash Could you please add some details on how this fixes the issue, if possible? I am trying to track down the offending PR. thanks! |
@VickyStash Regarding:
Can we include a fix for this in this PR? |
The crash was caused by this error: This PR by using |
Nice, thanks, @VickyStash! |
@getusha this should be good for another review 🙏🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can confirm #48867 is fixed Screen.Recording.2024-09-10.at.5.43.08.in.the.afternoon.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm as well
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…-crash [CP Staging] Fix app crash when viewing member profile after Expensify Card feature is enabled (cherry picked from commit fda4e1b) (CP triggered by luacmartins)
ref: ForwardedRef<TRef>, | ||
) { | ||
const [isLoadingReportData] = useOnyx(ONYXKEYS.IS_LOADING_REPORT_DATA, {initialValue: true}); | ||
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
|
||
if (isLoadingReportData && isEmpty(policy) && isEmpty(policyDraft)) { | ||
if ((isLoadingPolicy || isLoadingReportData) && isEmpty(policy) && isEmpty(policyDraft)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition caused WorkspaceInvitePage
to unmount and mount again calling clean-up function earlier than intended and it resulted in workspace invite members list to be emptied, more: #49256
Details
Fix app crash when viewing member profile after Expensify Card feature is enabled
Fixed Issues
$ #48866
$ #48867
PROPOSAL: N/A
Tests
Offline tests
Same as in the Tests section.
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4