mgth/LittleBigMouse · error · InvalidOperationException
Could not open the Samsung remote-control channel on
Error message
Could not open the Samsung remote-control channel on {ipAddress}: {detail} What it means
Thrown by SamsungTizenClient.EnsureConnectedLockedAsync as a wrapped InvalidOperationException when opening the WebSocket fails with WebSocketException, IOException, or ObjectDisposedException. It is a sentinel-style wrapper: the transport-level cause is captured in InnermostMessage(exception) and surfaced via the {detail} placeholder, with {ipAddress} naming the display that could not be reached. The socket is reset before rethrowing so the next attempt starts clean.
Solutions
- Inspect the inner detail in the message (DNS failure, refused connection, timeout, closed socket) and fix the underlying network or endpoint problem.
- Verify the IP address is correct and the Samsung TV is powered on and on the same subnet.
- Re-open the connection with ReopenAsync after correcting the issue; the client resets its socket state before this error propagates.
- If the detail shows an authorization problem, re-pair with the display instead of retrying the raw connection.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/SamsungTizen/SamsungTizenClient.cs:81 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mgth/LittleBigMouse@7a42f01d47 (2026-09-16).
Data as JSON: /api/errors/734b1aa2ef94cfaf.
Report an issue: GitHub.
Appendix: source
Thrown at LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/SamsungTizen/SamsungTizenClient.cs:81
throw new WebSocketException("The Samsung display closed the pairing channel.");
}
catch (OperationCanceledException)
{
ResetSocketLocked();
throw;
}
catch (UnauthorizedAccessException)
{
ResetSocketLocked();
throw;
}
catch (Exception exception)
when (exception is WebSocketException or IOException or ObjectDisposedException)
{
var detail = InnermostMessage(exception);
ResetSocketLocked();
throw new InvalidOperationException(
$"Could not open the Samsung remote-control channel on {ipAddress}: {detail}",
exception);
}
}
static UnauthorizedAccessException PairingException(string channelEvent)
=> channelEvent switch
{
"ms.channel.timeOut" => new UnauthorizedAccessException(
"The Samsung display did not authorize IP control. Enable All Settings > Connections > Network > " +
"Expert Settings > IP Remote and Power On with Mobile, then retry pairing."),
"ms.channel.unauthorized" => new UnauthorizedAccessException(
"The Samsung display denied IP control. Enable All Settings > Connections > Network > " +
"Expert Settings > IP Remote, then retry pairing."),
_ => new UnauthorizedAccessException("The Samsung display closed or rejected the remote-control request."),
};
static string InnermostMessage(Exception exception)View on GitHub (pinned to 7a42f01d47)