apache / apache/cordova-plugin-geolocation

geolocation plugin is throwing an error on location request on electron (windows) platform

Open
#243 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
646
Forks
654
PR merge metrics
No merged PRs in 30d

Description

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/

Current behavior:

When trying to get the user current location it throws an error on the electron (windows) platform. The same code works fine on the iOS and Android platforms.

Expected behavior:

It should return the user's current location. The same code works fine on iOS and Android platforms.

Steps to reproduce:

Verify the below code on windows electron platform.

Related code:

this.geoLocation.getCurrentPosition({ maximumAge: 0, enableHighAccuracy: true, timeout: 5000 }).then((currentCoords) => {
// console.log('Current Coords', currentCoords);
})
}
}, (error) => {
console.log('geolocation error', error);
})
Other information:

This is the error:

GeolocationPositionError {code: 2, message: "Network location provider at 'https://www.googleapis.com/' : No response received."}code: 2message: "Network location provider at 'https://www.googleapis.com/' : No response received."proto: GeolocationPositionError
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Ionic:

Ionic CLI : 6.11.12 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.5
@angular-devkit/build-angular : 0.1002.0
@angular-devkit/schematics : 10.2.0
@angular/cli : 10.2.0
@ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : 6.0.0, android 9.1.0, browser, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 29 other plugins)

Utility:

cordova-res (update available: 0.15.3) : 0.14.0
native-run (update available: 1.4.0) : 1.0.0

System:

Android SDK Tools : 26.1.1 (/Users/hemangshah/Library/Android/sdk)
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Big Sur
Xcode : Xcode 12.5.1 Build version 12E507

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported failure on Windows Electron with the shown getCurrentPosition call and compare the result with iOS and Android. The report includes no source files or tests to start from; done means the request returns the user's current location on Windows Electron instead of the reported network-provider error.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript
Domain
desktop-dev, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.