0

Chrome blocks tracking location and therefore my app doesn't work when I runionic serve. I've tried to get around it with the following to no avail.

There were some answers saying to get around it by installing a simple node.js server as chrome will block local files, so I ran:

sudo npm install http-server -g
http-server -o --cors

Then I went to http://localhost:8080/www/index.html which pulled up my app.

Went to chrome settings -> advanced -> content settings -> manage exceptions -> hostname pattern: http://localhost:8080/www/index.html, Behavior: Allow

I made sure to do the ^ so chrome also allowed http://127.0.0.1:8080/www/index.html.

None of this is working, chrome is still blocking geolocation.

Answers I looked at and tried to get to this point: HTML 5 Geo Location Prompt in Chrome, Using node.js as a simple web server, allow to use geolocation for a website for which I previously refused it

Community
  • 1
  • 1
SaH
  • 919
  • 1
  • 8
  • 17

1 Answers1

0

I found that firefox doesn't block geolocation the way chrome does and works well with ionic serve.

SaH
  • 919
  • 1
  • 8
  • 17