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

Plugin crash after run #4

Closed
kubalav opened this issue Nov 9, 2021 · 10 comments · May be fixed by #5
Closed

Plugin crash after run #4

kubalav opened this issue Nov 9, 2021 · 10 comments · May be fixed by #5
Assignees

Comments

@kubalav
Copy link

kubalav commented Nov 9, 2021

Plugin crash after run. It show crash window only.

Crash log

Flow Launcher version: 1.8.3
OS Version: Microsoft Windows NT 10.0.19041.0
IntPtr Length: 8
x64: True

Python Path: C:\Users\WDAGUtilityAccount\AppData\Local\Programs\Python\Python310\pythonw.exe
Date: 11/08/2021 19:56:44
Exception:
System.IO.InvalidDataException: Window Services|Traceback (most recent call last):
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\run.py", line 12, in
WindowServices()
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\lib\flox\flox.py", line 82, in init
super().init()
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\lib\flox\launcher.py", line 28, in init
results = request_method(*request_parameters)
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\lib\flox\flox.py", line 89, in _query
self.query(query)
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\plugin\window_services.py", line 32, in query
services = s.get_services()
File "C:\Users\WDAGUtilityAccount\AppData\Roaming\FlowLauncher\Plugins\Window Services-1.1.1\plugin\services.py", line 37, in get_services
services = sp.check_output("sc query type= service state= all", shell=True).decode("utf-8").split("\r\n\r\n")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa7 in position 81429: invalid start byte

at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 258
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.ExecuteAsync(ProcessStartInfo startInfo, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 272
at Flow.Launcher.Core.Plugin.JsonRPCPlugin.QueryAsync(Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\JsonRPCPlugin.cs:line 291
at Flow.Launcher.Core.Plugin.PluginManager.<>c__DisplayClass22_0.<b__0>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 192
--- End of stack trace from previous location ---
at Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(String message, Func`1 action) in C:\projects\flow-launcher\Flow.Launcher.Infrastructure\Stopwatch.cs:line 40
at Flow.Launcher.Core.Plugin.PluginManager.QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) in C:\projects\flow-launcher\Flow.Launcher.Core\Plugin\PluginManager.cs:line 191
at Flow.Launcher.ViewModel.MainViewModel.<>c__DisplayClass116_0.<g__QueryTask|2>d.MoveNext() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 591
--- End of stack trace from previous location ---
at Flow.Launcher.ViewModel.MainViewModel.QueryResults() in C:\projects\flow-launcher\Flow.Launcher\ViewModel\MainViewModel.cs:line 565
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@Garulf
Copy link
Owner

Garulf commented Nov 9, 2021

I've been working on a fix for your crash. Please try and manually install: https://github.com/Garulf/window-services/releases/tag/v1.1.5

EDIT: Any chance you can run sc query type= service state= all in cmd.exe and post the output for me to inspect?

@kubalav
Copy link
Author

kubalav commented Nov 9, 2021

It work's, but it has wrong encoding. See screen:

obrázok_2021-11-09_115903

@kubalav
Copy link
Author

kubalav commented Nov 9, 2021

I've been working on a fix for your crash. Please try and manually install: v1.1.5 (release)

EDIT: Any chance you can run sc query type= service state= all in cmd.exe and post the output for me to inspect?

Here you are:
services.txt

@Garulf
Copy link
Owner

Garulf commented Nov 14, 2021

Okay, after some research I think I have this working.... Please try: https://github.com/Garulf/window-services/releases/tag/v1.1.6

@Garulf Garulf linked a pull request Nov 14, 2021 that will close this issue
@Garulf Garulf self-assigned this Nov 14, 2021
@kubalav
Copy link
Author

kubalav commented Nov 14, 2021

The issue is different, but is still persist.

obrázok_2021-11-14_093159

@Garulf
Copy link
Owner

Garulf commented Nov 14, 2021

Okay, I'll keep trying... thanks for trying it out.

@Garulf
Copy link
Owner

Garulf commented Nov 16, 2021

Not sure why the encoding is so mangled. It may very well be the shell messing with the encoding.

Re-writing and pulling directly from the source (the registry) might be for the best.

@Garulf
Copy link
Owner

Garulf commented Nov 29, 2021

Still researching a proper solution to this issue. I have a few questions that may help.

  • Which version of windows are you using?
  • Which language is the OS using?
  • What codepage comes up when you type: chcp into cmd.exe?
    image

@kubalav
Copy link
Author

kubalav commented Nov 29, 2021

  • Windows 10 Pro 21H1 x64, Build 19043.1348
  • Slovak language
  • Active code page: 852

@Garulf
Copy link
Owner

Garulf commented Dec 13, 2021

Okay, after many attempts to get a proper solution I think I found one.

image

Please try this version: https://github.com/Garulf/window-services/releases/tag/v1.1.3

If you're on Flow Launcher 1.9.0 release or higher you can type: pm install https://github.com/Garulf/window-services/releases/download/v1.1.3/window-services.zip to manually install this version.

@Garulf Garulf closed this as completed Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants