net::ERR_INSUFFICIENT_RESOURCES UdChart

PowerShell Universal v1.3.2
Universal Dashboard v2.9.3
Running through IIS with AD auth
Powershell 7 or 5.1

@adam Does this look like a bug to you with New-UdChart? Even if i have a basic chart on its own like the example:
New-UDChart -ID “Chart1” -Type Bar -Endpoint {
Get-Process |
Sort-Object -Descending -Property PM |
Select-Object -First 10 |
Out-UDChartData -DataProperty PM -LabelProperty Name -BackgroundColor ‘#FF530D’ -BorderColor ‘black’ -HoverBackgroundColor ‘#FF9F0D
}

I get the error (there are about 200 failed requests per second) with the error:



Thanks.

i have the same issue it needs to be fixed like ud-monitor issue before.

Added it to our 1.4 backlog.

I can’t reproduce this on the latest 1.4. Are either of you in a place to validate the 1.4 release works for you?

in my test with 1.4 i have the issue still, the chart will show as this but when you open dev tools its keep growing fetch errors none stop.

i did test Monday nightly

image

just tested on last night nightly release and the issue still the same, google chrome dev tools keep showing the above attached errors and keep growing so fast none stop.

Ahhhhh ok. I see the issue now. This should be fixed in tonight’s nightly build.

Thanks for testing and letting me know!

Cheers everyone. I’ll test it tomorrow.

That does appear to have worked so thanks!

Re 1.4 nightly, it seems a little buggy as expected as its not a release but some notes… I am now using AAD auth (OIDC) and SSL (not using IIS today), when i add a dashboard, or restart a dashboard i get:


however it sorts itself out in a few seconds.

I also notice the UniversalDashboard.CodeEditor folder is extracting to the wrong place, its actually a folder level down Universal\UniversalDashboard\Components\UniversalDashboard.CodeEditor\UniversalDashboard.CodeEditor - so just moved the files back to Universal\UniversalDashboard\Components\UniversalDashboard.CodeEditor and all was fine.

Thanks Adam!

Cool. Thanks for the feedback. Please let me know if you run into anything else!

Some further testing: It appears to be loading the dashboard.ps1 endpoints before it loads modules even though modules are listed in the ps1 before endpoints. My endpoints use Azure functions that are loaded in from a module.

It also appears that endpoints on a New-UDEndpointSchedule do not run.

New-UDElement with -AutoRefresh and -RefreshInterval also does not refresh…

Im still having auth issues on dashboards using OIDC. When i go to a dashboard URL it fails to load with https://url/login?returnurl=/testing in the address bar. When i first load PSU Admin page from https://url/Admin it works fine as my AAD user, i can then open up dashboards and they work perfectly as my AAD $user but when it times out again the dashboard pages fail to re-authenticate me. Any thoughts?

Cheers!

It appears to be loading the dashboard.ps1 endpoints before it loads modules even though modules are listed in the ps1 before endpoints. My endpoints use Azure functions that are loaded in from a module.

When you say endpoints, are you just referring to endpoints within controls? Like UDDynamic or UDPage.

It also appears that endpoints on a New-UDEndpointSchedule do not run.

This is a bug. Looking into it.

New-UDElement with -AutoRefresh and -RefreshInterval also does not refresh…

This one I cannot reproduce. This works fine.


New-UDElement -Tag 'div' -Endpoint {
    Get-Date
} -AutoRefresh -RefreshInterval 1

When i go to a dashboard URL it fails to load with https://url/login?returnurl=/testing in the address bar. When i first load PSU Admin page from https://url/Admin it works fine as my AAD user, i can then open up dashboards and they work perfectly as my AAD $user but when it times out again the dashboard pages fail to re-authenticate me. Any thoughts?

Sound like a bug. I will take a look.

Thanks Adam,

#1 - By Endpoints, i mean anything inside the dashboard.ps1 $Endpoints area, i.e. anything that is on a New-UDEndpointSchedule doesnt work…

As for New-UDElement with -AutoRefresh and -RefreshInterval also does not refresh… - Please try this dashboard, this should update the progress during the Start-Sleep phase, i have this working on all my pages that need to load data in versions prior to PSU 1.4.0 nightly.

# Create Dashboard - Pages

$Pages = @()

$Pages += New-UDPage -id "PageAdmin" -Name "Admin" -DefaultHomePage -Icon globe -Title "Administration" -Endpoint {

    # Loading Modal

    Show-UDModal -Header {

        New-UDHeading -Size 4 -Text "Loading Data, Please Wait..."

    } -Content {

        # Loader

        New-UdElement -tag 'div' -Endpoint {

            if ($Session:Loading -eq $true) {

                New-UDElement -Tag 'div' -Content {

                    New-UdParagraph -Text $Session:LoadingFunction

                    New-UDPreloader -PercentComplete $Session:LoadingPercent

                }

            } else {

                Hide-UdModal

            }

        } -AutoRefresh -RefreshInterval 1

    }

    New-UdElement -tag 'div' -Endpoint {

        $Session:Loading = $true

        $Session:LoadingPercent = 0

        $Session:LoadingFunction = "Portal Starting, please wait..."

        Start-Sleep 1

        $Session:LoadingPercent = 20

        Start-Sleep 1

        $Session:LoadingPercent = 40

        Start-Sleep 1

        $Session:LoadingPercent = 60

        Start-Sleep 1

        $Session:LoadingPercent = 80

        Start-Sleep 1

        $Session:LoadingPercent = 99

        Start-Sleep 1

        $Session:Loading = $false

    }

}

$Navigation = New-UDSideNav -Width 225 -Content {

    New-UDSideNavItem -Text "Admin" -PageName "Admin"

}

New-UDDashboard -Title 'Testing' -Navigation $Navigation -Pages $Pages

Cool. Thanks for the info. I will take a look today. FYI, the OIDC redirect issue with dashboards has b een resolved.

Superb!

I just tested the latest nightly and it looks like the fix I put in for scheduled endpoints is working. When I load modules at the top of the file they are both available in the scheduled endpoint as well as endpoints within the dashbaord.

Import-Module Hyper-V

$Schedule = New-UDEndpointSchedule -Every 5 -Second
$Endpoint = New-UDEndpoint -Endpoint {
    $Cache:Data = Get-Module | Select-Object Name
} -Schedule $Schedule 

New-UDDashboard -Title "Dashboard" -Content {
    New-UDTable -Data $Cache:Data -Title 'Scheduled Endpoint'

    $Data = Get-Module | Select-Object Name
    New-UDTable -Data $Data -Title 'Endpoint'
}

I can certainly reproduce the element issue. I don’t know why that’s happening. I had also forgotten you were using the v2 framework. Is that just because you have existing dashboards in v2?

The element issue doesn’t happen in v3.

# Create Dashboard - Pages

$Pages = @()

$Pages += New-UDPage -Name "Admin"  -Content {

    # Loading Modal

    Show-UDModal -Header {

        New-UDHeading -Size 4 -Text "Loading Data, Please Wait..."

    } -Content {

        # Loader
        New-UDDynamic -Content {
            New-UDTypography -Text $Session:LoadingFunction
            New-UDProgress -PercentComplete $Session:LoadingPercent
        } -Id 'test'

    }

    New-UdElement -tag 'div' -Endpoint {
        $Session:Loading = $true
        1..10 | ForEach-Object {
            $Session:LoadingPercent = $_ * 10
            $Session:LoadingFunction = "Portal Starting, please wait..."
            Sync-UDElement -Id 'test'
            Start-Sleep 1
        }
        $Session:Loading = $false
        
    }

}

New-UDDashboard -Title 'Testing' -Pages $Pages

Thanks Adam, I am still on v2 as I have a lot to migrate. I moved to PSU and split each page to a new dashboard which will make the transition easier but will still take a little time. I’m away for a week now so will take a look when I get back but thanks once again for your help.

Hi Adam, i have been away and come back to 1.4.3 which is a suprise! I have tested OIDC and i still get the same thing, i have to authenicate to https://dashboard/admin with AAD, then when i do i can get to any dashboards, if i dont go to the PSU page, and go directly to a dashboard it is just a blank screen until i authenticate against PSU/admin again…

Also, -refreshinterval and autorefresh are working, but not in the expected way. Previously i had something like this:
New-UdColumn -Endpoint {
Show-UDToast -Message $Session:LoadingPercent
New-UdParagraph -Text $Session:LoadingPercent
New-UDPreloader -PercentComplete $Session:LoadingPercent
} -AutoRefresh -RefreshInterval 1
# Get Functions
New-UdColumn -Endpoint {
$Session:LoadingPercent = 0
Start-Sleep 1
$Session:LoadingPercent = 20
Start-Sleep 1
$Session:LoadingPercent = 40
Start-Sleep 1
$Session:LoadingPercent = 60
Start-Sleep 1
$Session:LoadingPercent = 80
Start-Sleep 1
$Session:LoadingPercent = 100
Start-Sleep 1
}

but elements do not work. The Toast works every second, but New-UdParagraph does not, and UDPreLoader only contains the first load data. This is very strange…

I am using the MSI installer, OIDC, HTTP on 80 and HTTPS on 443 with imported cert in appjson with AAD.

Thanks!

@adam , some further logs when running:

Create Dashboard - Pages

$Pages = @()
$Pages += New-UDPage -id "PageAdmin" -Name "Admin" -DefaultHomePage -Title "Administration" -Endpoint {
    # Loader
    New-UdColumn -Endpoint {
        Show-UDToast -Message $Session:Loading
        New-UDParagraph -Text $Session:Loading
        New-UDPreloader -PercentComplete $Session:Loading
    } -AutoRefresh -RefreshInterval 1
    
    New-UdColumn -Endpoint {
        $Session:Loading = 0
        do {
            $Session:Loading ++
            Start-Sleep 1
        } until ($Session:Loading -eq 50)
    }
}
New-UDDashboard -Title 'Testing' -Pages $Pages

Error Output:
[10-08-20 10:09:36 AM] Dashboard configuration complete.

[10-08-20 10:09:42 AM] PS: One or more errors occurred. (Cannot overwrite variable null because it is read-only or constant.) (Cannot overwrite variable null because it is read-only or constant.)

[10-08-20 10:09:43 AM] PS: One or more errors occurred. (Cannot overwrite variable null because it is read-only or constant.) (Cannot overwrite variable null because it is read-only or constant.)

[10-08-20 10:09:43 AM] PS: Cannot bind argument to parameter ‘Message’ because it is an empty string.

[10-08-20 10:09:43 AM] PS: Cannot validate argument on parameter ‘PercentComplete’. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.

[10-08-20 10:09:44 AM] PS: Cannot convert argument “icon”, with value: “”, for “GetIconName” to type “UniversalDashboard.Models.FontAwesomeIcons”: "Cannot convert null to type “UniversalDashboard.Models.FontAwesomeIcons” due to enumeration values that are not valid. Specify one of the following enumeration values and try again. The possible enumeration values are "None,ad,address_book,address_card,adjust,air_freshener,align_center,align_justify,align_left,align_right,allergies,ambulance,american_sign_language_interpreting,anchor,angle_double_down,angle_double_left,angle_double_right,angle_double_up,angle_down,

Not sure why i am getting an icon error when i am not calling any icons, but the other errors seem related to not being able to read $Session:Loading however this does exist as the Toast is showing the messages correctly.

Something is very mad! It seems to be failing to import the dashboard module at all.

Can you try manually importing the module in C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\3.1.0? I want to see if it gives you can error.