Specified cast is not valid?
Just updated my hass agent to v2 and while I have start with windows toggled, it starts up and closes immediately. I looked at the logs and found this error below. I don't use Virtual Desktops, so how do I disable that? I'm running Windows 11.
2024-05-05 12:44:04.152 -07:00 [FTL] [PROGRAM] FirstChanceException: Specified cast is not valid.
System.InvalidCastException: Specified cast is not valid.
at WindowsDesktop.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid)
at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(Type type, Nullable
1 guidService)
at WindowsDesktop.Interop.ComInterfaceAssembly.CreateInstance(String comInterfaceName, Guid clsid)
at WindowsDesktop.Interop.ComWrapperBase
1..ctor(ComInterfaceAssembly assembly, Guid clsid)
at WindowsDesktop.Interop.Build22621.VirtualDesktopManagerInternal..ctor(ComInterfaceAssembly assembly, ComWrapperFactory factory)
at WindowsDesktop.Interop.Build22621.VirtualDesktopProvider22621.InitializeCore(ComInterfaceAssembly assembly)
at WindowsDesktop.Interop.VirtualDesktopProvider.Initialize(ComInterfaceAssembly assembly)
at WindowsDesktop.VirtualDesktop.InitializeCore()
at WindowsDesktop.VirtualDesktop.InitializeIfNeeded()
at WindowsDesktop.VirtualDesktop.Configure()
at HASS.Agent.Managers.VirtualDesktopManager.Initialize() in D:\a\HASS.Agent\HASS.Agent\src\HASS.Agent\HASS.Agent\Managers\VirtualDesktopManager.cs:line 24
2024-05-05 12:44:04.152 -07:00 [ERR] [VIRTDESKT] Error initializing Virtual Desktop Manager, your Windows version may be unsupportedSolution:Jump to solution
Log was too long for message, tried to upload a text file...either way, issue resolved itself when I disabled satellite service
5 Replies
Hello, could you please try this beta version? https://github.com/hass-agent/HASS.Agent/releases/tag/2.1.0-beta1 (or at least https://github.com/hass-agent/HASS.Agent/releases/tag/2.0.2-beta2 since this specific version addressed this issue)
GitHub
Release 2.1.0-beta1 · hass-agent/HASS.Agent
Changes
Added "SetAudioInputCommand" (thanks to Chrisdegod for the suggestion) - #41
Added "ScreenshotSensor", functioning as camera entity (huge thanks for @denisabt for the i...
GitHub
Release 2.0.2-beta2 · hass-agent/HASS.Agent
Changes
This version attempts to fix HASS.Agent crash when virtual desktops are switched.
Probable root cause was bug in the management library HASS.Agent uses, this version bumps the dependency ve...
Just installed 2.1.0 beta1 got this
2024-05-05 13:00:12.242 -07:00 [FTL] [PROGRAM] FirstChanceException: Element not found. (0x80070490)
System.Runtime.InteropServices.COMException (0x80070490): Element not found. (0x80070490)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at CoreAudio.AudioSessionManager2.UnregisterNotifications()
Nevermind, might be because I hadn't restarted
I have restarted the computer, and now I get this error:
FirstChanceException:those are common with debug logging, unless followed by another non first change exception it can be ignored
https://b.chihi.ro/1bxkXo.png
forgot to paste it :D?
Solution
Log was too long for message, tried to upload a text file...either way, issue resolved itself when I disabled satellite service