title: html geolocation: Unknown error acquiring position
body: <p>I am trying to use HTML geolocation to get my position. Funny thing is, it was working brilliantly until some seemingly random point in the day when it just stopped working. Now all I get is the error callback with a message:</p>
  
  <pre><code>Unknown error acquiring position
  </code></pre>
  
  <p>This happened on the day I first started to develop the app. It is a web app built in Node/Express. The browser I am using is Firefox v53 64-bit.</p>
  
  <p>Location is allowed, and I have also tried a fix that I found online which involves going to about:config and changing <code>geo.wifi.uri</code> from:</p>
  
  <pre><code>https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_API_KEY%
  </code></pre>
  
  <p>to</p>
  
  <pre><code>https://www.googleapis.com/geolocation/v1/geolocate?key=test
  </code></pre>
  
  <p>This did not work for me.</p>
  
  <p>This does however work on my phones Firefox app, but not the Google Chrome app.</p>
  
  <p>Heres an example code snippet:</p>
  
  <pre><code>    const geo = navigator.geolocation;
      geo.getCurrentPosition(success, failure);
  
      function success(position) {
          lat = position.coords.latitude;
          lng = position.coords.longitude;
          $('#coords').val(lat + ',' + lng);
          mapView.setCenter(ol.proj.fromLonLat([lng, lat]));
      }
  
      function failure(error) {
          console.log(error.message);
      }
  </code></pre>
  
  <p>The full page:  <a href="https://github.com/ThriceGood/Spots/blob/master/views/index.html" rel="noreferrer">https://github.com/ThriceGood/Spots/blob/master/views/index.html</a></p>
  
  <p>Can anyone shed some light on this issue?</p>