RequestRateAndReviewAppAsync is broken
Describe the bug
When I call RequestRateAndReviewAppAsync a native crash occurs.
Why is this important?
APIs should work without crashing. Without this APIs users can not be asked to leave a review for an app.
Steps to reproduce the bug
Install latest WinAppSDK and create an empty C# app.
var context = StoreContext.GetDefault();
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(((App)App.Current).MainWindow);
WinRT.Interop.InitializeWithWindow.Initialize(context, hwnd);
var result = await context.RequestRateAndReviewAppAsync();
Actual behavior
Exception thrown at 0x00007FFB3BEF6104 (Windows.ApplicationModel.Store.dll) in Project-Quick-Open.exe: 0xC0000005: Access violation reading location 0x0000000000000000.
I believe there are no public symbols for this dll, so more details are difficult to provide.
Expected behavior
If an error occurs that error should be returned. No fatal Access violation.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001
Windows version
Windows 11 (24H2): Build 26100
Additional context
No response
Does this only happen when WinUI 3 is active in a process, or does it happen with any desktop application using StoreContext? I ask this because as a Windows API, StoreContext issues should be reported in the Feedback Hub under Developer Platform->API Feedback. StoreContext can be used independently of WinUI 3, so this isn't guaranteed to be a WinUI 3 issue.
I quickly tested this out in a packaged WPF app. Same access violation occurred.
Here is the Feedback Hub link: https://aka.ms/AAxtg7c
@DarranRowe Mentioning the specific category in feedback hub is a good thing.
@Marv51 ~~do you use the app elevated?~~
I tested it too and it crashes. Until now the issue was only for elevated apps, and I know for sure it worked for unelevated ones since I tested this API before. IDK what changed.
Might be related to this one: https://github.com/microsoft/WindowsAppSDK/issues/5162
It seems like it's fixed now @Marv51, it's only an issue when elevated so you either update the issue to reflect the elevation scenario or you close it.