Repository navigation
hold rpc requests until client_init has returned - #18802
Merged
Merged
Conversation
Before client_init completes the client has no client id, and the session answers any other request with INVALID_CLIENT_ID. RemoteServer reads that as "another client took over" and disconnects, so a single early request (an AceEditor.load() callback, a logged exception) took the whole session down -- silently on desktop, and behind a glass pane on the server, where client_init takes seconds while rserver launches the session. Queue such requests, fill in the client id when client_init returns, and send them then. client_init itself, the auth watcher, and abort (the slow-start dialog's buttons) still go straight out. Claude-Session: https://claude.ai/code/session_01E9g2VQQ2BTypGPabh1NBkP
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:00 — with
GitHub Actions
Inactive
kevinushey
had a problem deploying
to
e2e-playwright
September 12, 2026 19:00 — with
GitHub Actions
Failure
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:02 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:02 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:04 — with
GitHub Actions
Inactive
kevinushey
had a problem deploying
to
e2e-playwright
September 12, 2026 19:04 — with
GitHub Actions
Failure
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
kevinushey
temporarily deployed
to
e2e-playwright
September 12, 2026 19:18 — with
GitHub Actions
Inactive
RStudio E2E - all platforms2 test(s) failed
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
kevinushey
added a commit
that referenced
this pull request
Sep 13, 2026
Two linux CI flakes from the PR #18802 run (34712089464): - spelling_language_switch "rechecks an open detached editor" looked up the satellite's Ace editor right after 'domcontentloaded', which is the popup's initial document -- GWT mounts the editor later. The lookup throws until then, and expect.poll propagates a throw instead of retrying, so the test died ~70ms after the popup opened. Red on desktop-linux since #18766 and now on linux-server too. Poll with toPass so the throw is retried. - highlight_active_tabs read the selected tab's indicator geometry once. Selecting a partly hidden tab animates the strip to reveal it, and DocTabLayoutPanel keeps the clipped (position: absolute) variant until that scroll settles, so a one-shot read could see 'absolute' where the test expects 'fixed'. Poll the geometry until it settles.
This branch was previously deployed
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.
Follow-up to #18797, which showed how little it takes to bring a session down from the client side.
Problem
Until
client_initreturns,RemoteServerhas no client id, so any other RPC goes out without one. The session rejects it withINVALID_CLIENT_ID, andRemoteServer.handleRpcErrorInternallytreats that code as "another client took over": it callsdisconnect()and firesClientDisconnectedEvent, which tears down the workbench. On desktop this is silent (the disconnected UI is server-only); on the server it leaves the workbench behind a glass pane.Any early sender triggers it: an
AceEditor.load()callback, aScheduler.scheduleDeferredin an eagerly-constructed singleton, orlogExceptionfor an exception thrown during startup. It never reproduces on desktop, where the session is up before the page loads andclient_initreturns in milliseconds, and only shows up on server CI, whereclient_inittakes seconds while rserver launches the session -- and there it looks like a pile of unrelated project-switch flakes. In #18797's first run, 85 of 226client_initcalls on the linux-server shards had such a request racing them.Change
RemoteServer.sendRequestnow holds requests whileclientId_is null, the same way it already holds them while unauthorized, and sends them (with the id filled in) as soon as theclient_initresponse arrives.client_inititself,auth_status, andabort(the "R is taking longer to start" dialog's Terminate R / Safe Mode buttons) still go straight out; the exemption list is aprotectedmethod so it can be extended. Each held request is logged viaDebug.log, so aclient_initrace stays visible in the console without being fatal.RpcRequestgainssetClientIdfor the replay and anisCancelledflag so a request cancelled while held is dropped rather than sent.Satellite windows proxy their RPCs through the main window's
RemoteServer, so they are covered by the same guard.Verified with
ant javac, andconsole_editor_keybindings.test.ts+project_editor_theme.test.tson desktop against the worktree'sant draftbuild (8 passed). The server-side case is exercised by the PR-triggered linux-server e2e shards.