Open lanitochka17 opened 2 weeks ago
Triggered auto assignment to @mallenexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
shows blank row when opening a invalid room link
We create the LHN option even though reportID is not valid here
To fix issue we can return null if reportID is not valid so empty row will not created. We can add below check here
const renderItem = useCallback(
({item: reportID}: RenderItemProps): ReactElement | null => {
// Below if block added to fix the issue.
if (reportID === '-1') {
return null;
}
const itemFullReport = reports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
NA as this is bug
LHN shows blank row when opening a invalid room link
When a report with a random ID, e.g., r/6546545
, is opened, the backend returns the report.errorFields.notFound
property. In this case, the report is not displayed in the LHN because we check for the report.errorFields.notFound
property to be unset.
However, when opening r/2652281908731856
, for some reason the BE returns report.errorFields.createChat
with the value Auth OpenReport returned an error
instead of report.errorFields.notFound
. This scenario bypasses the above checks, causing this issue.
Ideally, we should investigate why the backend returns report.errorFields.createChat
and whether it could instead return report.errorFields.notFound
. If that is not possible, we can add a check similar to this one to verify the required properties
if (!report || !report?.reportID) {
Unit/UI tests to ensure that reports with missing reportID
, and possibly also type
and reportName
properties are not displayed.
LHN shows blank row when opening a invalid room link
When we open the report that is not found, the back-end returns errorFields for createChat.
and store this report to Onyx
In the sidebar, we have not handled the createChat errorFields case yet, which is why this issue occurs.
To resovle this issue we just update case createChat
error some thing like that:
Update to
const isReportInAccessible = report?.errorFields?.notFound ?? report?.errorFields?.createChat;
This is a UI bug; no tests are needed.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
we could fix this issue by removing the report from Onyx, or implementing a similar solution like this
useEffect(() => {
if (!shouldShowNotFoundPage || report?.reportID || !report?.errorFields?.createChat) {
return;
}
Report.deleteReport(reportIDFromRoute);
}, [report, reportIDFromRoute, shouldShowNotFoundPage]);
Job added to Upwork: https://www.upwork.com/jobs/~021878923123358968660
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External
)
Was able to reproduce. @allroundexperts , plz review the above proposals?
Also.. this seems like a regression (that said, I don't click broken links that often) . If anyone can point to a PR that might have caused this, please do.
Cannot reproduce the issue in the latest main
Also unable to reproduce on latest staging - desktop and web. @allroundexperts anya thoughts before I close this?
This one seems to be fixed, but upon going back and clicking the room link again, I am getting an infinitely loading page.
https://github.com/user-attachments/assets/a6046234-0a3e-4ea4-b4c3-09f732c7d3d8
Thanks @allroundexperts , good catch. Updated the OP to inc.
Matt A update - Discussing here. The steps below aren't reproducible but if you click back then click on the report again, there's an infinite skeleton loading screen.
Infinite skeleton loading screen.
The shouldShowNotFoundPage
variable determines whether the "not found" page should be displayed. In this issue, at step 6, the value is false
instead of true. This occurs because, in step 6, the useMemo
:
is only calculated once, with firstRenderRef.current
being true. As a result, the condition:
is not met.
When firstRenderRef.current
is set to false
, the useMemo
value is not recalculated, so shouldShowNotFoundPage
remains false.
At the same time, shouldShowSkeleton
is also true
, leading to the infinite loading screen being displayed.
We can create a firstRender
state beside the firstRenderRef
, so when this value is updated, we can re-calculate the above useMemo
value: const [firstRender, setFirstRender] = useState(true)
.
Then in here call setFirstRender(false)
.
Finally, add the firstRender
to the shouldShowNotFoundPage
's dependencies.
NA
NA
@allroundexperts can you review @daledah 's proposal above? I updated the title and OP
[$250] Clicking link to invalid room > another report > then back to invalid room link leads to infinite skeleton loading screen
The "Hmm... it's not here" page is displayed
Infinite skeleton loading screen.
@daledah's proposal looks good to me. The RCA is correct and the solution works as well.
🎀 👀 🎀 C+ reviewed
Triggered auto assignment to @nkuoch, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@nkuoch, @mallenexpensify, @allroundexperts Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
📣 @daledah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.83-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): agexptest+pr0801@gmail.com Issue reported by: Applause - Internal Team Component:
Action Performed:
Expected Result:
The "Hmm... it's not here" page is displayed
Actual Result:
Infinite skeleton loading screen.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/4ccd0488-10bb-4186-ba81-9d15e30e490e
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @allroundexperts