Skip to content

[$500] IOU - In distance request confirmation page, location access permission box is shown. #36491

Closed

Description

@lanitochka17

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: 1.4.41
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/4314136
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:

Pre:condition: device location is off

  1. Launch app
  2. Tap on workspace chat
  3. Tap plus icon --- request money---distance
  4. Tap no, thanks and deny device location permission
  5. Tap start
  6. Tap use location
  7. Tap no, thanks and deny device location permission
  8. Tap cross button and close the device location denied message
  9. Select a location from dropdown list
  10. Tap finish
  11. Perfom step 6-- step9
  12. Tap add stop
  13. Perfom step 6-- step9
  14. Tap next

Expected Result:

In distance request confirmation page, location access permission box must not be shown

Actual Result:

In distance request confirmation page, location access permission box is shown

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

Add any screenshot/video evidence

Bug6379190_1707908248130.do.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01898dd3cbc3df8779
  • Upwork Job ID: 1757774834158333952
  • Last Price Increase: 2024-02-14
  • Automatic offers:
    • s77rt | Reviewer | 0
    • bernhardoj | Contributor | 0
    • esh-g | Contributor | 0

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 14, 2024
  2. changed the title [-]IOU - In distance request confirmation page, location access permission box is shown.[/-] [+][$500] IOU - In distance request confirmation page, location access permission box is shown.[/+] on Feb 14, 2024
  3. melvin-bot commented on Feb 14, 2024

    @melvin-bot
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 14, 2024
  5. melvin-bot commented on Feb 14, 2024

    @melvin-bot

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

  6. melvin-bot commented on Feb 14, 2024

    @melvin-bot

    Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  7. lanitochka17 commented on Feb 14, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave5
    CC @dylanexpensify

  8. esh-g commented on Feb 14, 2024

    @esh-g
    Contributor

    Proposal

    Please re-state the problem we are trying to solve

    In distance request confirmation page, location access permission box is shown

    What is the root cause of this problem?

    The root cause is that we try to get the current position of the user for every render for MapView even if we don't need it in this useEffect here:

    getCurrentPosition(

    What changes should be made to fix this?

    We should only try to get the current location of the user if shouldPanMapToCurrentLocation is true

    const shouldPanMapToCurrentPosition = useCallback(() => !userInteractedWithMap && (!waypoints || waypoints.length === 0), [userInteractedWithMap, waypoints]);

  9. bernhardoj commented on Feb 14, 2024

    @bernhardoj
    Contributor

    Proposal

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

    In distance confirmation page, a location permission dialog shows.

    What is the root cause of that problem?

    The map view component has a useFocusEffect that will be triggered every time the page is focused.

    useFocusEffect(
    useCallback(() => {
    if (isOffline) {
    return;
    }
    if (hasAskedForLocationPermission.current) {
    return;
    }
    hasAskedForLocationPermission.current = true;
    getCurrentPosition(

    It will call getCurrentPosition which will request the location permission. The map view is also placed on the confirmation page, so when we visit the confirmation page, the permission dialog will be shown (no need to perform the long step).

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

    I think we don't need to get the current position anymore on the confirmation page, so we can introduce a new prop to ignore the getCurrentPosition call and set the current position from the initialState.

    if (useInitialStatePosition) {
        setCurrentPosition({longitude: initialState.location[0], latitude: initialState.location[1]});
        return;
    }
    
  10. s77rt commented on Feb 15, 2024

    @s77rt
    Member

    @esh-g Thanks for the proposal. Your RCA is about right. The solution looks good to me.

    🎀 👀 🎀 C+ reviewed
    Link to proposal

  11. s77rt commented on Feb 15, 2024

    @s77rt
    Member

    @bernhardoj Thanks for the proposal. Your RCA is about right. As for the solution, I don't think we need a new prop here

  12. 22 remaining items

  13. chiragsalian commented on Mar 12, 2024

    @chiragsalian
    Contributor

    Oh true, its been live since feb 28th so this is past the 7 day regression period. I'm unsure why the GH title didn't change here. Might have been a bug.
    I don't think anything is pending here.
    @kevinksullivan can you handle the payment and close out this issue.

  14. melvin-bot commented on Apr 5, 2024

    @melvin-bot

    This issue has not been updated in over 15 days. @chiragsalian, @s77rt, @kevinksullivan, @esh-g 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!

  15. s77rt commented on Apr 5, 2024

    @s77rt
    Member

    This is due payment

  16. chiragsalian commented on Apr 9, 2024

    @chiragsalian
    Contributor

    Friendly bump @kevinksullivan, to handle payment.

  17. melvin-bot commented on Jun 6, 2024

    @melvin-bot

    @chiragsalian, @s77rt, @kevinksullivan, @esh-g, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

  18. s77rt commented on Jun 6, 2024

    @s77rt
    Member

    Only Melvin got paid. This is still due payment

  19. chiragsalian commented on Jun 10, 2024

    @chiragsalian
    Contributor

    @kevinksullivan / @mallenexpensify, can one of you handle payment for @s77rt over here.

  20. mallenexpensify commented on Jun 11, 2024

    @mallenexpensify
    Contributor

    Contributor: @esh-g paid $500 via Upwork
    Contributor+: @s77rt paid $500 via Upwork.

    Sorry it took forever. If you ever see a Reviewing label on an issue when it's awaiting payment, please comment and ask for it to be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2Not a priority

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions