WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

WCR: GetReadyState doesn't update after successful EnsureReadyAsync call

Open riverar opened this issue 7 months ago • 5 comments

Describe the bug

The ImageDescriptionGenerator.GetReadyState() method incorrectly returns EnsureNeeded even after a successful call to EnsureReadyAsync(). The ImageDescriptionGenerator otherwise works so it's unclear what the real state is.

Steps to reproduce the bug

  1. Clone https://github.com/riverar/repro-9b6e05c1
  2. Deploy and execute app on arm64 machine
  3. Observe debug output:
    GetReadyState => EnsureNeeded
    EnsureReadyAsync => Success
    GetReadyState => EnsureNeeded
    

Expected behavior

GetReadyState => EnsureNeeded
EnsureReadyAsync => Success
GetReadyState => Ready

Code

private async void Button_Click(object sender, RoutedEventArgs e)
{
    Debug.Print($"GetReadyState => {ImageDescriptionGenerator.GetReadyState().ToString()}");

    var result = await ImageDescriptionGenerator.EnsureReadyAsync();
    Debug.Print($"EnsureReadyAsync => {result.Status.ToString()}");

    Debug.Print($"GetReadyState => {ImageDescriptionGenerator.GetReadyState().ToString()}");
}

https://github.com/riverar/repro-9b6e05c1/blob/788dcb08cf1c53431f13e2661bc23c4c085ab2c1/MainWindow.xaml.cs#L33-L41

NuGet package version

Windows App SDK 1.8 Experimental 1: 1.8.250410001-experimental1

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022-preview

Additional context

Windows vNext 10.0.26200.5551

riverar avatar Apr 20 '25 20:04 riverar

internal bug

codendone avatar Apr 21 '25 05:04 codendone

Does that mean it's known and you're tracking this internally? Or you created a new bug? Or other?

riverar avatar Apr 21 '25 06:04 riverar

Why can't issue tracking be done in the open like the .NET and STL teams do? It would avoid duplicated bug reports such as this one.

sylveon avatar Apr 21 '25 07:04 sylveon

Hey @riverar and @sylveon, thanks for reporting this Issue! This is a known Bug and we're tracking it internally. I'll share an update here when we've resolved it and I can let you know when to expect the fix.

connorMicrosoft avatar Apr 21 '25 17:04 connorMicrosoft

Requesting status check.

riverar avatar Jun 12 '25 20:06 riverar

@riverar - are you seeing this issue in the latest 1.8 experimental 3 release?

anarvekar-msft avatar Jul 03 '25 18:07 anarvekar-msft

@anarvekar-msft I'll check now, standby.

riverar avatar Jul 03 '25 18:07 riverar

@anarvekar-msft This appears to be fixed.

First run

GetReadyState => NotReady
EnsureReadyAsync => Success
GetReadyState => Ready

Subsequent runs

GetReadyState => Ready
EnsureReadyAsync => Success
GetReadyState => Ready

riverar avatar Jul 03 '25 19:07 riverar