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

[$500] [Desktop ONLY] [Distance] - Current location feature is accessible when location access is disabled #26484

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 1, 2023 · 18 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Improvement Item broken or needs improvement. Monthly KSv2 Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 1, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR #25990

Action Performed:

Precondition: Location access on the device is disabled

  1. Launch New Expensify app
  2. Go to + > Request money > Distance
  3. Tap 'Start'
  4. Click Use current location

Expected Result:

App shows the error message 'We were unable to find your location, please try again or enter an address manually'

Actual Result:

The app is able to use current location feature despite not allowing location access on the device

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.61-1

Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6184903_20230901_183112.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d4f91fb1f56b7041
  • Upwork Job ID: 1697617876228902912
  • Last Price Increase: 2023-09-01
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Sep 1, 2023
@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Julesssss Julesssss added Daily KSv2 Improvement Item broken or needs improvement. and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 1, 2023
@Julesssss
Copy link
Contributor

Julesssss commented Sep 1, 2023

Web
Screenshot 2023-09-01 at 15 18 56

Android
Screenshot_20230901-151853

I confirmed that this is only occurring on Desktop and added a step to make the bug clearer.

But it's not a deploy blocker IMO as it is a new feature and only occuring on Desktop. So I'm going to remove the label. Let's get this fixed though!

@Julesssss Julesssss added the External Added to denote the issue can be worked on by a contributor label Sep 1, 2023
@melvin-bot melvin-bot bot changed the title Desktop - Distance-Current location feature is accessible when location access is disabled [$500] Desktop - Distance-Current location feature is accessible when location access is disabled Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

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

melvin-bot bot commented Sep 1, 2023

Triggered auto assignment to @CortneyOfstad (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@shubham1206agra
Copy link
Contributor

Looks like mac is able to retrieve the location even though location service is off
In my case, it gave out my approximate location

@Julesssss
Copy link
Contributor

Yeah, same here. But because of the following I would suggest we don't try to 'guess' the users location:

  • This is very innacurate, and pretty useless for distance tracking
  • It feels like a violation of my data

@hayata-suenaga
Copy link
Contributor

is this only desktop?

@im-adithya
Copy link

Proposal:

We can use the permissions API to check if permission is available and then proceed

const permission = await navigator.permissions.query({ name: 'geolocation' })

@Julesssss Julesssss changed the title [$500] Desktop - Distance-Current location feature is accessible when location access is disabled [$500] [Desktop ONLY] Distance-Current location feature is accessible when location access is disabled Sep 1, 2023
@GItGudRatio
Copy link
Contributor

I'm not able to repro, it somehow always seems to get the location once the map has loaded. I tried the staging build as well, still not able to repro

@huzaifa-99
Copy link
Contributor

huzaifa-99 commented Sep 1, 2023

We are actually calling the maps API directly only for desktop. Should we add a check if the user has allowed permission and then call the API?

I will be fixing this with a new PR (taking changes from #25990)

cc: @hayata-suenaga @narefyev91

@Julesssss
Copy link
Contributor

Only invoking the API when permission is granted seems reasonable to me, but lets see what @hayata-suenaga thinks.

This isn't the most important bug today, so it might need to wait.

@neil-marcellini
Copy link
Contributor

Wow that's so weird that this works without location permission. Yes let's do an extra check for location permission and if it's not granted, handle it like an error, as described in the design doc plan in this issue description.

@huzaifa-99
Copy link
Contributor

Sure i will do that in the new PR, @neil-marcellini.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 2, 2023
@huzaifa-99
Copy link
Contributor

Followup in PR here

@lanitochka17 lanitochka17 changed the title [$500] [Desktop ONLY] Distance-Current location feature is accessible when location access is disabled [$500] [Desktop ONLY] [Distance] - Current location feature is accessible when location access is disabled Sep 5, 2023
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

This issue has not been updated in over 15 days. @Julesssss, @CortneyOfstad, @thesahindia 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!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Sep 25, 2023
@hayata-suenaga
Copy link
Contributor

Closing this issue as the issue is handled in the PR for a different issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Improvement Item broken or needs improvement. Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests