-
Notifications
You must be signed in to change notification settings - Fork 1k
$cordovaGeolocation - Android error message : Only secure origins are allowed #1413
Comments
Your guess is correct, accessing the user's location is deprecated with unsecure (HTTP) context. See https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features. Running your dev server on
Did you try to setup a HTTPS proxy?
It seems that they are targeting SSL support for the Ionic CLI in a future version. But until then you can use the mentioned workaround. |
I can confirm what @TroubadourFabiolas reported. Although I can test functionality that relies on native geolocation using Is there any way to run the debugging server for |
I confirm too. Using the command |
I believe the livereload server needs to default to using SSL in order to allow you to use it for testing Geolocation. |
I have the same problem with --livereload |
Me too with |
Same here pls default to SSL |
what you mean @juncalpito ? |
I just seconded what morphatic said about the livereload server needs to default to using SSL, so that we won't have any problems with requesting from insecure origins. |
With or without live reload I cannot use the ionic dev app and the geolocation api together. Watching for a fix. |
The same for me. The app crashes suddenly. |
With or without live reload option I am still getting the same error 👎 |
@matheuscaldasrj I removed ionic cordova android, deleted the node_modules folder and plugins folder, installed ionic cordova android and then ionic cordova run android. |
please revive!!! any solution for this? |
there's a workaround? |
@lefrankleal @fdambrosio I removed ionic cordova android, deleted the node_modules folder and plugins folder, installed ionic cordova android and then ionic cordova run android. |
@steinjonathan Yes that is the point. It works with run . What we want is it to work with --livereload or -l option like this below
|
Still 2018 and this issue persists |
So, no solution for this? |
It's almost 2019. |
@zbahadir This issue is never getting fixed by the ionic team; this library is no longer maintained. https://github.com/ionic-team/ng-cordova/blob/master/README.md |
Issue persists 2019 |
same here |
same here :( |
any news? :-( |
Almost 2020 and still no fix? |
In 2020 still no fix :( |
Politely: there will never be a fix. This is open source code; feel free to fork and maintain what you need. At a minimum you’ll need to look at the code this library wraps and see if the fix is there. If so, fix it there and then this will work; if not you may need to fork and fix the base library as well as this wrapper. |
You guys never disappoint, I didn't expect more from the ionic team itself. Way to go!
|
I only encountered this issue when running on a simulator. Not a big deal to me anymore. |
any news? |
Broken on a real android device with livereload in 2021. |
Hello,
I'm using the "$cordovaGeolocation" plugin, everything is OK on iOS but on Android (ionic run android --device -c -l) I receive this following error message :
"Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."
Is it because i'm running the reload server in http ?
What's the solution please ?
Thank you!
The text was updated successfully, but these errors were encountered: