Product: PowerShell Universal
Version: 4.3.4
I messed up with just one line, but now no matter what I do the app won’t start again.
I wanted to take a look at a few themes.
The code below might or might not contain the mistake.
Basically I sent the wrong data to set-udtheme.
Now the app is broken.
Changing the code, restarting - nothing helps.
Edit:all you need to do is this:
$theme=get-udtheme -Name "xxx"
Set-UDTheme -theme $theme
It will show and error, then set the theme to null and the app is broken.
And that can’t be reversed (without some unknown trick)
Error rendering dashboard
This error is not expected. Please contact Ironman Software support.
Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=TypeError%3A%20Cannot%20read%20properties%20of%20null%20(reading%20'globalStyle') for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
$themepath="C:\ProgramData\PowerShellUniversal\Server\Modules\Universal\themes"
$themes=Get-ChildItem -Path $themepath -file *.json
New-UDSelect -id "select" -FullWidth -option {
$themes|%{
New-UDSelectOption -Name $_.basename -Value ($_.BaseName)
}
} -OnChange {
Show-UDToast -Message $eventdata
$theme=Get-UDTheme $eventdata
set-udtheme -theme $theme
}