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

WDD stopped working with new update 5.0 - W11 #421

Closed
jhuallpa opened this issue Apr 1, 2022 · 9 comments
Closed

WDD stopped working with new update 5.0 - W11 #421

jhuallpa opened this issue Apr 1, 2022 · 9 comments

Comments

@jhuallpa
Copy link

jhuallpa commented Apr 1, 2022

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:

  • ChangeWindowsAppTheme.ps1
  • ChangeWindowsSystemTheme.ps1

Steps to Reproduce:

  1. I triggered the bug error log by forcing WDD manually, changing timezones to a different country to trigger night mode, or forcing night mode manually in the settings.

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

@t1m0thyj
Copy link
Owner

t1m0thyj commented Apr 1, 2022

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 t1m0thyj/WDD-scripts#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.

@jhuallpa
Copy link
Author

jhuallpa commented Apr 1, 2022

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)

@kjbleau
Copy link

kjbleau commented Apr 2, 2022

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()

@t1m0thyj
Copy link
Owner

t1m0thyj commented Apr 3, 2022

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.

@jhuallpa
Copy link
Author

jhuallpa commented Apr 3, 2022

I downloaded 5.0.1, tested it and everything's back to normal, thank you.

@lenuswalker
Copy link

Thanks so much for the 5.0.1 update. Scripts are now working again. You can close this one out.

@JulienMaille
Copy link

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)

@kjbleau
Copy link

kjbleau commented Apr 4, 2022

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! 🙂

@t1m0thyj
Copy link
Owner

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.

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

No branches or pull requests

5 participants