Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error identifying terminal #1459

Closed
jooyoungseo opened this issue Dec 6, 2023 · 10 comments
Closed

Error identifying terminal #1459

jooyoungseo opened this issue Dec 6, 2023 · 10 comments

Comments

@jooyoungseo
Copy link
Contributor

jooyoungseo commented Dec 6, 2023

Type: Bug

It looks like there is an error identifying my R terminal when executing R command. I am attaching the screen shot below.

image

Extension version: 2.8.2
VS Code version: Code - Insiders 1.85.0-insider (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T11:15:22.766Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (8 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.71GB (6.17GB free)
Process Argv C:\Users\jseo1005\OneDrive - University of Illinois - Urbana\Desktop\source.R --crash-reporter-id b05b88e5-8894-4031-ae34-fa034ebddea9
Screen Reader yes
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
py29gd2263:30784851
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
a9j8j154:30646983
showlangstatbar:30737417
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
welcomedialog:30812478
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
pythonmpswarning:30901777
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30902439
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
aa_t_chat:30882232

@camilogarciabotero
Copy link

Hi,

I have a similar issue when trying to attach R to the terminal. I am now with the released version of VS code (v1.85.0). The output says:

.vsc.attach()
Fatal error: cannot create 'R_TempDir'

I am posting here because it looks related. Yet I am working from a remote cluster with CentOS v8. If more info is needed I will be looking forward to providing it.

@tomasnobrega
Copy link
Contributor

Hi, were you able to fix it? I am running into exactly the same error message

@andycraig
Copy link
Collaborator

Previously this error had its root cause in a bug in VS Code itself. #385 I wonder if that bug has reappeared.

@jooyoungseo Thank you for reporting this!

@camilogarciabotero I think that's probably a different bug.

@tomasnobrega Would you be able to post the screenshot too? Thank you.

@xinzhuohkust
Copy link

image

Got the same error.

Version: 1.87.0 (user setup) Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2 Date: 2024-02-27T23:41:44.469Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Windows_NT x64 10.0.19045

@andycraig
Copy link
Collaborator

@xinzhuohkust Thank you!

@jooyoungseo @tomasnobrega @xinzhuohkust Have you noticed any pattern to when this happens? After using VS Code for a while, after closing several terminals, only when using remote etc.?

@camilogarciabotero
Copy link

camilogarciabotero commented Mar 4, 2024

My issue was related to intermediate files in the temp. I found this StackOverflow answer. And worked for me:

find . -type d -name 'Rtmp*' -exec rm -r -v {} \;

@tomasnobrega
Copy link
Contributor

tomasnobrega commented Mar 4, 2024

I get the same error as @xinzhuohkust:
image

After I kill the currently active R terminal and then try to run a line from my R script using "Command + Enter," the command does not execute as expected. However, if I manually open a new terminal, type "R" to start an R session, and then use "Command + Enter," I can run lines from my script without any problems. I'm not sure why this is happening, but it appears that the automatic creation of a new R terminal after killing the previous one is not functioning correctly.

VSCode Version: 1.87.0 (Universal)
Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2
Date: 2024-02-27T23:42:56.944Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.3.0

@tomasnobrega
Copy link
Contributor

Not sure if anything was made, but this issue is not happening with me anymore. I didn't change anything on my end, not that I am aware anyways.

@tomasnobrega
Copy link
Contributor

tomasnobrega commented Apr 9, 2024

Hi guys, I faced this issue again.

I spent a lot of hours trying to come up with the underlying cause and I think I have finally identified it. The two conflicting terminals are "zsh" and "Python zsh".

For me, the issue is related with the interaction between VSCode Python extension and R extension. I recently used Python in my work, I think it "woke up" the python extension and made the error happen.

If I deactivate the Python extension, R extension works fine. I believe the Python extension makes another terminal and this is creating a bug with how the rTerminal.js handles the condition (vscode.window.terminals.length === 1)

I am sorry but coding the solution is outside my expertise, however if someone could please look into it, I would be very grateful. I also think this is something that can happen to more people, since it only requires having both extensions together

@andycraig
Copy link
Collaborator

This should be solved now thanks to #1511. Thank you @tomasnobrega!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants