New-Guid error when not using that command

Product: PowerShell Universal
Version: 2.10.2

Seeing results similar to this

I have a fairly basic page that pops this error up

Here is the stack trace

May 27, 2022 10:07 AM An error occurred: The term 'New-Guid' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Endpoint: Table
Session: 912c9e55-d0d0-4836-9c2e-d52795ef68f7, User: evanhalen
Stack Trace:
- The term 'New-Guid' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. at Table:54
- Table:34
- a3e0c4a9-814f-49c1-9833-1d5f2dc50a10:12

Here is the full page.

$session:query = ""

$DB = "PATH TO\db.sqlite"
New-UDTextbox -id "LastName" -Label "Last Name"

New-UDButton -Variant contained -Text "Search" -Icon (New-UDIcon -Icon search) -onclick {
    $user = (Get-UDElement -id "LastName").value
    $session:query = "select * from StudentLogin where LastName like '$user%'"
    Sync-UDElement -id "Table"
}
$columns = @(
    COLUMNS CREATED HERE
)

New-UDDynamic -id "Table" -Content {
    $data = Invoke-SqliteQuery -datasource $db -query $session:query 

    if ($data.count -gt 50){
        $tablesize = 50
    }
    else{
        $tablesize = $data.count
    }        
    New-UDTable -Data $data -Columns $columns -PageSize $tablesize -StickyHeader -ShowSearch -ShowPagination

} -LoadingComponent {
    New-UDProgress -Circular
}

The error shows up every time the table it reloaded, regardless of having $data populated or not. It doesn’t actually seem to affect the page function at all. Adding the function for New-GUID in the old forum post does fix the issue.

Side note to this, I added -DisableErrorToast to the New-PSUDashboard in dashboards.ps1 and the errors still show up.

1 Like

I’m also getting this error in PSU 3.0.3 but wasn’t seeing it previously in PSU 2.11.2. :thinking::thought_balloon:

Doesn’t seem to break anything that I can tell from first glance but still would prefer to get to the bottom of it.

Not sure why this is happening but we do use New-Guid in several places. We originally fixed this by using [Guid]::NewGuid() instead.