Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignalR - System.ArgumentNullException: Value cannot be null. Parameter name: connectionId #1171

Closed
itfranck opened this issue Sep 24, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@itfranck
Copy link
Contributor

Describe the Issue

Using Sync-Element in UD-Input endpoint, I get the following error message.

System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: connectionId
at Microsoft.AspNetCore.SignalR.DefaultHubLifetimeManager1.SendConnectionAsync(String connectionId, String methodName, Object[] args, CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Internal.SingleClientProxy1.SendCoreAsync(String method, Object[] args, CancellationToken cancellationToken)
at Microsoft.AspNetCore.SignalR.ClientProxyExtensions.SendAsync(IClientProxy clientProxy, String method, Object arg1, CancellationToken cancellationToken)
at UniversalDashboard.DashboardHubContextExtensions.d__15.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at UniversalDashboard.Cmdlets.SyncElementCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: connectionId
at Microsoft.AspNetCore.SignalR.DefaultHubLifetimeManager1.SendConnectionAsync(String connectionId, String methodName, Object[] args, CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Internal.SingleClientProxy1.SendCoreAsync(String method, Object[] args, CancellationToken cancellationToken)
at Microsoft.AspNetCore.SignalR.ClientProxyExtensions.SendAsync(IClientProxy clientProxy, String method, Object arg1, CancellationToken cancellationToken)
at UniversalDashboard.DashboardHubContextExtensions.d__15.MoveNext()<---

To Reproduce

Steps to reproduce the behavior: (Example)

  1. Start Dashboard
  2. Click on the Hamburger
  3. Press ALT-F4
  4. Browser Closes...

Expected behavior

Targeted element should be synced.
The problem does not occurs if I create a button and put the Sync-UDElement within it instead.

This should be what happens

image

(I was somewhat able to make it work when answering a question on the forums but it does not work anymore. The behavior seems inconsistent)

Screenshots

Script Sample


Import-Module UniversalDashboard -RequiredVersion 2.6.0
$page = New-UDPage -Name "OpenFiles"  -Content {
    New-UDInput -Title "Enter Partial file name" -Endpoint {
        param(
            [string]$phrase
        )

        $a = Get-ChildItem -Path "$($env:USERPROFILE)\desktop"

        $Cache:FilesFound = $a | Where-Object -Property fullname -Like "*$phrase*" -erroraction stop 
            try {
                Sync-UDElement -Id 'results'
                }
            catch {
              $Cache:Errors = $_
            }

    }

    New-UDElement -Id 'results' -Tag 'div' -Endpoint {
        if ($Cache:FilesFound -ne $null) {
            New-UDTable -Id 'results'  -Title "Files" -Header @("name", "FullName ") -Endpoint {
                $Cache:FilesFound | Out-UDTableData -Property @("name", "FullName")
            }    
        }
    
    }

    new-udcard -Title '.' -Text $Cache:Errors.Exception

}

$dash  = New-UDDashboard -pages $page
Start-UDDashboard -Dashboard $dash -Port 12222 -Force


Version Information

  • Operating System: Windows 10
  • PowerShell Version: 5.1
  • Universal Dashboard Version: 2.6.0
  • UD Hosting Method: (Powershell, IIS, App Service, Etc.) IIS / VsCode

Additional context

Reference:
https://forums.universaldashboard.io/t/result-of-new-udinput-to-be-output-in-new-udtable-or-new-udgrid-below/1280/2

(even though it worked in the referenced link,, I get mostly failures.)

@itfranck itfranck added the bug Something isn't working label Sep 24, 2019
@adamdriscoll adamdriscoll added this to the 2.6.3 milestone Oct 1, 2019
@adamdriscoll
Copy link
Member

This is resolved with the latest PR. There were some pretty big issues with Connection\Session management in UD that should be solved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants