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
[PAID] [$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline #31138
Version Number: 1.3.97-1 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:
Precondition: Have at least two saved addresses.
Launch New Expensify app.
Go offline
Go to workspace chat > + > Distance
Create a distance request offline
Go to distance request details page
Click on the receipt
Expected Result:
Ereceipt is shown with pending map
Actual Result:
Not here page is displayed
On web, the receipt shows e-receipt with pending map when the request is created offline
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/-][+][$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/+]on Nov 9, 2023
Please re-state the problem that we are trying to solve in this issue.
Not here page is displayed
What is the root cause of that problem?
In here, we're comparing the source like this in order to get the initialPage, the problem is attachment.source is a number (it's native iOS's file representation), while source is a string (because when the push the report attachment page, we encodeURI on it and then decodeURI, it remains a string). So it's always false when compared, leading to the not found page showing.
What changes do you think we should make in order to solve the problem?
We need to cast both (or only attachment.source) to string when comparing here
What changes do you think we should make in order to solve the problem?
Convert attachment.source to a string before comparing.
What alternative solutions did you explore? (Optional)
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.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Thank you both so much for your patience and I'm sorry about the delay here. If you ever notice automation failing and the GH is staying in Monthly or Weekly, you can ping me in Slack right away and I'll switch the label. Frankly, there's just too many GHs every day to be able to check through Weeklies, let alone Monthlies, so I am relying heavily on automation to float things up that need my attention.
I've paid you both and created the reg test GH as well. Going to close this out.
changed the title [-][$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/-][+][PAID] [$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/+]on Mar 20, 2024
Activity
[-]Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/-][+][$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/+]melvin-bot commentedon Nov 9, 2023
Triggered auto assignment to @strepanier03 (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 9, 2023
Job added to Upwork: https://www.upwork.com/jobs/~019b7e5a74d81069f4
melvin-bot commentedon Nov 9, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 9, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)dukenv0307 commentedon Nov 9, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Not here page is displayed
What is the root cause of that problem?
In here, we're comparing the source like this in order to get the initialPage, the problem is
attachment.sourceis a number (it's native iOS's file representation), whilesourceis a string (because when the push the report attachment page, weencodeURIon it and thendecodeURI, it remains a string). So it's always false when compared, leading to the not found page showing.What changes do you think we should make in order to solve the problem?
We need to cast both (or only
attachment.source) to string when comparing hereWhat alternative solutions did you explore? (Optional)
When decoding the URI here, we can check if the source is number, if yes we cast to number.
I actually prefer this a bit more because we ensure that the data is correct from the source, before we pass it by intermediary components.
erquhart commentedon Nov 9, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Attachment modal won't load when offline on a native app.
What is the root cause of that problem?
We're strictly comparing a number and a string to find the attachment index here:
App/src/components/Attachments/AttachmentCarousel/index.native.js
Line 39 in ba1af3b
What changes do you think we should make in order to solve the problem?
Convert
attachment.sourceto a string before comparing.What alternative solutions did you explore? (Optional)
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.
s77rt commentedon Nov 10, 2023
@dukenv0307 Thanks for the proposal. Your RCA is correct. Fixing this at the highest level looks good here i.e. the alternative solution.
If the source is a string of numbers then it's assumed we imported an image asset. In this case the source is supposed to be a number.
🎀 👀 🎀 C+ reviewed
Link to proposal
35 remaining items
dukenv0307 commentedon Dec 4, 2023
@s77rt The PR is ready for review.
melvin-bot commentedon Dec 27, 2023
This issue has not been updated in over 15 days. @strepanier03, @joelbettner, @s77rt, @dukenv0307 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
s77rt commentedon Dec 27, 2023
PR was deployed to production 3 weeks ago. Seems like the auto process failed here.
dukenv0307 commentedon Jan 31, 2024
@strepanier03 could you kindly help with the payment here?
Thank you!
s77rt commentedon Feb 5, 2024
Regression Test Proposal
(Related https://expensify.testrail.io/index.php?/cases/view/2661872 and https://expensify.testrail.io/index.php?/cases/view/2730072)
dukenv0307 commentedon Mar 18, 2024
@strepanier03 friendly bump on this!
strepanier03 commentedon Mar 20, 2024
Sorry about this, it was still set to Monthly and went under the radar.
strepanier03 commentedon Mar 20, 2024
Thank you both so much for your patience and I'm sorry about the delay here. If you ever notice automation failing and the GH is staying in Monthly or Weekly, you can ping me in Slack right away and I'll switch the label. Frankly, there's just too many GHs every day to be able to check through Weeklies, let alone Monthlies, so I am relying heavily on automation to float things up that need my attention.
I've paid you both and created the reg test GH as well. Going to close this out.
[-][$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/-][+][PAID] [$500] Distance - Receipt opens Not here page instead of e-receipt when Distance is created offline[/+]