vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Issue launching extension ("spawn EINVAL")

Open b-rhodes opened this issue 1 year ago • 3 comments

Describe the bug Whenever I open VSCode, I get a little panel popping up saying "Help panel unavailable", and then when I look at the extension runtime status, it has:

Uncaught Errors (1)

spawn EINVAL

To Reproduce Steps to reproduce the behavior:

  1. Open VSCode
  2. Click on 'extensions'
  3. Scroll down to 'R'
  4. Click on 'FEATURES' tab
  5. Click on 'Runtime Status'
  6. See the error

Can you fix this issue by yourself? (We appreciate the help)

No

    "r.plot.useHttpgd": true,
    "r.libPaths": [
        "C:\\Users\\<username>\\.vscode-R\\renv\\library\\R-4.3\\x86_64-w64-mingw32",
        "C:\\Users\\<username>\\.vscode-R\\renv\\library\\R-4.4\\x86_64-w64-mingw32",
        "C:\\Users\\<username>\\AppData\\Local\\R\\win-library\\4.3",
        "C:\\Users\\<username>\\AppData\\Local\\R\\win-library\\4.4"
    ],
    "r.lsp.debug": true,
    "r.lsp.diagnostics": true,
    "r.rpath.windows":"C:\\Program Files\\R\\bin\\R.bat",
    "r.rterm.option": [
        "--no-save"
    ],
    "r.rterm.windows": "C:\\Users\\<username>\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\Scripts\\radian.exe",
    "r.useRenvLibPath": true,
    "shiny.r.port": 8080

Environment (please complete the following information):

  • OS: Windows 11
  • VSCode Version: 1.92.1
  • R Version: 4.4.0
  • vscode-R version: 2.8.4

Additional context I'm using Rig to allow for changing R versions

b-rhodes avatar Aug 15 '24 21:08 b-rhodes

I found some error in the extension host output:

2024-08-20 09:15:38.320 [error] Error: spawn EINVAL
	at ChildProcess.spawn (node:internal/child_process:421:11)
	at Object.spawn (node:child_process:799:9)
	at R (c:\Users\<username>\.vscode\extensions\reditorsupport.r-2.8.4\dist\extension.js:2:454372)
	at t.LanguageService.spawnServer (c:\Users\<username>\.vscode\extensions\reditorsupport.r-2.8.4\dist\extension.js:2:347396)
	at Server.<anonymous> (c:\Users\<username>\.vscode\extensions\reditorsupport.r-2.8.4\dist\extension.js:2:349708)
	at Object.onceWrapper (node:events:633:28)
	at Server.emit (node:events:519:28)
	at emitListeningNT (node:net:1932:10)
	at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

b-rhodes avatar Aug 19 '24 21:08 b-rhodes

still haven't managed to find a fix for this, so I've just been putting up with it or swapping to Positron when I desperately need the features.

b-rhodes avatar Nov 24 '24 19:11 b-rhodes

I've stopped having this issue, but I'm not sure what fixed it. I reinstalled VSCode and R several times.

b-rhodes avatar Mar 07 '25 06:03 b-rhodes