Issues with 2.8.1

Product: PowerShell Universal
Version: 2.8.1

I noticed two issues in 2.8.1:

  1. $headers.windowLocation is returning null. Exporting $headers to a JSON file shows the values are present. I can also enumerate through the values matching the key and then retrieving the value.

  2. UniversalDashboard.Charts 1.3.3 is causing “Minified React error #31”. I was able to manually install version 1.3.2 and the errors stopped.

NOTE: Upgraded from 2.7.3 to 2.8.1; previously installed via MSI prior to 2.8.1. Uninstalled 2.7.3 and then installed 2.8.1 via Install-Module Universal.

  1. Can you share some code for this? I just tried this and it worked.
New-UDDashboard -Title 'Hi' -Content {
    Show-UDToast ($headers.windowLocation) -Duration 5000

  1. Can you also share some code for this?

I tried a bunch of the examples from here:

They seem to work. Also, just to be clear, you are running 2.8.1? 2.8.2 doesn’t exist…yet.

Sorry, it is 2.8.0

Sample Code:

New-UDDashboard -Title "Hello, World!" -Content {
    $Data = Get-Process | Sort-Object -Property CPU -Descending | Select-Object -First 10
    New-UDChartJS -Type 'doughnut' -Data $Data -DataProperty CPU -LabelProperty ProcessName

    Show-UDToast ($headers.windowLocation) -Duration 5000
    $headers.windowLocation | Out-File C:\Temp\location.txt

Issue #1

I tried the header variable again and it was working when I tested with your code. Tried a few more times between different authentication methods and it kept working; was the only change I made between my first report of the issue and your reply. Then suddenly it stopped. Here is the odd thing, the first time I received the error message using Show-UDToast, my file had the correct value. Refreshed the page and now the text file is empty as well.


Another oddity, the code I had in a shared module has reverted back to when I first saw the problem. My changes to enumerate through and find the key is gone. My original code is now working again in the shared module (sample code above doesn’t use this shared module though):

switch -Wildcard ($Headers.windowlocation) {
        '*home*' { $PageTitle = 'Server Dashboard' }
        '*website-status' { $PageTitle = 'Website Status' }
        '*playground*' { $PageTitle = 'Playground' }

I’ll keep playing around and see if I can figure out a way to track this down.

Issue #2

I uninstalled version 1.3.2 received the following:

Installed version 1.3.3 again:

Obviously, restarted services after the uninstall/install.