fix(devices): surface stalled and failed remote desktop connections - #215
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(devices): surface stalled and failed remote desktop connections#215posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
The remote desktop viewer kept the canvas hidden until the first JPEG tile drew and only rendered the spinner while state >= 1, so a relay socket drop (state 0) hid both and left a blank black rectangle with no error and no retry. - Render a retryable failed state when the tunnel reaches state 0 without a frame; Retry re-runs the connect effect to reconnect. - Add a first-frame watchdog on state 3: nudge the agent once by re-sending the compression/start message and a refresh, then declare "the desktop stream did not start" instead of an endless spinner. - Capture these failures as PostHog exceptions with the tunnel state and node id so the failure is visible in error tracking, not only in a session recording. Generated-By: PostHog Desktop Task-Id: dc518b51-454a-4da2-8644-ee81f76aa513
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
visibility: hiddenuntil the first JPEG tile drew, and the spinner rendered only while!firstFrameReceived && state >= 1. When the relay socket dropped,MeshTunnelreports state 0, so both conditions went false at once and the container showed its plainbg-black.src/lib/meshcentral/captured an exception, so this whole class of breakage was invisible in error tracking.Changes
$exceptionconnectNonce); its cleanup resetsinitializingRefand stops the dead tunnel, then a fresh tunnel reconnects.cancelledguard) so a retry does not re-raise the failure it just cleared. Once a frame has drawn, the canvas keeps its last image and the existing reconnect toasts still apply.captureExceptionhelper (routes to the GTM-loadedwindow.posthog) withtunnelStateandnodeIdattached.Why
The failure path ended in an unrecoverable dead end on a core flow, and the failure rate could not even be measured because the surface emitted no exception or success events.
Test plan
npm run type-checkpasses.biome checkclean on the changed files.Notes
remote-desktoporsrc/lib/meshcentral/. This change is additive and specific to the remote desktop viewer.Created with PostHog Desktop from this inbox report.