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

Geolocation with KaiOs terminals ERROR(3): Position acquisition timed out #15

Open
Anoirwork opened this issue Feb 24, 2020 · 0 comments

Comments

@Anoirwork
Copy link

Anoirwork commented Feb 24, 2020

Hi there Hope you guys doing well,
So my issue is that whenever i ask for Geolocation either with navigator.geolocation.getCurrentPosition or watchPosition this gives me:
12:15:05.952 ERROR(3): Position acquisition timed out at error (app://1d1fe204-6982-4ccc-8ba3-710c339e27c9/index.html:38:3)1index.html:38:3
i've even removed the time out option , set it to more than 8000ms as some people on the net recommended it but still with no result i have also remove the enableHighAccuracy or set it to false an there was no expected result the permission is granted for sure here's my code.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width,user-scalable=no,initial-scale=1"
    />
    <title>Hello World</title>
    <style>
      body {
        border: 1px solid black;
      }
    </style>
    <!-- Inline scripts are forbidden in Firefox OS apps (CSP restrictions),
         so we use a script file. -->
  </head>
  <body>
    <div id="demo"></div>
    <script type="text/javascript">
var options = { enableHighAccuracy: false, timeout: 2000, maximumAge: 1000 };
function success(pos) {
  var crd = pos.coords;
  console.log('Your current position is:');
  console.log(`Latitude : ${crd.latitude}`);
  console.log(`Longitude: ${crd.longitude}`);
  console.log(`More or less ${crd.accuracy} meters.`);
}
function error(err) {
  console.warn(`ERROR(${err.code}): ${err.message}`);
}
navigator.geolocation.getCurrentPosition(success, error, options);
    </script>
  </body>
</html>

PS: i have used the same instructions on the KaiOs tech developer guide for retiring the Geolocation data.
Thanks for attention an help.
https://ibb.co/y4m7gjY

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

No branches or pull requests

1 participant