-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] MediaPicker.CapturePhotoAsync not working (msix installed) #24098
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
Kind of hesitate to suggest it but IMHO it should be fairly easy for you to debug your issue more in detail yourself using MAUI's sandbox project:
MediaPicker implementation for Windows is here: https://github.com/dotnet/maui/blob/main/src/Essentials/src/MediaPicker/MediaPicker.uwp.cs AFAIK. I would check your issue more in detail but I don't have access to my dev machine at the moment. PS: The other idea is to check if this part https://github.com/dotnet/maui/blob/main/src/Templates/src/templates/maui-mobile/Platforms/Windows/Package.appxmanifest#L42-L44 is correct and if you don't need some additional capability (given that it works with an admin account and not with an ordinary one). |
This issue has been verified using Visual Studio 17.11.0 Preview 7.0(8.0.80). Can repro on Windows platform. |
I was able to reproduce the issue on the maui Essentials.Sample project.
Details : https://github.com/dotnet/maui/blob/main/src/Essentials/src/MediaPicker/MediaPicker.uwp.cs line 126 : var result = await WinLauncher.LaunchUriForResultsAsync(uri, options, set);` => |
(Permalink is:
What |
Btw: I have found this workaround in a WinUI bug: microsoft/WindowsAppSDK#1034 (comment) and #13220 which implemented current code in MAUI. There is also some proposal in WinAppSdk microsoft/WindowsAppSDK#4576 for cameras. |
issue-essentials.mp4I also launch my repro app (after installed msix) on a Windows 11 PC and it work on it ! Seems to be an OS issue (Windows 10 ?) to launch the Camera App.... My Windows 10 version :
|
Interesting find.
Hm, I can see that that OS will be supported only for another year here: https://learn.microsoft.com/en-us/lifecycle/announcements/windows-10-22h2-end-of-support-update and that it is the most up to date version of Windows 10. Hmmm. I don't have a Windows 10 machine to test. Perhaps, it makes sense to ask here https://github.com/microsoft/microsoft-ui-xaml/discussions or directly in microsoft/WindowsAppSDK#1034. |
The only workaround that I found for now is to the implement the MediaCapture Class to create a camera view and create some buttons to take photo, retry and cancel... For now i didn't found any workaround to open the Camera App. Edit : A lib already exist : Camera.MAUI |
Description
MediaPicker not working at all after installing app through .msix (Release mode) !
When launching the app (no admin rmode) :
When launching the app (admin mode) :
issue.mp4
Reproduction repo : https://github.com/PauchardThomas/MauiMediaPickerIssue
Also see the same issue on https://learn.microsoft.com/en-us/answers/questions/1661755/maui-mediapicker-default-capturephotoasync-windows but no solution has been found by Microsoft Team....
What can we do ? We canno't deploy our app on production !
Steps to Reproduce
Reproduction repo : https://github.com/PauchardThomas/MauiMediaPickerIssue
Link to public reproduction project repository
No response
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10 (22H2)
Did you find any workaround?
No !
Relevant log output
No response
The text was updated successfully, but these errors were encountered: