startPipeServer broken since 1.5.3.1

Aperta
#282 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, r

Direzione di ricerca

Start with the README example using startPipeServer and reproduce the invalid-argument error with httpuv 1.5.3.1, then compare it with 1.5.2 and investigate the libuv 1.27-to-1.37 change. Done means the example creates the pipe server successfully and behaves as it did in 1.5.2.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I’ve been debugging an issue I’m having with rmarkdown/shiny and came to the conclusion this must be a bug in httpuv. Originally I tried to run:

$ R -q --no-save -e 'rmarkdown::run(file = NULL, dir = ".", shiny_args=list(port=structure("test.sock", mask=0), quiet=FALSE, launch.browser=FALSE))'

But I can reproduce the issue with the example code from the README as well, replacing startServer with startPipeServer:

library(httpuv)

s <- startPipeServer(name="test.sock", mask=NULL,
  app = list(
    call = function(req) {
      body <- paste0("Time: ", Sys.time(), "<br>Path requested: ", req$PATH_INFO)
      list(
        status = 200L,
        headers = list('Content-Type' = 'text/html'),
        body = body
      )
    }
  )
)

This is the output with 1.5.3.1:

$ R -q -f server.R
> library(httpuv)
>
> s <- startPipeServer(name="test.sock", mask=NULL,
+   app = list(
+     call = function(req) {
+       body <- paste0("Time: ", Sys.time(), "<br>Path requested: ", req$PATH_INFO)
+       list(
+         status = 200L,
+         headers = list('Content-Type' = 'text/html'),
+         body = body
+       )
+     }
+   )
+ )
createPipeServer: invalid argument
Error in .subset2(public_bind_env, "initialize")(...) :
  Failed to create server
Calls: startPipeServer -> <Anonymous> -> <Anonymous>
In addition: Warning message:
In normalizePath(name) : path[1]="test.sock": No such file or directory
Execution halted

(notice the error “invalid argument”)
This works with 1.5.2, so I’m assuming this is a regression introduced by the upgrade from libuv 1.27 to 1.37.

Lingua principale
C
Stelle
252
Fork
87
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rstudio/httpuv

Tutte le issue di rstudio/httpuv

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.