Closed Bug 1933920 Opened 1 year ago Closed 11 months ago

pay.rakuten.co.jp - Current location does not get displayed

Categories

(Web Compatibility :: Site Reports, defect, P2)

Firefox 135
ARM
Android

Tracking

(Webcompat Priority:P1, Webcompat Score:8, firefox133 wontfix, firefox134 wontfix, firefox135 wontfix, firefox140 wontfix, firefox142 verified, firefox143 fixed)

VERIFIED FIXED
142 Branch
Webcompat Priority P1
Webcompat Score 8
Tracking Status
firefox133 --- wontfix
firefox134 --- wontfix
firefox135 --- wontfix
firefox140 --- wontfix
firefox142 --- verified
firefox143 --- fixed

People

(Reporter: ctanase, Unassigned)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])

User Story

platform:android
impact:workflow-broken
configuration:general
affects:all
branch:release
diagnosis-team:dom

Attachments

(1 file)

Environment:
Operating system: Android 14
Firefox version: Firefox Mobile 133/135

Steps to reproduce:

  1. Go to https://pay.rakuten.co.jp/shop/map/?scid=wi_rpay_map_nav_shop
  2. Allow the location when prompted.
  3. Observe the behavior.

Expected Behavior:
It shows the current location.

Actual Behavior:
Shows Tokyo as a standard location and displays an error after a few seconds.

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/144233

See Also: → 1731765
Version: unspecified → Firefox 135

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Severity: -- → S2
User Story: (updated)
Priority: -- → P2

The site works as, using navigator.geolocation.watchPosition API to consistently get the current location, consistently stores it to local session storage, and then checks the stored value in session storage.

The issue is, we don't see to update the location correctly.

Running the following code on the site only execute twice in Firefox, but it gets consistently called in Chrome.

navigator.geolocation.watchPosition(function(pos) {
    console.log(pos);
}, function() {console.log("got error")}, {maximumAge: 600000, enableHighAccuracy: true})

Filed the platform bug for this, bug 1934115

Depends on: 1934115
Webcompat Priority: --- → P1
Webcompat Score: --- → 8

Retriaged, the issue is still reproducible with the latest Nightly.

Tested with:

  • Browser / Version: Nightly 140.0a1-20250524091254
  • Operating System: Google Pixel 5 (Android 14)

Kagami, I think we chatted about this in Berlin...do you mind take a look again? Thanks!!

Flags: needinfo?(krosylight)

I can't reproduce comment #0. I still see the error popup saying「このエリアに当該するお店がございません」, which means there's no stores matching your location, which is natural because this is for Japan and I'm in Germany. It still properly locates me anyway. Is this what you see too, or if not can you explain more?

Flags: needinfo?(krosylight) → needinfo?(ctanase)

For me, Chrome was able to show my current location (Toronto, Canada) but Firefox stuck at Japan

It seems to work after a reload, on first load it shows me central Tokyo. I can reproduce this issue on clean every time.

Note: When you clear the cookies and site data, close the tab and access the website on a new tab. I'm not able to reproduce the issue if I clear the cache/data and reload the page. (or if you want to be on the safer side delete everything from browsing data)

Flags: needinfo?(ctanase)

Sean, can you check the location permission is not Blocked?

What are the repro steps here? It certainly goes to Japan if I do nothing for like 10 seconds for the prompted permission request (if there's no cache), but the same happens on Chrome.

Edit: Testing on Galaxy S22 Ultra, if this matters.

Flags: needinfo?(sefeng)
Flags: needinfo?(ctanase)

Hey Kagami, here's a recording for Firefox and here's a recording for Chrome.

I cleared the browsing data for both of them, and you can see that Firefox wasn't able to locate me upon the first try.

Flags: needinfo?(sefeng)

Can you double check the nightly version just in case?

To me it looks like the Android geolocation service is having time to get signal. If you try the same but after doing the same on Google Maps, does it change the result?

Flags: needinfo?(sefeng)

And if you can connect the debugger, can you try calling navigator.geolocation.watchPosition(console.log, console.error) and see how long it takes to get the first signal?

Nightly is 20250524091254

Not sure if I understand the Google Maps part.. https://drive.google.com/file/d/1htr6Dku8YZF6KNqe43QxefXiqxcheniG/view?usp=sharing here's another one I just did.

navigator.geolocation.watchPosition(console.log, console.error) works pretty fast for me, like instant..

Flags: needinfo?(sefeng)

Hmm, somehow I managed to reproduce it. It's nothing to do with cache clear for me, it happens if I force close the browser and reopen it. Debugger shows the error callback ultimately gets code=1 (which is GeolocationPositionError.PERMISSION_DENIED) after several seconds even though the permission is not denied. And that callback makes the website show 「現在地の取得ができません。」, which says failed to get the location. (They could make the error message better. 🤔)

I wonder the permission request is sometimes not handled and is disposed, leading to unexpected permission deny. Maybe Kato-san has better idea?

Edit: The same doesn't happen on https://browserleaks.com/geo, so maybe still something to do with Rakuten doing two geolocation requests at once.

Flags: needinfo?(ctanase) → needinfo?(m_kato)

Fenix/ac resolves two GeckoResult as ContentPermission.VALUE_ALLOW correctly. But at first time, Gecko (GeckoView?) throws permission denied... I need to investigate more why.

Depends on: 1969813
Flags: needinfo?(m_kato)

Ah, I tested this issue with geolocation permission of Android is set. Android permission request seems be be disposed... This implementation doesn't use GeckoResult and callback isn't handled, so this permission request doesn't return forever.

Also, I guess that this has another issue that is regression by bug 1771229. When Android permission dialog appears, Fenix's window is inactive. Then after permission dialog is closed, window becomes active. But when starting geolocation request, it is still inactive...

Depends on: 1969832

This seems to work for me in Firefox Beta on Android now—it correctly shows my current location on the second load in both Firefox and Chrome. Can we close this?

Flags: needinfo?(m_kato)

The issue is not reproducible anymore using the latest Nightly. Thank you!

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED

I also verified.

Flags: needinfo?(m_kato)

Verified as FIXED using RC Build fenix android-arm64-v8a

Tested with:

Browser / Version: Firefox 142.0 Build 2016107994
Operating System: Google Pixel 3 (Android 12) -1080 x 2160 pixels, 18:9 ratio (~443 ppi density)
Operating System: Oppo Find X5 (Android 13) - 1080 x 2400 pixels, 20:9 ratio (~402 ppi density)

Status: RESOLVED → VERIFIED
Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: