You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-06-06] [$500] Android - Blank screen appears when transitioning between pages after relaunching app #35906
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 1.4-37.0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Launch New Expensify app
Kill the app
Relaunch New Expensify app
Open chat with IOU
Tap on the preview to go to report
Expected Result:
There will be no blank page when transitioning between pages
Actual Result:
In Step 4 and 5, there is a blank screen when transitioning between pages
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-] Android - Blank screen appears when transitioning between pages after relaunching app[/-][+][$500] Android - Blank screen appears when transitioning between pages after relaunching app[/+]on Feb 6, 2024
The data that are unavailable yet are isComposerFullSize, accountManagerReportID, and userLeavingStatus, but we already set the initialValue for these data, so it should be available immediately.
if (!value && mapping.initialValue) {
value = mapping.initialValue;
}
What changes do you think we should make in order to solve the problem?
Update react-native-onyx to apply the initial state if it's not undefined.
if (!value && mapping.initialValue !== undefined) {
value = mapping.initialValue;
}
Notice that the value could be applied to the initial value if the onyx value is falsey, for example, if we have an onyx data that stores a boolean and has a false value, and we set an initial value of 1, then the value will be 1 instead of false. We can apply the same fix by checking whether it's undefined or not.
We can even simplify the above condition to:
if (value === undefined) {
value = mapping.initialValue;
}
We already guard the undefined value here, so I think we don't need it twice.
I think @bernhardoj's proposal makes sense. Additionally, this change will also affect other components, so we need to test them to avoid regressions. :)
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@yuwenmemon] The PR that introduced the bug has been identified. Link to the PR:
[@yuwenmemon] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@yuwenmemon] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@ntdiary / @bernhardoj] Determine if we should create a regression test for this bug.
[@ntdiary / @bernhardoj] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@yuwenmemon] The PR that introduced the bug has been identified. Link to the PR: N/A
[@yuwenmemon] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
[@yuwenmemon] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
[@ntdiary / @bernhardoj] Determine if we should create a regression test for this bug. Yes
[@ntdiary / @bernhardoj] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. As below
[@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
When the initialValue is not set, our HOC component will display nothing before it finishes loading (i.e., a black screen), and I believe we will replace them with useOnyx hooks in the futureso I marked the PR as N/A.
Regression Test Proposal
Login with a High Traffic Account.
Kill the app and relaunch it.
Open a report with a lot of chat history.
Verify the chat screen/skeleton is shown instead of blank screen for a brief moment.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-] Android - Blank screen appears when transitioning between pages after relaunching app[/-][+][$500] Android - Blank screen appears when transitioning between pages after relaunching app[/+]melvin-bot commentedon Feb 6, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01902a14c0b46d4b01
melvin-bot commentedon Feb 6, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (
External)melvin-bot commentedon Feb 6, 2024
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.lanitochka17 commentedon Feb 6, 2024
We think that this bug might be related to #vip-vsp
CC @quinthar
bernhardoj commentedon Feb 6, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
A black screen is showing when opening a report screen for the first time.
What is the root cause of that problem?
The black screen is because
withOnyxreturns null while some of the onyx data is unavailable yet and we are loading it.https://github.com/Expensify/react-native-onyx/blob/13936aee27bb0cb8c98cb6bf3941044f3d5958ce/lib/withOnyx.js#L315-L317
The data that are unavailable yet are
isComposerFullSize,accountManagerReportID, anduserLeavingStatus, but we already set theinitialValuefor these data, so it should be available immediately.App/src/pages/home/ReportScreen.js
Lines 623 to 626 in 13f832c
App/src/pages/home/ReportScreen.js
Lines 634 to 637 in 13f832c
App/src/pages/home/ReportScreen.js
Lines 638 to 641 in 13f832c
However, we only set the initial value if the value is truthy and both
nullandfalseare not.https://github.com/Expensify/react-native-onyx/blob/13936aee27bb0cb8c98cb6bf3941044f3d5958ce/lib/withOnyx.js#L61-L64
What changes do you think we should make in order to solve the problem?
Update
react-native-onyxto apply the initial state if it's not undefined.Notice that the value could be applied to the initial value if the onyx value is falsey, for example, if we have an onyx data that stores a boolean and has a
falsevalue, and we set an initial value of 1, then the value will be 1 instead offalse. We can apply the same fix by checking whether it's undefined or not.We can even simplify the above condition to:
We already guard the undefined value here, so I think we don't need it twice.
ntdiary commentedon Feb 8, 2024
Under review.
ntdiary commentedon Feb 8, 2024
I think @bernhardoj's proposal makes sense. Additionally, this change will also affect other components, so we need to test them to avoid regressions. :)
🎀 👀 🎀 C+ reviewed
40 remaining items
melvin-bot commentedon May 30, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 30, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-06. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 30, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
melvin-bot commentedon Jun 11, 2024
@yuwenmemon, @ntdiary, @kevinksullivan, @bernhardoj Huh... This is 4 days overdue. Who can take care of this?
bernhardoj commentedon Jun 12, 2024
This is ready for payment @kevinksullivan
ntdiary commentedon Jun 12, 2024
When the
initialValueis not set, our HOC component will display nothing before it finishes loading (i.e., a black screen), and I believe we will replace them withuseOnyxhooks in the futureso I marked the PR as N/A.Regression Test Proposal
kevinksullivan commentedon Jun 13, 2024
Summary:
kevinksullivan commentedon Jun 13, 2024
All set - regression test created and paid @bernhardoj
JmillsExpensify commentedon Jun 13, 2024
$500 approved for @ntdiary