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

Suddenly httpgd plots stopped working #1447

Open
memeplex opened this issue Nov 13, 2023 · 10 comments
Open

Suddenly httpgd plots stopped working #1447

memeplex opened this issue Nov 13, 2023 · 10 comments
Labels

Comments

@memeplex
Copy link

This is not the first time I have the issue. Sometimes httpgd just stops working and no plot panel is shown after a plot command. Even if I restart VSCode the error persists. I don't know how to fix it. It may be related to my previous report (#1445) to solve which I had to recreate my workspace from scratch.

The output pane I see errors like these:

2023-11-13 10:22:41.418 [error] FetchError: request to http://127.0.0.1:50505/plot?id=0&renderer=svgp&width=800&height=600&zoom=1 failed, reason: socket hang up
	at ClientRequest.<anonymous> (/Users/carlos/.vscode/extensions/reditorsupport.r-2.8.2/dist/extension.js:2:1878046)
	at ClientRequest.emit (node:events:513:28)
	at Socket.socketOnEnd (node:_http_client:526:9)
	at Socket.emit (node:events:525:35)
	at endReadableNT (node:internal/streams/readable:1359:12)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
2023-11-13 10:22:41.546 [error] Error: ENOENT: no such file or directory, open '/var/folders/sz/t88v7mcx541gn9wn9cjsv1600000gn/T/RtmpAVrQQg/vscode-R/workspace.lock'
2023-11-13 10:22:41.810 [error] FetchError: request to http://127.0.0.1:50518/plot?id=0&renderer=svgp&width=800&height=600&zoom=1 failed, reason: socket hang up
	at ClientRequest.<anonymous> (/Users/carlos/.vscode/extensions/reditorsupport.r-2.8.2/dist/extension.js:2:1878046)
	at ClientRequest.emit (node:events:513:28)

To Reproduce

This is just too random to give you a recipe. Hope the trace above helps.

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

No.

@memeplex memeplex added the bug label Nov 13, 2023
@uhkeller
Copy link

For me it also doesn't work if I run radian in a terminal (on macOS), so it looks like it's not a problem with the R extension or VS code. It works fine in a normal R session running in a terminal, but if I start a httpgd device in radian and plot something, the server seems to hang after generating the thumbnail of the first plot. The plot itself is never displayed and subsequent plot commands seem to do nothing. When I try to end the R session it hangs at "Server closing…".

@uhkeller
Copy link

It looks like you're on macOS was well. Are you by any chance using Python version 3.11.6_1? I think on my machine the problem started after updating Python to this version.

@memeplex
Copy link
Author

I'm on macOS, that's true. You are right about it being related to radian, a vanilla R REPL doesn't show the same issue. Python is 3.11.5. I don't know how to track the events you describe above, sometimes there is no error in the Extension Host pane at all. I reinstalled the extension, I created a new R lib folder with just languageserver and httpgd, I created a new project, all to no avail. The only thing that made a difference was to switch from radian to vanilla REPL. Maybe it was a recent radian, and not python, update?

@memeplex
Copy link
Author

Seems related to #973.

@uhkeller
Copy link

The version of radian I'm using was installed on October 19th, I'm almost 100% sure it worked for some time after that. Maybe some dependency of radian that was updated later?

To me it's clear that this is a radian/httpgd problem, not a VS Code/R extension problem. I've just tried installing the current dev version of httpgd from GitHub which didn't help. I'll make an issue for radian.

@memeplex
Copy link
Author

I've downgraded radian to 0.6.7 and it's the same. The session is attached but no plot is shown.

@memeplex
Copy link
Author

To me it's clear that this is a radian/httpgd problem, not a VS Code/R extension problem.

I'm not that sure. I can open the http server from radian and plot there as decribed in https://nx10.github.io/httpgd/articles/a01_how-to-get-started.html. It seems specific to the communication with the extension viewer.

@uhkeller
Copy link

I can open the http server from radian and plot there

Hmm, I can't. radian issue is here.

@memeplex
Copy link
Author

You're right, it's just the thumbnail that is shown, it's not actually working.

@benz0li
Copy link
Contributor

benz0li commented Nov 28, 2023

radian v0.6.9 is out which resolves this issue.

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

No branches or pull requests

3 participants