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 2023-12-15] IOU - Infinite loading when click on E-Receipt of distance request created offline #32501
Version Number: 1.4.8-0 Reproducible in staging?: Y Reproducible in production?: N 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:
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
IOU - Infinite loading when click on E-Receipt of distance request created offline
What is the root cause of that problem?
This is a regression from other PR as mentioned in the above comment.
If we're going to keep the PR up and going, here's my explanation for the issue.
This only happens when we turn on Staging server, which typically happens only on staging or dev environments, so this shouldn't effect the real application at all.
But the the real issue lies in this block of code,
where we fetch the image based on the host, say if we're using staging or in staging env it appends staging to the route.
But since we're in offline mode, we're loading image (thumbnail) from local source which is served under / public path that's, but if we add /staging to the URL it get's issue.
So here's the main issue, adding /staging for local files i.e serving on public folder.
This only have observed here, but it's potential issue which can anytime cause the issue.
What changes do you think we should make in order to solve the problem?
We already have the logic to handle the local file rendering for mobile apps, but not for desktop devices.
We need to update tryResolveUrlFromApiRoot this function to accept a new argument telling that if the file is from local or remote source (depending on the state of the network & the onyx data).
functiontryResolveUrlFromApiRoot(url: string,isLocalFile?: boolean): string;functiontryResolveUrlFromApiRoot(url: number,isLocalFile?: boolean): number;functiontryResolveUrlFromApiRoot(url: string|number,isLocalFile?: boolean): string|number{// in native, when we import an image asset, it will have a number representation which can be used in `source` of Image// in this case we can skip the url resolvingif(typeofurl==='number'||isLocalFile){returnurl;}const apiRoot =ApiUtils.getApiRoot({shouldUseSecure: false}asRequest);returnurl.replace(ORIGIN_PATTERN,apiRoot);}
What alternative solutions did you explore? (Optional)
changed the title [-]IOU - Infinite loading when click on E-Receipt of distance request created offline[/-][+][HOLD for payment 2023-12-15] IOU - Infinite loading when click on E-Receipt of distance request created offline[/+]on Dec 8, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.9-5 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 2023-12-15. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
Activity
github-actions commentedon Dec 5, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Dec 5, 2023
Triggered auto assignment to @iwiznia (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.iwiznia commentedon Dec 5, 2023
@lanitochka17 if you can, always include a screenshot of the JS console for issues reproducible in web.
neil-marcellini commentedon Dec 5, 2023
I think this is the offending PR Remove receipt from carousel, and we should revert it since it breaks distance eReceipts, both on and offline.
melvin-bot commentedon Dec 5, 2023
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
b4s36t4 commentedon Dec 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
IOU - Infinite loading when click on E-Receipt of distance request created offline
What is the root cause of that problem?
This is a regression from other PR as mentioned in the above comment.
If we're going to keep the PR up and going, here's my explanation for the issue.
This only happens when we turn on Staging server, which typically happens only on staging or dev environments, so this shouldn't effect the real application at all.
But the the real issue lies in this block of code,
App/src/components/ReportActionItem/ReportActionItemImage.js
Lines 52 to 53 in d521dd6
stagingto the route.But since we're in offline mode, we're loading image (thumbnail) from local source which is served under
/public path that's, but if we add/stagingto the URL it get's issue.So here's the main issue, adding
/stagingfor local files i.e serving on public folder.This only have observed here, but it's potential issue which can anytime cause the issue.
What changes do you think we should make in order to solve the problem?
We already have the logic to handle the local file rendering for mobile apps, but not for desktop devices.
We need to update
tryResolveUrlFromApiRootthis function to accept a new argument telling that if the file is from local or remote source (depending on the state of the network & the onyx data).What alternative solutions did you explore? (Optional)
NA
8 remaining items
[-]IOU - Infinite loading when click on E-Receipt of distance request created offline[/-][+][HOLD for payment 2023-12-15] IOU - Infinite loading when click on E-Receipt of distance request created offline[/+]melvin-bot commentedon Dec 8, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Dec 8, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.9-5 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 2023-12-15. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
melvin-bot commentedon Dec 15, 2023
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.
melvin-bot commentedon Dec 18, 2023
@neil-marcellini Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
neil-marcellini commentedon Dec 18, 2023
We just reverted a PR here, so the resolution is being handled in the original issue