REditorSupport / REditorSupport/vscode-R

`sess` targets a dead connection after reload if session watcher turns from on to off

Open
#1,726 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

If session watcher turns from on to off, and VS Code is reloaded, the existing R process would retain the previously installed sess hooks. Those can target the dead connection, breaking viewers such as

> plot(1:10)
warning messages from top-level task callback 'sess.workspace'
Warning message:
In value[[3L]](cond) :
  [sess] Failed to send IPC message: Native call to `processx_connection_write_bytes` failed
> View(dat)
Warning message:
In value[[3L]](cond) :
  [sess] Failed to send IPC message: Native call to `processx_connection_write_bytes` failed
warning messages from top-level task callback 'sess.workspace'
Warning message:
In value[[3L]](cond) :
  [sess] Failed to send IPC message: Native call to `processx_connection_write_bytes` failed
> help(glm)
Warning message:
In value[[3L]](cond) :
  [sess] Failed to send IPC message: Native call to `processx_connection_write_bytes` failed
warning messages from top-level task callback 'sess.workspace'
Warning message:
In value[[3L]](cond) :
  [sess] Failed to send IPC message: Native call to `processx_connection_write_bytes` failed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the session-watcher transition from on to off, reload VS Code with the existing R process still running, and observe the retained sess hooks. The fix is complete when viewers and commands such as plot(), View(), and help() no longer attempt to send IPC messages to the dead connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.