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

sometimes geolocation no longer working (uses old endpoints) #11862

Closed
LaurenWags opened this issue Sep 25, 2020 · 18 comments
Closed

sometimes geolocation no longer working (uses old endpoints) #11862

LaurenWags opened this issue Sep 25, 2020 · 18 comments

Comments

@LaurenWags
Copy link
Member

Description

Starting with 1.14.x geolocation no longer works on macOS Mojave. It seems on 1.13.x and prior we were proxying thru location.brave.com, however with 1.14.x that proxy doesn't seem to be there so geolocation fails.

Note, this is working for @kjozwiak using Catalina. Additionally, @btlechowski checked Linux and Windows and geolocation is working there as well.

Steps to Reproduce

  1. Install any of the following: 1.14.81, 1.14.84 (current release), 1.15.x, 1.16.x.
  2. Navigate to https://browserleaks.com/geo and/or https://html5demos.com/geo/.
  3. Allow location from prompt.

Actual result:

Location service fails:

1 14 81

1 14 84

Expected result:

Should work as it did in 1.13.86:
1 13 86

Reproduces how often:

easy

Brave version (brave://version info)

Brave	1.14.81 Chromium: 85.0.4183.102 (Official Build) (64-bit)
Revision	ffe848af6a5df4fa127e2929331116b7f9f1cb30-refs/branch-heads/4183@{#1770}
OS	macOS Version 10.14.6 (Build 18G3020)
Brave	1.14.84 Chromium: 85.0.4183.121 (Official Build) (64-bit)
Revision	a81aa729a8e1fd413943a339393c82e7b8055ddc-refs/branch-heads/4183@{#1864}
OS	macOS Version 10.14.6 (Build 18G3020)
Brave | 1.15.63 Chromium: 86.0.4240.55 (Official Build) dev (x86_64)
-- | --
Revision | a6d625ef6f7fe8ea0675f1cf759155a05ee1be40-refs/branch-heads/4240@{#953}
OS | macOS Version 10.14.6 (Build 18G3020)

Version/Channel Information:

  • Can you reproduce this issue with the current release? yes, 1.14.x
  • Can you reproduce this issue with the beta channel? yes, 1.15.x
  • Can you reproduce this issue with the nightly channel? yes, 1.16.x

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome? no, used version 85.0.4183.121 (Official Build) (64-bit)

Miscellaneous Information:

cc @rebron

@rebron
Copy link
Collaborator

rebron commented Sep 28, 2020

I'm able to reproduce the first screenshot in this version:

Brave 1.14.84 Chromium: 85.0.4183.121 (Official Build) (64-bit)
Revision a81aa729a8e1fd413943a339393c82e7b8055ddc-refs/branch-heads/4183@{#1864}
OS macOS Version 10.16 (Build 20A5374i)

macOS version is wrong in that string though, I'm on 11.0 Beta (20A5374i)

Following your steps, our geolocation fallback is working on:

Brave 1.15.61 Chromium: 86.0.4240.42 (Official Build) beta (x86_64)
Revision 418ccfc2b69112bd79d5ffb38b533642e64e6af8-refs/branch-heads/4240@{#773}
OS macOS Version 10.16 (Build 20A5374i)
Brave 1.16.41 Chromium: 86.0.4240.55 (Official Build) nightly (x86_64)
Revision a6d625ef6f7fe8ea0675f1cf759155a05ee1be40-refs/branch-heads/4240@{#953}
OS macOS Version 10.16 (Build 20A5374i)

Screen Shot 2020-09-28 at 9 29 56 AM

with the experimental brave://flags/#enable-core-location-implementation enabled, I'm getting the most accurate result starting with 1.15.x and 1.16.x (doesn't work in 1.14.x)
Screen Shot 2020-09-28 at 9 21 13 AM

@kjozwiak
Copy link
Member

kjozwiak commented Sep 28, 2020

I ran through the above on Friday and tried again today but couldn't reproduce the above on 1.15.x & 1.16.x using macOS 10.15.6 x64 Catalina. However, I did reproduce/notice that 1.14.x is not using the location.brave.com poxy and is using location.services.mozilla.com instead.

Using 1.16.43 Chromium: 86.0.4240.55 - PASSED (proxying through location.brave.com)

Brave | 1.16.43 Chromium: 86.0.4240.55 (Official Build) nightly (x86_64)
-- | --
Revision | a6d625ef6f7fe8ea0675f1cf759155a05ee1be40-refs/branch-heads/4240@{#953}
OS | macOS Version 10.15.6 (Build 19G73)
https://browserleaks.com/geo https://html5demos.com/geo
Screen Shot 2020-09-28 at 2 19 30 PM Screen Shot 2020-09-28 at 2 20 29 PM

Using 1.15.65 CR: 86.0.4240.55 - PASSED (proxying through location.brave.com)

Brave | 1.15.65 Chromium: 86.0.4240.55 (Official Build) dev (x86_64)
-- | --
Revision | a6d625ef6f7fe8ea0675f1cf759155a05ee1be40-refs/branch-heads/4240@{#953}
OS | macOS Version 10.15.6 (Build 19G73)
https://browserleaks.com/geo https://html5demos.com/geo
Screen Shot 2020-09-28 at 1 47 36 PM Screen Shot 2020-09-28 at 1 49 27 PM

Using 1.14.84 CR: 85.0.4183.121 - FAILED (not being proxies through location.brave.com and using location.services.mozilla.com instead)

Brave | 1.14.84 Chromium: 85.0.4183.121 (Official Build) (64-bit)
-- | --
Revision | a81aa729a8e1fd413943a339393c82e7b8055ddc-refs/branch-heads/4183@{#1864}
OS | macOS Version 10.15.6 (Build 19G73)

https://browserleaks.com/geo https://html5demos.com/geo
Screen Shot 2020-09-28 at 2 43 56 PM Screen Shot 2020-09-28 at 2 45 00 PM

@rebron rebron added the priority/P4 Planned work. We expect to get to it "soon". label Oct 30, 2020
@rebron
Copy link
Collaborator

rebron commented Oct 30, 2020

@LaurenWags This is likely a wontfix for Mojave but can you take a look at #10724, I think this is fixed in Nightly with the latest c87 bump.

@LaurenWags
Copy link
Member Author

@rebron #10724 doesn't have a test plan so I can't be 100% sure it's working as expected.

However, I can navigate to https://browserleaks.com/geo or https://html5demos.com/geo/ and geolocation works using Nightly.

Brave 1.18.26 Chromium: 87.0.4280.40 (Official Build) nightly (x86_64)
Revision 349b9adbfb2784db684617c7731a57d1e61b3be0-refs/branch-heads/4280@{#863}
OS macOS Version 10.14.6 (Build 18G6032)

@kjozwiak kjozwiak changed the title geolocation no longer working on macOS Mojave geolocation no longer working on macOS Nov 18, 2020
@kjozwiak kjozwiak added priority/P2 A bad problem. We might uplift this to the next planned release. release/blocking and removed priority/P4 Planned work. We expect to get to it "soon". labels Nov 18, 2020
@kjozwiak kjozwiak added this to the 1.17.x - Release milestone Nov 18, 2020
@kjozwiak
Copy link
Member

kjozwiak commented Nov 18, 2020

Reproduced on macOS 10.15.7 x64 using the following build (@iefremov also reproduced the issue):

Brave | 1.17.69 Chromium: 87.0.4280.60 (Official Build) (x86_64)
-- | --
Revision | 12697cfeb273d7de95cf9b18350d2c457f58224c-refs/branch-heads/4280@{#1352}
OS | macOS Version 10.15.7 (Build 19H2)

As per the discussion via Slack, geolocations seem to be using the wrong endpoints. Once you've given macOS the needed permissions for Brave to use the Location Services, you'll get the following:

Example A Example B Example C
Screen Shot 2020-11-17 at 11 30 48 PM Screen Shot 2020-11-17 at 11 30 58 PM Screen Shot 2020-11-18 at 12 04 15 AM

Please see https://bravesoftware.slack.com/archives/C7VLGSR55/p1605674399117500 for more context.

CCing @rebron @bsclifton

@kjozwiak
Copy link
Member

kjozwiak commented Nov 18, 2020

So it looks like it's now working with 1.17.70 CR: 87.0.4280.60. However, the strange part is that 1.17.70 CR: 87.0.4280.60 doesn't include any fixes/code changes to anything related to geolocations. So it's possible that we have a bug in our build infra where sometimes it breaks and uses the wrong endpoint. @mihaiplesa @iefremov and @simonhong or taking a look to see what could have happened.

Screen Shot 2020-11-18 at 11 52 54 AM

Removing from the 1.17.x milestone and removing the release/blocking label.

@kjozwiak kjozwiak removed this from the 1.17.x - Release milestone Nov 18, 2020
@kjozwiak kjozwiak changed the title geolocation no longer working on macOS sometimes geolocation no longer working on macOS (uses old endpoints) Nov 18, 2020
@kjozwiak kjozwiak changed the title sometimes geolocation no longer working on macOS (uses old endpoints) sometimes geolocation no longer working (uses old endpoints) Dec 1, 2020
@bsclifton bsclifton self-assigned this Dec 1, 2020
@kjozwiak kjozwiak removed the OS/macOS label Dec 2, 2020
@kjozwiak
Copy link
Member

kjozwiak commented Dec 2, 2020

Removing OS/macOS till we know 100% this only affects macOS.

@bsclifton
Copy link
Member

Talking with @simonhong - we think this must be related to the build. I'll try to verify also (haven't had a chance yet, apologies)

@kjozwiak
Copy link
Member

kjozwiak commented Jan 5, 2021

@bsclifton any updates on this one? Probably should figure this one out before we accidently release a build that breaks geolocation. We usually don't run through geolocation checks for minor CR/HF releases. Maybe we should add it them until we figure out the above?

@iefremov
Copy link
Contributor

iefremov commented Jan 5, 2021

@kjozwiak I guess the problem is not specific to geolocation, rather it is something general that affects CI. I.e. it easily can hit any other feature :D

posting a link to slack discussion just for context and cc @mihaiplesa
https://bravesoftware.slack.com/archives/C7VLGSR55/p1605716007144900?thread_ts=1605674399.117500&cid=C7VLGSR55

@iefremov
Copy link
Contributor

iefremov commented Jan 5, 2021

a small chance this is related to https://github.com/brave/devops/issues/4089

@mihaiplesa
Copy link
Contributor

@iefremov I've just fixed that issues and it only affected PR builds.

@mihaiplesa
Copy link
Contributor

mihaiplesa commented Jan 15, 2021

This has been isolated to one of the release build nodes which had an old ~/.npmrc file overriding the one created in the workspace during the build process. Issue should be fixed with next builds for each channel.

@mihaiplesa mihaiplesa self-assigned this Jan 15, 2021
@kjozwiak
Copy link
Member

kjozwiak commented Jan 15, 2021

Thanks @mihaiplesa 👍 Closing this off and we'll check it with the next 1.19.x RC. @brave/legacy_qa for the next few releases, including minor Chromium bumps, we should keep an eye on geolocation to make sure we're using the correct endpoints.

@iefremov
Copy link
Contributor

Thanks @mihaiplesa , good catch!!

@kjozwiak
Copy link
Member

kjozwiak commented Jan 18, 2021

Verification PASSED on macOS 11.1 x64 using the following build:

Brave | 1.19.85 Chromium: 88.0.4324.89 (Official Build) (x86_64)
--- | ---
Revision | 4534be84786f5269fb52e9bf82643af61e2fedaf-refs/branch-heads/4324@{#1721}
OS | macOS Version 11.1 (Build 20C69)

Ensured that we're always using location.brave.com when requesting for geolocation permissions as per the following:

https://browserleaks.com/geo https://html5demos.com/geo
Screen Shot 2021-01-18 at 1 01 07 PM Screen Shot 2021-01-18 at 1 03 39 PM
https://www.lcbo.com (Before Request) https://www.lcbo.com (After Request)
Screen Shot 2021-01-18 at 1 04 26 PM Screen Shot 2021-01-18 at 1 04 41 PM

Verification passed on

Brave 1.19.85 Chromium: 88.0.4324.89 (Official Build) (64-bit)
Revision 4534be84786f5269fb52e9bf82643af61e2fedaf-refs/branch-heads/4324@{#1721}
OS Ubuntu 18.04 LTS

Verified that we're always using location.brave.com when requesting for geolocation permissions as per the following:

https://browserleaks.com/geo https://html5demos.com/geo
image image

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.19.86 Chromium: 88.0.4324.96 (Official Build) (64-bit)
-- | --
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | Windows 10 OS Version 2009 (Build 19042.746)

Ensured that we're always using location.brave.com when requesting for geolocation permissions as per the following:

https://browserleaks.com/geo (OS Location Disabled) https://browserleaks.com/geo (OS Location Enabled)
image image
https://html5demos.com/geo (OS Location Disabled) https://html5demos.com/geo (OS Location Enabled)
image image

@kjozwiak
Copy link
Member

@rebron mind checking this on your end as well when you have some time? The more people that check the better as this was dependent on the nodes that were used to build the releases. Want to make sure it's working for everyone 👍

@LaurenWags
Copy link
Member Author

@kjozwiak a little late but checked this on M1 and confirmed we're using location.brave.com when requesting for geolocation permissions.

Brave	1.19.86 Chromium: 88.0.4324.96 (Official Build) (arm64)
Revision	68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS	macOS Version 11.1 (Build 20C69)

Screen Shot 2021-01-20 at 9 23 39 AM

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

No branches or pull requests

7 participants