Known issue: geolocation timing out in Chrome 65

Hi all–

Unfortunately, it looks like there’s a bug in Chrome 65, which was released this month and is gradually being download by users, causing attempts to get the current user’s geographic position to time out. We are looking into possible workarounds and will update as we learn more. The symptom is that workflows requiring the location will time out, and elements displaying the location may not display it for up to 10 minutes.

Although Chrome recommends against doing this because it’s annoying to get a popup on page load, one short-term option is to display the geographic address in an element that is visible on page load, which will start the loading process immediately. That way, if a subsequent workflow needs to use the position, it’s more likely to be loaded in time.

You can follow the progress of the issue on Chrome’s end by signing in and starring the bug report here: https://bugs.chromium.org/p/chromium/issues/detail?id=820945&can=2&start=0&num=100&q=geolocation&colspec=ID&groupby=&sort= .

4 Likes

This worked inside an HTML element.
From https://www.w3schools.com/html/html5_geolocation.asp.

<p>Click the button to get your coordinates.</p>
<button onclick="getLocation()">Try It</button>
<p id="demo"></p>

<script>
var x = document.getElementById("demo");

function getLocation() {
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(showPosition);
    } else { 
        x.innerHTML = "Geolocation is not supported by this browser.";
    }
}

function showPosition(position) {
    x.innerHTML = "Latitude: " + position.coords.latitude + 
    "<br>Longitude: " + position.coords.longitude;
}
</script>
2 Likes

The issue I’ve been seeing is that it doesn’t work on repeated refreshes. So if you run that code after not looking up the address for 10 minutes, it’ll work, but if you run it, then refresh the page or open a new tab, you’ll see a long delay (on the order of a minute or more). It’s supposed to work within 5 - 10 seconds in most browsers.

Anyway the latest update is the Chrome team has now acknowledged this is a problem and are planning to revert the change they made that introduced it…

1 Like

I saw the threads. Intense. You have them jumping.

Chrome team is making good progress and looks like it’ll be in next Chrome release. Given that, and given that we haven’t found any workaround short of switching to a 3rd party API which we don’t want to do on a system-wide level, current plan on our end is just to wait it out.

To close the loop on this, I’ve confirmed that this bug is fixed in Chrome 66 – I have been unable to reproduce it since upgrading

3 Likes

@josh All of my apps are still experiencing the issue with Chrome not loading the current geographic position. This only happens on Chrome and never other browsers. My browser is updated to Chrome 67.

It happens randomly, about every 4 page loads. Eventually the page data related to the current geographic position will load after throwing a Bubble error and stalling 5-10 minutes.

Has anyone been able to resolve this issue with Google support or find a way to correct it on Bubble’s side?

Got the issue in 67. Try to upgrade to 68 and still the same issue.
UPDATE:
Manage to fix it by uninstalling Chrome and re-installing it.