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

Error using Geolocaor on v17030 #786

Closed
v-liujxu opened this issue Nov 14, 2017 · 4 comments
Closed

Error using Geolocaor on v17030 #786

v-liujxu opened this issue Nov 14, 2017 · 4 comments

Comments

@v-liujxu
Copy link

I have tested Geolocation sample on RPi 3 with v17030,

  1. When I execute following code,I get the error message: A specified logon session does not exist.
var accessStatus = await Geolocator.RequestAccessAsync();
  1. When I execute below code, I get the error message: Access is denied.Your App does not have permission to access location data. Make sure you have defined ID_CAP_LOCATION in the application manifest and that on your phone, you have turned on location by checking Settings > Location, even though this is checked in the packages manifest.
var geoLocator = new Geolocator();
return await geoLocator.GetGeopositionAsync();

The sample works on v16299.

@oldnewthing
Copy link
Member

I've asked the feature team to investigate.

@rg-burton
Copy link

The Geolocator does not work in a Background Task application either on the current insider builds. I downloader the October samples and ran the Geolocator but when the geolocator fires from the background task, it gets and "Unauthorized Access" error. No changes were made to the sample before running it.

@Cheoljin
Copy link

Cheoljin commented Dec 4, 2017

This is from the feature team.

First off, regarding the issue from v-liujxu, I have contacted him and communicated each other.

Basically, the issue from v-liujxu is reported on IoT Core Edition on RPi. To see if this is in another edition, I have tested on Enterprise edition of 16229 (RS3 release) and 17035 (one of the latest RS4 preleases). As a result, the issue is NOT there.

On the other hand, there was a similar issue in recent IoT build. But it seems like that has been fixed and the fix is has been in since Build 17041. In terms of error message, they are the same.

Please test it after updating to IoT build 17041 or later when it becomes available.

For more context, two issues were originally reported in Repro Steps.

The #2 issue there is consequence and caused by #1 issue, i.e., RequestAccessAsync requests permission to access location data but it fails because the permission has not been acquired from the step of #1.

The issue #1 is likely caused by a bug in recent IoT edition prerelease with the same error message, "A specified logon session does not exist. It may already have been terminated"

@Cheoljin
Copy link

Cheoljin commented Dec 4, 2017

Hi rg-burton, please let us know what edition and build# was used in your test. Possibly, the root cause is the same as what v-liujxu reported.

Another possibility is that for some reason, you did not give the location permission to the App at the very first time when it was asked. It does not ask explicitly every time afterwards. You can go to Setting and find the location privacy settings and then enable the permission for the sample App there.

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

No branches or pull requests

4 participants