Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Bug] await Geolocation.GetLocationAsync() never returns when permission denied #1488

Closed
lobbo232 opened this issue Nov 2, 2020 · 14 comments
Labels
bug Something isn't working

Comments

@lobbo232
Copy link

lobbo232 commented Nov 2, 2020

Description

Gelocation.GetLocationAsync() never returns if the location permission is denied in iOS 14 and later only.

Steps to Reproduce

  1. Create new project, build for iOS 14
  2. Deny location permission
  3. Call await Gelocation.GetLocationAsync()

Expected Behavior

The location should return null, or the last known location, or throw an exception, as it does pre iOS 14.

Actual Behavior

The method never returns and the app will wait indefinitely.

Basic Information

Discovered the issue on an iPhone XS Max running iOS 14.1 after having it reported by a user. An iPhone 6 on iOS 12 works fine still on the same app build.

  • Version with issue: iOS 14
  • Last known good version: iOS 13
  • IDE: VS 2019
  • Platform Target Frameworks: 14.1 (default)
    • iOS: 14.2.0.12
    • Android: 11.0.2.0
  • Nuget Packages: Xamarin.Essentials 1.5.3.2
  • Affected Devices: iPhone 11, iPhone XS Max (both iOS 14.1)

Reproduction Link

iOS14_Location_Issue.zip

@lobbo232 lobbo232 added the bug Something isn't working label Nov 2, 2020
@brandonward34
Copy link

Can confirm also experiencing this issue.

@iMrTidy
Copy link

iMrTidy commented Nov 4, 2020

It is even worse than that in my case. If the permission was not previously granted no matter what option I choose in the popup dialog the method never returns.

@lobbo232
Copy link
Author

lobbo232 commented Nov 4, 2020

It is even worse than that in my case. If the permission was not previously granted no matter what option I choose in the popup dialog the method never returns.

@iMrTidy what happens if you go to the device settings and manually enable the permission for your app there? Does it work after that?

@iMrTidy
Copy link

iMrTidy commented Nov 4, 2020

It is even worse than that in my case. If the permission was not previously granted no matter what option I choose in the popup dialog the method never returns.

@iMrTidy what happens if you go to the device settings and manually enable the permission for your app there? Does it work after that?

If the permission was previously given all works smoothly.

@csk1nner
Copy link

csk1nner commented Nov 4, 2020

Also got the same error results with the pre release 1.6.0-pre2

@mattleibow
Copy link
Contributor

I think this is now fixed in #1487

CI is now building that change and will be pushed to the preview feed soon as 1.6.0-ci.25: https://aka.ms/xamarin-essentials-ci/index.json

In addition, I'll be pushing out a preview to NuGet, so it will be great if you could test the change and make sure it works for you.

@mattleibow
Copy link
Contributor

Duplicate of #1390

@mattleibow mattleibow marked this as a duplicate of #1390 Nov 6, 2020
@lobbo232
Copy link
Author

Thanks for the quick fix. Do we have a rough ETA on when we'll get this build? Any chance it could be prioritised for main release / merge back to 1.5 or something? It's effecting a lot of users since iOS 14 rolled out.

@mattleibow
Copy link
Contributor

I think this was pushed into the new 1.6 preview

@ianthetechie
Copy link

Yes, please! iOS 14 has been out for 2 months. I don't understand how such obvious bugs take so long to get released. This is blocking an app release for us. Given how often Xamarin libraries break, I'm extremely hesitant to try a preview.

@RomanNakonechnyi
Copy link

I think this was pushed into the new 1.6 preview

Any timelines when 1.6 will be released fully?

@dai15002
Copy link

dai15002 commented Dec 9, 2020

Any updates regarding this issue? I have still get the problem even when using 1.6.0-pre5

@ianthetechie
Copy link

ianthetechie commented Dec 14, 2020

@dai15002 try 1.6.0-rc1. This version is finally working for me. I'm more than a little disappointed that it's taken 3 months to get a critical bug fix for a package called "essentials" to work with an OS whose ship date everyone knew 6 months ago.

@Vandersteen
Copy link

Still happening in 1.7.1 for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants