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

Exception in storageLibrary.RequestAddFolderAsync() #1503

Open
4OTbIPE opened this issue Feb 11, 2024 · 5 comments
Open

Exception in storageLibrary.RequestAddFolderAsync() #1503

4OTbIPE opened this issue Feb 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@4OTbIPE
Copy link

4OTbIPE commented Feb 11, 2024

Describe the bug
System.Runtime.InteropServices.COMException in storageLibrary.RequestAddFolderAsync() or storageLibrary.RequestRemoveFolderAsync()

To Reproduce

  1. Get StorageLibrary via await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures);
  2. Call RequestAddFolderAsync() on received library

Expected behavior
As in the UWP application, an explorer window appears with a folder selection

Version Info
WinSDK 10.0.22621
WinAppSDK 1.4.4
Windows 10 Version 21H2
CsWinRT 2.0.7

@4OTbIPE 4OTbIPE added the bug Something isn't working label Feb 11, 2024
@dongle-the-gadget
Copy link
Contributor

Is the app packaged?

@4OTbIPE
Copy link
Author

4OTbIPE commented Feb 11, 2024

Is the app packaged?

yea

@manodasanW
Copy link
Member

Is there any detail on the COMException that you got such as the HRESULT / error code?

@4OTbIPE
Copy link
Author

4OTbIPE commented Feb 13, 2024

Is there any detail on the COMException that you got such as the HRESULT / error code?

I executed this line of code in a clean, newly created WinUI3 application.
await (await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures)).RequestAddFolderAsync();
And I got this exception. Exception's message is empty.

   в WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   в WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   в ABI.Windows.Storage.IStorageLibraryMethods.RequestAddFolderAsync(IObjectReference _obj)
   в Windows.Storage.StorageLibrary.RequestAddFolderAsync()
   в App2.MainWindow.<myButton_Click>d__1.MoveNext() в C:\Users\alexe\source\repos\App2\App2\App2\MainWindow.xaml.cs:строка 33

изображение

You also can try execute that line of code in clear WinUI3 app.
The runFullTrust app. I tried adding Pictures Library to the app's capabilities, but it didn't help.
There is a similar problem with RequestRemoveFolderAsync()

@4OTbIPE
Copy link
Author

4OTbIPE commented May 21, 2024

Any news on this please? Can I wait for the fix in the new version with AOT? 2.1 i assume

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

No branches or pull requests

3 participants