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

Essentials - Permission.RequestAsync skipped on Windows #5450

Closed
matt-goldman opened this issue Mar 20, 2022 · 2 comments
Closed

Essentials - Permission.RequestAsync skipped on Windows #5450

matt-goldman opened this issue Mar 20, 2022 · 2 comments
Labels
platform/windows 🪟 s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working

Comments

@matt-goldman
Copy link
Contributor

Description

Calling Permissions.RequestAsync<T>(); on Windows is skipped and a result of 'Denied' is returned without the user being prompted.

The user should be prompted to grant or deny the permission.

Issue does not occur on Andoird, iOS or macOS in my testing.

Steps to Reproduce

  1. Create a new .NET MAUI app
  2. Add a call to Permissions.RequestAsync<T>()
  3. Run on Windows

Adding breakpoints shows that the call is skipped and the result is returned as denied.

Small repo demonstrating here: https://github.com/matt-goldman/LocationPermissionsTest

Version with bug

Preview 14 (current)

Last version that worked well

Preview 11

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.19041

Did you find any workaround?

No, I tried wrapping it in MainThread.InvokeOnMainThreadAsync to no avail. I've also tried wrapping it in a try/catch to see if there are any errors I've been missing, also to no avail.

Relevant log output

No response

@matt-goldman matt-goldman added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Mar 20, 2022
@matt-goldman matt-goldman changed the title Essentils - Permission.RequestAsync skipped on Windows Essentials - Permission.RequestAsync skipped on Windows Mar 20, 2022
@JohnHDev
Copy link

This might be relevant to the behaviour you are seeing: xamarin/Essentials#819

@matt-goldman
Copy link
Contributor Author

This might be relevant to the behaviour you are seeing: xamarin/Essentials#819

Yep that's it. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/windows 🪟 s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants