Get-UDelement stopped working on large tables

Hi there,

I am using 4.2.0
I noticed that Get-UDelement stopped working on tables with big tables (not so big)
For example, the following code:

New-UDApp -Title 'PowerShell Universal' -Content {
    $Data = @(
        @{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Cupcake'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Gingerbread'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Cupcake'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Gingerbread'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Frozen yoghurt'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Ice cream sandwich'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
        @{Dessert = 'Eclair'; Calories = 159; Fat = 6.0; Carbs = 24; Protein = 4.0 }
    )
    $Columns = @(
        New-UDTableColumn -Property Dessert -Title "A Dessert" -ShowFilter
        New-UDTableColumn -Property Calories -Title Calories
        New-UDTableColumn -Property Fat -Title Fat
        New-UDTableColumn -Property Carbs -Title Carbs
        New-UDTableColumn -Property Protein -Title Protein
        New-UDTableColumn -Property Test1 -Title Test1 -Render {
            New-UDIcon -Icon diks
        }
        New-UDTableColumn -Property Test2 -Title Test2 -Render {
            New-UDIcon -Icon diks
        }
    )
    New-UDTable -Data $Data -Columns $Columns -Id 'table2' -Sort -Export -PageSize 5 -ShowSearch -ShowPagination -Dense -ToolbarContent {
        New-UDButton -Text 'test'
    }

    New-UDButton -Text 'test' -OnClick {
        $value = Get-UDElement -Id 'table2'
        Show-UDToast $($value | Out-String)
    }
} -HideUserName

While pressing on a “test” button that tries to get the table element, gives in the logs the following error:

Exception calling “SendWebSocketMessageWithResult” with “3” argument(s): “Connection ‘mKmBJuE1_jeeL9H9rYBuXw’ disconnected.”

Does someone have a workaround for it?

Is that the only row in the log?
can you share more data ?

This is the same issue mentioned here: Get-UDElement not working after 4.2.1 update - #5 by adam

Adam confirmed that he is aware of this issue.

Cannot share more, as I downgraded the PSU version to 4.1.10

1 Like

4.2.2 has been released. I upgraded this morning and Get-UDElement is working for me now, it contains the security update for the latest CVE, and Azure connections are working!

BR,
Rob