WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

Windows Update Broke PhiSilica

Open alejandro5042 opened this issue 6 months ago • 15 comments

After updating to the latest Windows Insider this morning, one of which included an update to the PhiSilica model:

Image

I get this error:

System.UnauthorizedAccessException
  HResult=0x80070005
  Message=Access is denied.

Access is denied.

When doing either chat inference or embeddings:

var result = await languageModel.GenerateResponseAsync(options, prompt);
var embeddingResult = await languageModel.GenerateEmbeddingVectorAsync(...);

Using v1.7.250127003-experimental3.

Right now, nothing works.

alejandro5042 avatar May 13 '25 18:05 alejandro5042

i'm running into the same error (i think) in WPF, with both 1.7 and 1.8. This is the minimal example from https://learn.microsoft.com/en-us/windows/ai/apis/get-started?tabs=winget%2Cwpf (note no manifest file in WPF, and i had to fix the duplicated variable name in the second wpf tab)

Image

edit: i should note it works fine for me in WinUI3 apps

jonathankhootek avatar May 16 '25 03:05 jonathankhootek

/feedbackhubWCR

connorMicrosoft avatar May 16 '25 14:05 connorMicrosoft

Looks like our automated response has some bugs. Please follow these instructions: Could you please submit this issue through Feedback Hub (press [Windows key]+[F])? Once you've done that, share the link here so we can track your issue more effectively on our end. When submitting, please select "Developer Platform" as the category and "Windows Copilot Runtime" as the sub-category. Follow these steps: 1. Open Feedback Hub using [Windows key]+[F] 2. Make sure you're signed in 3. When entering your bug details, please start your title with "[WCR APIs]" 4. Choose "Developer Platform" as the category and "Windows Copilot Runtime" as the sub-category 5. Under "Add more details", select "Recreate my problem" 6. Start the recording, show us the issue with your app or sample, then stop recording 7. Include as many details as you can about how to reproduce the issue 8. Submit your feedback Thanks for helping us improve!

connorMicrosoft avatar May 16 '25 14:05 connorMicrosoft

thanks @connorMicrosoft -- i've done this as well. feedback link https://aka.ms/AAw9gm8

jonathankhootek avatar May 16 '25 15:05 jonathankhootek

@connorMicrosoft , can you please follow-up on this.

RDMacLachlan avatar May 24 '25 13:05 RDMacLachlan

@jonathankhootek @alejandro5042 are you still experiencing this issue? So far we're only seeing it on your devices it seems. A Windows update might fix it - let me know.

connorMicrosoft avatar May 27 '25 14:05 connorMicrosoft

@connorMicrosoft i am, unfortunately. i'm attaching the test code i'm using, maybe there is something i'm doing wrong? (ignore the packaging project)

WpfApp1.zip

this is my machine's update history -- i'm up-to-date as far as i can tell.

Image

Image

Processor Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz (3.42 GHz) Installed RAM 32.0 GB (31.6 GB usable) System type 64-bit operating system, ARM-based processor

jonathankhootek avatar May 27 '25 14:05 jonathankhootek

Yes, I still am getting this error:

Image

I'm now on Windows 26120.4161.

Sorry I missed the Feedback Hub stuff (I was traveling). Just submitted a feedback item!

Also, I have some colleagues that also failed to run PhiSilica on their ARM-based laptops. I suspect it's not just us.

alejandro5042 avatar May 27 '25 14:05 alejandro5042

I just updated my code to 1.8.250515001-experimental2, just in case the latest library fixed it. Also had to update Win App SDK to: 1.8 Experimental2 (1.8.250515001-experimental2).

Still get the error, now just earlier in my code:

Image

alejandro5042 avatar May 27 '25 15:05 alejandro5042

BTW, I tried on 1.7.250513003 and GenerateResponseAsync is missing??

Image

alejandro5042 avatar May 27 '25 15:05 alejandro5042

@alejandro5042 1.7 and 1.8 are drastically different in how they work :\ (but both fail for me)

jonathankhootek avatar May 27 '25 15:05 jonathankhootek

And do the apps you're building have identity? We call this out on several pages in the docs: Near the top of the overview topics for each feature:

  • https://learn.microsoft.com/en-us/windows/ai/apis/phi-silica
  • https://learn.microsoft.com/en-us/windows/ai/apis/text-recognition
  • https://learn.microsoft.com/en-us/windows/ai/apis/imaging
  • https://learn.microsoft.com/en-us/windows/ai/apis/content-moderation

And there's a brief note on https://learn.microsoft.com/en-us/windows/ai/apis/troubleshooting

connorMicrosoft avatar May 29 '25 17:05 connorMicrosoft

@connorMicrosoft in my case this is a WPF application so should fall under the Win32 section, as far as i can tell? (again, it works fine for me in WinUI3 apps, just not WPF)

https://learn.microsoft.com/en-us/windows/apps/package-and-deploy/#win32-and-net-desktop-apps

we can give it an identity during packaging (though that also seemed to not help in my case -- the packaging project i used is in the code i linked above), but that means we cannot debug the application? (perhaps i'm completely misunderstanding how to implement this?)

jonathankhootek avatar May 29 '25 17:05 jonathankhootek

update! this blog post runs you through specific WPF packaging steps which i must have messed up; things are looking up! (i got the sample to work with some tweaks) https://blog.revolution.com.br/2025/05/04/adding-ai-in-your-wpf-app/

jonathankhootek avatar Jun 02 '25 19:06 jonathankhootek

There's other simple samples in https://github.com/microsoft/WindowsAppSDK-Samples/tree/release/experimental/Samples/WindowsAIFoundry targeting the latest 1.8 experimental that has the updated (pretty close to final) API shape and behavior.

jonwis avatar Jun 05 '25 06:06 jonwis

There are some things you need to add to the app manifest, which may resolve this issue. See steps 3 and 4 https://learn.microsoft.com/en-us/windows/ai/apis/get-started?tabs=winget%2Cwinui%2Cwinui2

anarvekar-msft avatar Jun 27 '25 17:06 anarvekar-msft