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

Error starting Windows: Plugin: Program - fail to load and would be disabled #34216

Open
ic2ic2 opened this issue Aug 8, 2024 · 14 comments
Open
Labels
Issue-Bug Something isn't working Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@ic2ic2
Copy link

ic2ic2 commented Aug 8, 2024

Microsoft PowerToys version

0.83

Installation method

GitHub

Running as admin

None

Area(s) with issue?

General

Steps to reproduce

Probably after a Windows update, after starting the PC I get an error box with this text:

Plugin: Program - fail to load and would be disabled, please contact plugin creator for help. I have updated to the latest, 0.83 version, without change. Deinstalling or reinstalling an older version 0.68 stops the problem.

How can I prevent this issue?
PowerToysError1

✔️ Expected Behavior

That this error doesn't appear every time I start Windows

❌ Actual Behavior

The error appears every time I start Windows

Other Software

No response

@ic2ic2 ic2ic2 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 8, 2024
@ic2ic2 ic2ic2 changed the title Error starting WIndows: Plugin: Program - fail to load and would be disabled Error starting Windows: Plugin: Program - fail to load and would be disabled Aug 8, 2024
@davidegiacometti davidegiacometti added Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface labels Aug 8, 2024
@davidegiacometti
Copy link
Collaborator

Hi! Can you share a few recent PowerToys Run log files?
It should contain useful information related to the error.
%LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Logs\0.83.0.0

/needinfo

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Aug 8, 2024
@ic2ic2
Copy link
Author

ic2ic2 commented Aug 8, 2024 via email

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 8, 2024
@davidegiacometti
Copy link
Collaborator

Hi, email attachments don't appear here. You need to drag and drop the logs in the answer here on GitHub.

@ic2ic2
Copy link
Author

ic2ic2 commented Aug 9, 2024

Ok - here's the log attached to this message.

PowerToyslog_2024-08-08.txt

@davidegiacometti
Copy link
Collaborator

[2024-08-08 09:18:06.6441] [ERROR] [D:\a\_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::239]
-------------------------- Begin exception --------------------------
Message: Fail to Init plugin: Program

Exception full name  : System.Runtime.InteropServices.COMException
Exception message    : 
Exception stack trace:
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at WinRT.EventSource`1.Subscribe(TDelegate del)
   at Windows.ApplicationModel.PackageCatalog.add_PackageInstalling(TypedEventHandler`2 value)
   at Microsoft.Plugin.Program.Programs.PackageCatalogWrapper.add_PackageInstalling(TypedEventHandler`2 value)
   at Microsoft.Plugin.Program.Storage.PackageRepository..ctor(IPackageCatalog packageCatalog, PluginInitContext context)
   at Microsoft.Plugin.Program.Main.Init(PluginInitContext context)
   at Wox.Plugin.PluginPair.InitPlugin(IPublicAPI api)
Exception source     : WinRT.Runtime
Exception target site: Void <ThrowExceptionForHR>g__Throw|39_0(Int32)
Exception HResult    : -2147023838
-------------------------- End exception --------------------------

Unfortunately the error doesn't give so many info: -2147023838 -> 0x80070422 -> ERROR_SERVICE_DISABLED
Something is not working with the code to read packaged apps installed from the Store.

@davidegiacometti davidegiacometti added Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels Aug 9, 2024
@ic2ic2
Copy link
Author

ic2ic2 commented Aug 9, 2024

Hello Davide,
What kind of packages from the Store that PowerToys need are we talking about? I don't think I changed anything in any Store app. What could I try to get rid of this error? Like reinstalling something? Uninstalling and reinstalling PowerToys itself didn't help.

@davidegiacometti
Copy link
Collaborator

It's hard to determine what's going on here. The cause may be external to PowerToys.
Xref #19845

@ic2ic2
Copy link
Author

ic2ic2 commented Aug 19, 2024

It's great that I got a reaction. But unfortunately, as with all products marked 'Microsoft', everything tends to get worse after updates and issues are never solved. I found this issue also as 19845, 2 years ago. One user solved it by completely removing the "PT" Program Files subdirectory but that didn't fix the issue for me.

I know (as a software developer) that it's often hard to determine what is going on. But then I try to find that out. E.g.: I assume this error can be found somewhere in the program? So why simply stop giving this dialog as the error doesn't give any information what is going on anyway? I would be fine with that. Otherwise: extend the error with more information about which plugin failed to load so the end user has at least a chance to solve it.

It's very unprofessional that a tool starts showing an error with every Pc restart and no attempt is made to solve it in 2 years.

@GhostVaibhav
Copy link
Contributor

Hi @ic2ic2, can you try running Powertoys as admin?

@ic2ic2
Copy link
Author

ic2ic2 commented Aug 26, 2024

Hi @ic2ic2, can you try running Powertoys as admin?

Hello GhostVaibhav,

I solved the issue! I'll explain how and what causes it.

First I tried to find out where PowerToys autostarts from. I could not find a Run option in the registry (for PowerLauncher.exe I expect) not an entry in the Task Manager. I think it is a process in the Task Scheduler although it says under "Last run results) that the task has not been executed where it is. But I found an option to directly click Restart PowerToys as administrator in the General section of the PowerToys Settings. And I checked the option Always run as administrator. Also I disabled every option from the Dashboard I did not use.
After restarting the error stayed away, so I tried if it would return if I again unchecked Always run as administrator.
But it didn't. As the admin mode seems to be able to cause some issues, it is better to not use it so I started to add the switched off options group by group. And then, on enabling PowerToys Run, see picture, the error immediately appeared again.

PowerToysRun

So the problem is caused by PowerToys Run. With all options enabled except this one, and not even starting in admin mode, the error stays away. I see that there's a section Plugins within this option which are then handled by PowerToys. No doubt a plugin added to the list and set to On isn't actually there or something.

For now I can do without the whole option. But it would be good if the developers could extend the above message by simply telling which plugin did not load, together with the recommendation to go to Power Toys Run and disable it there. I think that would help quite a few users as I am not the only one who had this issue. And if I may say so, I would expect the developers to link the error message to this PowerToys Run option, which is (party) all about handling plugins, and suggest me to check that setting. But that didn't happen.

Anyhow, thanks GhostVaibhav for your suggestion I found the right direction to solve this.

@GhostVaibhav
Copy link
Contributor

Hi @ic2ic2, thanks for getting back. I've some quick updates on the issue that you are facing. Also, a little heads-up of what happened.

  1. This issue is already tagged with the Powertoys Run tag, so it was Run causing the problems all along.
  2. For which plugin in Run is causing the error, you can see that in the original error message (i.e. the Program plugin).
  3. The error is most probably the plugin not having access to read the start menu. When you switch to admin, that access is resolved and everything works just fine.

I think for the time being, you can switch off the plugins in the Powertoys Run that is causing this kind of error (You can have a look at them in the error dialog box) and continue using the tool as intended.

@ic2ic2
Copy link
Author

ic2ic2 commented Aug 26, 2024

Hello GhostVaibhav,

Thanks for the further reply; I've got the following remarks:

1 I see the tag and recognize it now. But why did Davide tag it as such but not simply explain that I had to disable the plugin called "Program" in the dashboard option "Power Toys Run"? Because that solves it and both "Power toys Run" and "Program" are pretty generic words in a program which I did not at all associate with options in the program. Now I spent quite some time finding this out. With the reply "It's hard to determine what's going on here" my conclusion was that there was no clue about what caused it. ... I now think Davide may have meant not knowing why that specific plugin didn't work but I did not care about the ground reason at all; I just wanted to get rid of a daily error to click Ok on. Which is now finally the case :)

2 I get the same error when I enable the option in Admin mode. But I can run it as normal user with Power toys Run" enabled and 'Program' disabled in the plugin list and then it works too. Until I found a advantage of using the option I will keep it disabled anyhow.

@davidegiacometti
Copy link
Collaborator

Hi @ic2ic2

I now think Davide may have meant not knowing why that specific plugin didn't work but I did not care about the ground reason at all

Sorry for the confusion.. I knew that the error was caused by the Program plugin of PowerToys Run 😓

We definitely need to improve these dialogues!

Unfortunately running PowerToys as administrator doesn't help since Run is always executed as user.

@ic2ic2
Copy link
Author

ic2ic2 commented Aug 26, 2024

Hello Davide,
No worries. I'm glad it's solved and acknowledged that the dialogues should (and will) be improved.
Both the error window and the above dialogue haha.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
Status: No status
Development

No branches or pull requests

3 participants