WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
177555
Geolocation service issues
https://bugs.webkit.org/show_bug.cgi?id=177555
Summary
Geolocation service issues
Brian Cardarella
Reported
2017-09-27 11:34:07 PDT
We're seeing several issues with Geolocation services in mobile safari: 1. We have an instance where the Geolocation function getCurrentPosition never hits either the success or failure callback. Our app will hang in a state of waiting. It is my understanding that the spec calls for a default timeout of Infinity, so we've introduced a 5000ms timeout but that doesn't have any affect either. There are no errors in the JS console (remote debugger). We've had to work around this with a setTimeout equal to a little bit more than the geo timeout and it will fallback to our non-geo experience. This happens when we clear our website data, disallow location services to Safari, and attempt to use the app. On initial load we fall into this limbo state. If we reload the app the error callback fires immediately. It feels like there is some latency / race condition issue but I am not able to reproduce this on desktop Safari. I have confirmed this happens in both mobile Safari 10 and Safari 11 in our app. 2. If we attempt to open our app from another app, for example Slack, on the iPhone we fall into the state above regardless of the permissions for Safari. It isn't clear to me if Slack is using a webview, and Slack does not have any Privacy / Location settings on the iPhone for me to determine if location access is granted or not. I do not see a permission dialog box, we go into the limbo state. 3. The above also happens with apps like GMail that do appear to be using a wrapped webview to see web pages. If I open:
https://codepen.io/bcardarella/pen/QqpwxW?editors=1010
from within an email in GMail and choose Safari the gelocation service never timesout or goes into a success or error state. It just stays in "Pending", If you open the same link within mobile Safari outside of another app launching the geolocation service appears to work as expected. We are requesting access to the location when the app launches. I do realize this is not a "best practice" and will soon be disallowed. However, I have not found any information that suggest that this is the culprit.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-09-28 09:59:15 PDT
<
rdar://problem/34716490
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug