{"record":{"id":"734b1aa2ef94cfaf","repo":"mgth/LittleBigMouse","slug":"could-not-open-the-samsung-remote-control-channel-on","errorCode":null,"errorMessage":"Could not open the Samsung remote-control channel on {ipAddress}: {detail}","messagePattern":"Could not open the Samsung remote-control channel on (.+?): (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/SamsungTizen/SamsungTizenClient.cs","lineNumber":81,"sourceCode":"\n            throw new WebSocketException(\"The Samsung display closed the pairing channel.\");\n        }\n        catch (OperationCanceledException)\n        {\n            ResetSocketLocked();\n            throw;\n        }\n        catch (UnauthorizedAccessException)\n        {\n            ResetSocketLocked();\n            throw;\n        }\n        catch (Exception exception)\n            when (exception is WebSocketException or IOException or ObjectDisposedException)\n        {\n            var detail = InnermostMessage(exception);\n            ResetSocketLocked();\n            throw new InvalidOperationException(\n                $\"Could not open the Samsung remote-control channel on {ipAddress}: {detail}\",\n                exception);\n        }\n    }\n\n    static UnauthorizedAccessException PairingException(string channelEvent)\n        => channelEvent switch\n        {\n            \"ms.channel.timeOut\" => new UnauthorizedAccessException(\n                \"The Samsung display did not authorize IP control. Enable All Settings > Connections > Network > \" +\n                \"Expert Settings > IP Remote and Power On with Mobile, then retry pairing.\"),\n            \"ms.channel.unauthorized\" => new UnauthorizedAccessException(\n                \"The Samsung display denied IP control. Enable All Settings > Connections > Network > \" +\n                \"Expert Settings > IP Remote, then retry pairing.\"),\n            _ => new UnauthorizedAccessException(\"The Samsung display closed or rejected the remote-control request.\"),\n        };\n\n    static string InnermostMessage(Exception exception)","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/mgth/LittleBigMouse/blob/7a42f01d47d99d223b8ee33ba4019af82adf1c48/LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/SamsungTizen/SamsungTizenClient.cs#L63-L99","documentation":"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.","triggerScenarios":"Thrown at LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/SamsungTizen/SamsungTizenClient.cs:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a42f01d47d99d223b8ee33ba4019af82adf1c48","analyzedAt":"2026-09-16T00:35:00.514Z","contentChangedAt":"2026-09-16T00:35:00.514Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}