Components Not Installing

I have been away from Universal for a bit, just returning. I installed 2.3.1, but notice an issues installing components from the Marketplace. On pretty much any component, I click Install, get the circle for a moment, then nothing. No error, but the component is not installed. Just curious if anyone else has experience this, and wondering where I might find logging to determine what exactly is failing.

Just an addendum, I do know that I can install the modules directly. I then have to change the Environment from Default to 5.1 for them to work. I am just curious why the install from the admin console is not working. I have tried about half a dozen Components now, and they all fail.

Product: PowerShell Universal
Version: 2.3.1

I’ll look into it.

The problem with installing them manually, is that the Default environment is the integrated environment and is using PS7.1.4

@adam Agreed. Adding them manually got me limping along but definitely not ideal. Let me know if you need any testing/info from me.

Just checking in to see if there were any thoughts on this? I just installed the latest version (2.4.1) and all installs of components from the Marketplace still fail.

Can you check the PSU log to see if there are any relevant errors there? I know you mentioned that you didn’t see any errors but was that in the log as well?

I opened an issue to track this: Marketplace Components Failing to Install · Issue #662 · ironmansoftware/issues · GitHub

The log file does not show any errors, no. When I click on any install under MarketPlace, it just spins:

@adam I changed the logging level to Debug, and here is what I see on start-up. No errors when I attempt to download a component from the Marketplace, but it looks like several built-in components are throwing errors on launch. Not sure if this is related or a completely separate issue.

Edit: This was a simple installation from the MSI, forgot to mention that

2021-11-05 09:00:06.729 -07:00 [INF] User profile is available. Using ‘C:\WINDOWS\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys’ as key repository and Windows DPAPI to encrypt keys at rest.
2021-11-05 09:00:11.035 -07:00 [ERR] Failed to read component module.
2021-11-05 09:11:38.047 -07:00 [DBG] Hosting starting
2021-11-05 09:11:38.121 -07:00 [INF] User profile is available. Using ‘C:\WINDOWS\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys’ as key repository and Windows DPAPI to encrypt keys at rest.
2021-11-05 09:11:38.265 -07:00 [DBG] Reading data from file ‘C:\WINDOWS\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys\key-94c06c7c-68f1-4c57-93e4-b7083af26d14.xml’.
2021-11-05 09:11:38.276 -07:00 [DBG] Found key {94c06c7c-68f1-4c57-93e4-b7083af26d14}.
2021-11-05 09:11:38.288 -07:00 [DBG] Considering key {94c06c7c-68f1-4c57-93e4-b7083af26d14} with expiration date 2022-02-03 15:16:18Z as default key.
2021-11-05 09:11:38.297 -07:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
2021-11-05 09:11:38.298 -07:00 [DBG] Decrypting secret element using Windows DPAPI.
2021-11-05 09:11:38.299 -07:00 [DBG] Forwarded activator type request from Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60
2021-11-05 09:11:38.302 -07:00 [DBG] Opening CNG algorithm ‘AES’ from provider ‘null’ with chaining mode CBC.
2021-11-05 09:11:38.305 -07:00 [DBG] Opening CNG algorithm ‘SHA256’ from provider ‘null’ with HMAC.
2021-11-05 09:11:38.307 -07:00 [DBG] Using key {94c06c7c-68f1-4c57-93e4-b7083af26d14} as the default key.
2021-11-05 09:11:38.307 -07:00 [DBG] Key ring with default key {94c06c7c-68f1-4c57-93e4-b7083af26d14} was loaded during application startup.
2021-11-05 09:11:38.382 -07:00 [DBG] Loading framework from asset directory: C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.9
2021-11-05 09:11:39.516 -07:00 [DBG] The specified RequiredModules entry ‘Universal’ in the module manifest ‘C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.9\UniversalDashboard.psd1’ is invalid. Try again after updating this entry with valid values.
2021-11-05 09:11:39.542 -07:00 [DBG] Loading framework from asset directory: C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\3.7.1
2021-11-05 09:11:39.657 -07:00 [DBG] The specified RequiredModules entry ‘Universal’ in the module manifest ‘C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\3.7.1\UniversalDashboard.psd1’ is invalid. Try again after updating this entry with valid values.
2021-11-05 09:11:39.764 -07:00 [DBG] The specified RequiredModules entry ‘UniversalDashboard’ in the module manifest ‘C:\ProgramData\PowerShellUniversal\Dashboard\Components\UniversalDashboard.Charts\1.3.2\UniversalDashboard.Charts.psd1’ is invalid. Try again after updating this entry with valid values.
2021-11-05 09:11:39.884 -07:00 [DBG] The specified RequiredModules entry ‘UniversalDashboard’ in the module manifest ‘C:\ProgramData\PowerShellUniversal\Dashboard\Components\UniversalDashboard.CodeEditor\1.1.1\UniversalDashboard.CodeEditor.psd1’ is invalid. Try again after updating this entry with valid values.
2021-11-05 09:11:39.984 -07:00 [DBG] The specified RequiredModules entry ‘UniversalDashboard’ in the module manifest ‘C:\ProgramData\PowerShellUniversal\Dashboard\Components\UniversalDashboard.Map\1.0\UniversalDashboard.Map.psd1’ is invalid. Try again after updating this entry with valid values.
2021-11-05 09:11:40.127 -07:00 [DBG] Reading configuration file licenses.ps1
2021-11-05 09:11:40.128 -07:00 [DBG] Reading configuration file accessControls.ps1
2021-11-05 09:11:40.128 -07:00 [DBG] Reading configuration file tags.ps1
2021-11-05 09:11:40.132 -07:00 [DBG] Reading configuration file settings.ps1
2021-11-05 09:11:42.174 -07:00 [ERR] Failed to read component module.

Those errors are fine. They haven’t caused any issues in the past. I see them too.

The one last thing to check with the marketplace would be to open F12 developer tools to see if 400s are being returned. I just took a look at the code and it looks like we are catching errors and returning 400 when it fails. That said, it should be logging an error when it fails to save the module.

What we are doing is returning the first PS environment (?) and then running this:

pwsh.exe -NoProfile -ExecutionPolicy Unrestricted -Command "& { Save-Module -Name 'ModuleName' -Path 'C:\ProgramData\PowerShellUniversal\Dashboard\Components' -Force }"

Depending on the first environment, it might use powershell.exe. I don’t really know why we are spinning up another powershell instance at all…

I am not seeing any 400 returns. In fact, in dev tools under Network, I can see the call go out, but after 12 minutes it is still spinning and there is nothing at all under the response tab, good or bad.

I opened an issue for this to track it: Components not installing from the Marketplace · Issue #688 · ironmansoftware/issues · GitHub

@adam Just an awareness, I just downloaded 2.9.2 and encountered the same issue with installing components from the Marketplace. I browse out and find GridLayout on a brand new (Windows 10) VM, click the download, and nothing. It doesn’t spin and time out like it used to, but also doesn’t install anything.

I did notice that the path C:\ProgramData\PowerShellUniversal\Dashboard\Components was not created via the MSI install, even after reboot. On a clean snapshot, with this path created manually after install, the components install just fine. Perhaps just adding a check for path before the Save-Module would do the trick, or adding the folder as “Add if it does not exist” in the MSI package.

1 Like