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

Server don't response when used via RServe #144

Open
genmeblog opened this issue Jan 2, 2024 · 0 comments
Open

Server don't response when used via RServe #144

genmeblog opened this issue Jan 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@genmeblog
Copy link

Describe the bug

This case is probably the same as in #142. When httpgd is used via RServe (it's a proxy library which allows calling R functions via socket) web server is hanged after first plot. Only first thumbnail is displayed. Any other successive plots have no effect. Refreshing a browser hangs.

To Reproduce

Install RServe and RSclient packages.

install.packages(c("Rserve","RSclient"))

In first R session:

> library(Rserve)
> run.Rserve(port=56789)
-- running Rserve in this R session (pid=1636), 1 server(s) --
(This session will block until Rserve is shut down)

In the second R session:

> library(RSclient)
> c <- RSconnect(port=56789)
> RSeval(c,"library(httpgd)")
[1] "httpgd"    "Rserve"    "stats"     "graphics"  "grDevices" "utils"
[7] "datasets"  "methods"   "base"
> RSeval(c,"hgd()")
NULL
> RSeval(c,"x<-c(1,2,3,4,5,6); y<-c(4,5,6,7,8,9); plot(x,y)")
NULL
> RSeval(c,"x<-c(1,2,3,4,5,6); y<-c(4,5,6,7,8,9); plot(x,y)")
NULL
> RSeval(c,"hgd_state()")
$host
[1] "127.0.0.1"

$port
[1] 49117

$token
[1] "Rlx7D4Rm"

$hsize
[1] 2

$upid
[1] 70

$active
[1] TRUE

URL after calling hgd() is displayed in the first session.

> library(Rserve)
> run.Rserve(port=56789)
-- running Rserve in this R session (pid=1636), 1 server(s) --
(This session will block until Rserve is shut down)
httpgd server running at:
  http://127.0.0.1:49117/live?token=Rlx7D4Rm

Expected behavior

http server shouldn't hang.

Screenshots

image

Environment

  • OS: Ubuntu 23.10 on WSL2
  • Browser: Edge
  • R version: 4.3.1
  • httpgd version: 1.3.1
@genmeblog genmeblog added the bug Something isn't working label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant