Skip to content
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

[HOLD for payment 2024-07-30] [$250] Distance - Route in distance editor doesn't load after fresh sign in #44156

Closed
6 tasks done
izarutskaya opened this issue Jun 21, 2024 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Jun 21, 2024

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-0-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: https://expensify.testrail.io/index.php?/tests/view/4620930
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit a distance expense.
  4. Go to transaction thread.
  5. Click Distance.
  6. Note that the green route is shown.
  7. Sign out and back in
  8. Go to the transaction thread in Step 3.
  9. Click Distance.

Expected Result:

The route will load

Actual Result:

The route does not load

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Screen.Recording.2024-07-01.at.10.03.26.AM.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a809b3d1bd11c266
  • Upwork Job ID: 1807822900424921117
  • Last Price Increase: 2024-07-01
Issue OwnerCurrent Issue Owner: @johncschuster
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

Triggered auto assignment to @johncschuster (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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

@johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@johncschuster
Copy link
Contributor

@neil-marcellini I'm curious about your thoughts here. Would you expect the green route to persist after the user clears their cache?

@johncschuster
Copy link
Contributor

@neil-marcellini Assigning to you just to make sure my question is on your radar. Please feel free to drop off after!

@melvin-bot melvin-bot bot added the Overdue label Jul 1, 2024
@neil-marcellini
Copy link
Contributor

We shouldn't really report bugs which include a debug only feature like clearing the cache. I was tempted to close the issue, but first I checked if a similar problem was reproducible after signing out. It looks like that does in fact present a real issue, so I'm going to update the description. I'm happy to stay on to manage this externally.

Screen.Recording.2024-07-01.at.10.03.26.AM.mov

@melvin-bot melvin-bot bot removed the Overdue label Jul 1, 2024
@neil-marcellini neil-marcellini added the External Added to denote the issue can be worked on by a contributor label Jul 1, 2024
@melvin-bot melvin-bot bot changed the title Distance - Green route in distance editor disappears after clear cache and restart app [$250] Distance - Green route in distance editor disappears after clear cache and restart app Jul 1, 2024
Copy link

melvin-bot bot commented Jul 1, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01a809b3d1bd11c266

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 1, 2024
Copy link

melvin-bot bot commented Jul 1, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

@neil-marcellini neil-marcellini changed the title [$250] Distance - Green route in distance editor disappears after clear cache and restart app [$250] Distance - Route in distance editor doesn't load after fresh sign in Jul 1, 2024
@izarutskaya
Copy link
Author

The team discovered the route also does not generate after changing waypoints in offline mode.

Recording.189.mp4

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The distance green line route disappears after re-login.

What is the root cause of that problem?

The green line route is coming from the transaction route coordinate data.

directionCoordinates={(transaction?.routes?.route0?.geometry?.coordinates as Array<[number, number]>) ?? []}

The coordinate data is retrieved from GetRoute/Draft API. However, the data (routes) isn't saved on the BE and lost when we re-login as pointed out in here.

The GetRoute/Draft API is only called when the waypoints are changed.

const shouldFetchRoute = (isRouteAbsentWithoutErrors || haveValidatedWaypointsChanged) && !isLoadingRoute && Object.keys(validatedWaypoints).length > 1;

But because we don't change it, the coordinate data stays empty and the route green line is gone.

What changes do you think we should make in order to solve the problem?

Trigger the GetRoute/Draft API if the routes data is missing.

const shouldFetchRoute = (!transaction?.routes || isRouteAbsentWithoutErrors || haveValidatedWaypointsChanged) && !isLoadingRoute && Object.keys(validatedWaypoints).length > 1;

Copy link

melvin-bot bot commented Jul 4, 2024

@johncschuster, @neil-marcellini, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jul 5, 2024

@johncschuster @neil-marcellini @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot changed the title [$250] Distance - Route in distance editor doesn't load after fresh sign in [HOLD for payment 2024-07-24] [$250] Distance - Route in distance editor doesn't load after fresh sign in Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊

For reference, here are some details about the assignees on this issue:

  • @bernhardoj requires payment through NewDot Manual Requests
  • @thesahindia requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Jul 17, 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:

  • [@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia] 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:
  • [@thesahindia] 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:
  • [@thesahindia] Determine if we should create a regression test for this bug.
  • [@thesahindia] 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.
  • [@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jul 17, 2024
@bernhardoj
Copy link
Contributor

@thesahindia @neil-marcellini I found an issue with our PR, so I create a follow up here

@johncschuster
Copy link
Contributor

Thanks for the new PR! I'll issue payment once that PR passes the regression threshold.

@johncschuster
Copy link
Contributor

johncschuster commented Jul 22, 2024

Looks like we're waiting on a deploy to prod

@johncschuster
Copy link
Contributor

Deployed to prod today! Payment should be issued on July 30 👍

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 23, 2024
@johncschuster johncschuster changed the title [HOLD for payment 2024-07-24] [$250] Distance - Route in distance editor doesn't load after fresh sign in [HOLD for payment 2024-07-30] [$250] Distance - Route in distance editor doesn't load after fresh sign in Jul 24, 2024
@johncschuster johncschuster added Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2024
@johncschuster
Copy link
Contributor

Downgrading the label while we wait for the payment date. We're still on track to pay this out on the 30th

@johncschuster
Copy link
Contributor

johncschuster commented Jul 30, 2024

Payment Summary:

Contributor: @bernhardoj owed $250 via NewDot
Contributor+: @thesahindia owed $250 via NewDot

@johncschuster
Copy link
Contributor

@thesahindia can you complete the BZ Checklist above? Thank you!

@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

Copy link

melvin-bot bot commented Jul 30, 2024

Payment Summary

Upwork Job

BugZero Checklist (@johncschuster)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1807822900424921117/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@johncschuster
Copy link
Contributor

@thesahindia bump on the BZ Checklist

@thesahindia
Copy link
Member

Sorry for the delay. This was an improvement so we can skip the checklist.

We can add a test case, here are the steps -

  1. Open a workspace chat
  2. Submit a distance request
  3. Log out and log in back
  4. Open the submitted distance request transaction thread
  5. Press the "Distance" field
  6. Verify the map shows the green line route

@johncschuster
Copy link
Contributor

Sweet. Thank you for clarifying that! We're all done here!

@JmillsExpensify
Copy link

$250 approved for @thesahindia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

7 participants