Closed jhuallpa closed 2 years ago
The message you mentioned in the log is expected in Windows 11 Insider Edition because Microsoft keeps changing the undocumented VirtualDesktop API. It should be safe to ignore and should not generate any error dialogs:
System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary
PowerShell scripts are broken in v5 (related to https://github.com/t1m0thyj/WDD-scripts/issues/16) and I'm working on a fix.
Any additional information you can provide from the logs would be helpful. It'll be difficult to diagnose the error without more specific details since Night Mode works for me.
I installed the new version again from the Microsoft Store to help you out because I like the app, here are the logs:
I triggered it by closing windynamicdesktop and running it again.
[2022-04-01 13:48:13.458] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-01 13:50:30.647] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-01 13:51:00.082] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-01 13:51:10.449] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-01 13:51:47.134] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-01 13:52:04.734] System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted() at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0() at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
pretty much the same for me, windows 11 as well, if you care, here is my log - Ken [2022-04-02 02:27:33.074] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-02 11:50:55.953] System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted() at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0() at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[2022-04-02 11:51:09.218] System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted() at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0() at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[2022-04-02 11:56:23.380] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
[2022-04-02 13:12:14.142] System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.HandleExplorerRestarted() at WindowsDesktop.VirtualDesktop.<>c.<.cctor>b__70_0() at WindowsDesktop.Utils.ExplorerRestartListenerWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[2022-04-02 13:21:36.314] Failed to configure virtual desktop System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary. at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly() at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly() at WindowsDesktop.VirtualDesktop.InitializeCore() at WindowsDesktop.VirtualDesktop.InitializeIfNeeded() at WindowsDesktop.VirtualDesktop.Configure() at WinDynamicDesktop.VirtualDesktopApi.Initialize()
Just published version 5.0.1 which should fix this. For now I've disabled the virtual desktop API from initializing on Windows builds newer than 22000. Since it doesn't work there anyway, its better not to load it at all than to have it throw these errors. In the future once the VirtualDesktop library supports the Windows 11 Insider build, I'll reenable it in WDD for all Windows versions.
I downloaded 5.0.1, tested it and everything's back to normal, thank you.
Thanks so much for the 5.0.1 update. Scripts are now working again. You can close this one out.
I'm getting this error with 5.0.1
[2022-04-03 21:00:03.166] System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WinDynamicDesktop.WallpaperEngine.RunScheduler(Boolean forceImageUpdate)
at WinDynamicDesktop.AppContext..ctor(String[] args)
at WinDynamicDesktop.Program.Main(String[] args)
Smooth sailing here so far - I installed the 64bit version on windows 11 - can't find the %user%appdata\local\packages\38719TimothyJohnson folder anymore, but working! 🙂
The IndexOutOfRangeException
and any remaining virtual desktop issues should be fixed in v5.1.0:
This version removes syncing wallpaper across virtual desktops in Windows 11 which used an experimental API that is too unstable to support. If you still want this functionality, install the Sync Virtual Desktops script.
I received the 5.0 update through the microsoft store for windows 11 and WDD stopped working telling me to check the logs. I couldn't save everything the log said but I saved this part:
System.Collections.Generic.KeyNotFoundException: The given key 'IApplicationView' was not present in the dictionary
Wallpapers work from day to night without and issue. The timezone works too but the powershell scripts don't work. I'm using:
Steps to Reproduce:
Are you using the Microsoft Store version of WDD?: Yes I was using the Microsoft Store version of WDD.
I have rolledback to 4.7 (downloaded from github) and it's working without any issues.
I'm on Windows 11 Pro - Beta release
Version : 22h2 Experience: Windows Feature Experience Pack 1000.22581.200.0