[MU4 Issue] Muse Hub client silently fails to startup, TypeInitializationException for WinRT.ActivationFactory
MalignantCarp opened this issue · 7 comments
Describe the bug
When I attempt to start the Muse Hub client, it silently fails.
To Reproduce
Steps to reproduce the behavior:
- Go to Start Menu > Muse Hub
- Crickets
Expected behavior
Muse Hub client will start.
Platform information
Muse Hub v 0.9.10.559_x64
Windows 10 Pro 64 Bit, Version 21H2 Build 19044.2251.
Additional context
This is the error I first mentioned in the comments for #14975. The following is the .NET exception from the Windows log file:
Application: Muse.exe
CoreCLR Version: 6.0.922.41905
.NET Version: 6.0.9
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for '<Module>' threw an exception.
---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception.
---> System.UnauthorizedAccessException: Access is denied. (0x80070005 (E_ACCESSDENIED))
at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
at WinRT.ActivationFactory`1..ctor()
at WinRT.ActivationFactory`1..cctor()
--- End of inner exception stack trace ---
at WinRT.ActivationFactory`1.ActivateInstance[I]()
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentInitializeOptions..ctor()
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManagerCS.AutoInitialize.get_Options() in D:\a\Muse\Muse\Windows\out\nuget\microsoft.windowsappsdk\1.2.221109.1\include\DeploymentManagerAutoInitializer.cs:line 44
at Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManagerCS.AutoInitialize.AccessWindowsAppSDK() in D:\a\Muse\Muse\Windows\out\nuget\microsoft.windowsappsdk\1.2.221109.1\include\DeploymentManagerAutoInitializer.cs:line 30
at .cctor()
--- End of inner exception stack trace ---
I think this might be a platform error, opening an issue within the Windows App SDK repo...
Can you try running the Windows App SDK runtime installer as an admin?
https://aka.ms/windowsappsdk/1.2/1.2.221109.1/windowsappruntimeinstall-x64.exe
and if it still doesn't work, this one
https://aka.ms/windowsappsdk/1.2/1.2.221116.1/windowsappruntimeinstall-x64.exe
So, I ran the first installer, and it didn't fix it, so I figured I'd restart to see if that helped (it didn't).
Ran the second installer, and again restarted as nothing had changed. Lo and behold, when I start up, Muse Hub crashes, but appears sandboxed by Comodo as it is suddenly unrecognized, so once I cleared that, it ran just fine.
Of course, I had a similar issue back when I first installed Muse Hub, and it just randomly worked after a few restarts, so it maybe had nothing to do with the runtime installer and was just luck. It would be easier to get into Comodo as a recognized piece of software if it weren't a Windows App, since that obfuscation is such a nightmare for Internet Security (not to mention constantly having to change firewall rules every time the version number changes).
Do you think it's safe to uninstall the Windows App SDK (assuming it can be)? It's not something I really want on my system.
Huh, good to hear that it's working now though!
Sandboxed by Comodo? I'm assuming some kind of software to restrict apps?
Windows App SDK is required by Muse Hub (like the .NET Runtime), so uninstalling it will break Muse Hub.
Yes, Comodo Internet Security. It sandboxes unknown applications to ensure they can't damage my system. Unfortunately, it doesn't know Muse Hub yet, and I suspect it will not be playing nicely with Windows Apps from what I know of their obfuscation and being hidden/mostly inaccessible. Not really certain; this is the first Windows App I've been forced to use.
So there's no runtime environment of some kind like Java where you have the JRE vs the JDK? It seems silly to need a software development kit to run an end-user application.
Ah, it's a little confusing (naming is not great). Up above you installed the Windows App SDK Runtime, which is the like the JRE in a way.
Windows App SDK (without Runtime) is like the JDK in a way, installed via other methods.
So yes, those links are for the runtime, just named a bit confusingly.
Closing as fixed in V2