Sync-UDElement not working. Basic example

Does this work for anyone? I’m using v2.9.0 and Websockets is installed. Server is Windows Server 2016.

 Start-UDDashboard -Port 1005 -force -Dashboard (
    New-UDDashboard -Title "Hello, IIS" -Content {

        Enable-UDLogging -Level Debug -FilePath C:\Temp\log.txt

        New-UDCard -Title "Hello, IIS"

        New-UDElement -Id "SyncMe" -Tag span -Endpoint {
            New-UDHtml -Markup (Get-Random)
        }

        New-UDButton -Text "Update" -OnClick {
            Sync-UDElement -Id "SyncMe" -Broadcast
        } 
     }
  )

Here is the log from when I click on the button.

21:00:13 [Debug] PowerShellExecutionService ExecutionService constructor
21:00:13 [Debug] DashboardHub ClientEvent 20b7f735-5d49-42b8-a673-435342d7eaa8 onChange
21:00:13 [Debug] EndpointService Get() 20b7f735-5d49-42b8-a673-435342d7eaa8 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:13 [Debug] EndpointService Found endpoint.
21:00:13 [Debug] PowerShellExecutionService Scope variables--------------
21:00:13 [Debug] PowerShellExecutionService Context variables--------------
21:00:13 [Debug] PowerShellExecutionService EventData = 
21:00:14 [Debug] PowerShellExecutionService UDConnectionManager = UniversalDashboard.Services.ConnectionManager
21:00:14 [Debug] PowerShellExecutionService EventId = 20b7f735-5d49-42b8-a673-435342d7eaa8
21:00:14 [Debug] PowerShellExecutionService MemoryCache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:14 [Debug] PowerShellExecutionService DashboardHub = Microsoft.AspNetCore.SignalR.Internal.HubContext`1[UniversalDashboard.DashboardHub]
21:00:14 [Debug] PowerShellExecutionService Cache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:14 [Debug] PowerShellExecutionService StateRequestService = UniversalDashboard.Services.StateRequestService
21:00:14 [Debug] PowerShellExecutionService ConnectionId = GJReTmtXPhFC2LuM0-wocA
21:00:14 [Debug] PowerShellExecutionService SessionId = 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:14 [Debug] PowerShellExecutionService ArgumentList = 
21:00:14 [Debug] PowerShellExecutionService UDPage = 
21:00:14 [Debug] PowerShellExecutionService Session = UniversalDashboard.Models.SessionState
21:00:14 [Debug] PowerShellExecutionService ClaimsPrinciple = System.Security.Claims.ClaimsPrincipal
21:00:14 [Debug] PowerShellExecutionService ClaimsPrincipal = System.Security.Claims.ClaimsPrincipal
21:00:14 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost:1005/api/internal/component/element/SyncMe  
21:00:14 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Element", controller = "Component"}. Executing action UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard)
21:00:14 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost:1005/api/internal/component/element/SyncMe  
21:00:14 [Debug] PowerShellExecutionService ExecutionService constructor
21:00:14 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = "Element", controller = "Component"}. Executing action UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard)
21:00:14 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard) with arguments (SyncMe) - Validation state: Valid
21:00:14 [Debug] PowerShellExecutionService ExecutionService constructor
21:00:14 [Debug] ComponentController Element - id = SyncMe
21:00:14 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard) with arguments (SyncMe) - Validation state: Valid
21:00:14 [Debug] EndpointService Get() SyncMe 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:14 [Debug] ComponentController Element - id = SyncMe
21:00:14 [Debug] EndpointService Found endpoint.
21:00:14 [Debug] EndpointService Get() SyncMe 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:14 [Debug] PowerShellExecutionService Scope variables--------------
21:00:14 [Debug] EndpointService Found endpoint.
21:00:14 [Debug] PowerShellExecutionService Context variables--------------
21:00:14 [Debug] PowerShellExecutionService Scope variables--------------
21:00:14 [Debug] PowerShellExecutionService Request = Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest
21:00:14 [Debug] PowerShellExecutionService Context variables--------------
21:00:14 [Debug] PowerShellExecutionService Response = Microsoft.AspNetCore.Http.Internal.DefaultHttpResponse
21:00:14 [Debug] PowerShellExecutionService Request = Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest
21:00:14 [Debug] PowerShellExecutionService User = 
21:00:14 [Debug] PowerShellExecutionService MemoryCache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:14 [Debug] PowerShellExecutionService UDConnectionManager = UniversalDashboard.Services.ConnectionManager
21:00:14 [Debug] PowerShellExecutionService DashboardHub = Microsoft.AspNetCore.SignalR.Internal.HubContext`1[UniversalDashboard.DashboardHub]
21:00:14 [Debug] PowerShellExecutionService Cache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:14 [Debug] PowerShellExecutionService StateRequestService = UniversalDashboard.Services.StateRequestService
21:00:14 [Debug] PowerShellExecutionService ConnectionId = GJReTmtXPhFC2LuM0-wocA
21:00:14 [Debug] PowerShellExecutionService SessionId = 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:14 [Debug] PowerShellExecutionService Response = Microsoft.AspNetCore.Http.Internal.DefaultHttpResponse
21:00:14 [Debug] PowerShellExecutionService ArgumentList = 
21:00:14 [Debug] PowerShellExecutionService User = 
21:00:14 [Debug] PowerShellExecutionService UDPage = 
21:00:14 [Debug] PowerShellExecutionService MemoryCache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:14 [Debug] PowerShellExecutionService Session = UniversalDashboard.Models.SessionState
21:00:14 [Debug] PowerShellExecutionService UDConnectionManager = UniversalDashboard.Services.ConnectionManager
21:00:14 [Debug] PowerShellExecutionService ClaimsPrinciple = System.Security.Claims.ClaimsPrincipal
21:00:15 [Debug] PowerShellExecutionService DashboardHub = Microsoft.AspNetCore.SignalR.Internal.HubContext`1[UniversalDashboard.DashboardHub]
21:00:15 [Debug] PowerShellExecutionService ClaimsPrincipal = System.Security.Claims.ClaimsPrincipal
21:00:15 [Debug] PowerShellExecutionService Cache = Microsoft.Extensions.Caching.Memory.MemoryCache
21:00:15 [Debug] PowerShellExecutionService StateRequestService = UniversalDashboard.Services.StateRequestService
21:00:15 [Debug] PowerShellExecutionService ConnectionId = i5QSXpWnv_Pj0O_MFR9qnQ
21:00:15 [Debug] PowerShellExecutionService SessionId = 3b70fa98-d196-42c1-afb7-8b49319cba17
21:00:15 [Debug] PowerShellExecutionService ArgumentList = 
21:00:15 [Debug] PowerShellExecutionService UDPage = 
21:00:15 [Debug] PowerShellExecutionService Session = UniversalDashboard.Models.SessionState
21:00:15 [Debug] PowerShellExecutionService ClaimsPrinciple = System.Security.Claims.ClaimsPrincipal
21:00:15 [Debug] NewHtmlCommand {"markup":"939555199","type":"rawHtml","id":null,"refreshInterval":0,"autoRefresh":false,"hasCallback":false}
21:00:15 [Debug] PowerShellExecutionService ClaimsPrincipal = System.Security.Claims.ClaimsPrincipal
21:00:15 [Debug] ComponentController ConvertToActionResult() [{"markup":"939555199","type":"rawHtml","id":null,"refreshInterval":0,"autoRefresh":false,"hasCallback":false}]
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 814.8859ms.
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type 'System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard) in 923.7417ms
21:00:15 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 975.3333ms 200 application/json; charset=utf-8
21:00:15 [Debug] NewHtmlCommand {"markup":"1655654738","type":"rawHtml","id":null,"refreshInterval":0,"autoRefresh":false,"hasCallback":false}
21:00:15 [Debug] ComponentController ConvertToActionResult() [{"markup":"1655654738","type":"rawHtml","id":null,"refreshInterval":0,"autoRefresh":false,"hasCallback":false}]
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 893.6569ms.
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type 'System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
21:00:15 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.ComponentController.Element (UniversalDashboard) in 999.0169ms
21:00:15 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 1079.5429ms 200 application/json; charset=utf-8

Hi,
If you’re using IIS you’ll need the -wait param, also make sure you’ve followed all the documentation here:
https://docs.universaldashboard.io/webserver/running-dashboards/iis

Although saying that I’d expect you to get errors before that point if anything wasnt right with websockets etc.