startPipeServer broken since 1.5.3.1

Abierto
#282 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
c, r

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C
Estrellas
252
Forks
87
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rstudio/httpuv

Todos los issues de rstudio/httpuv

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.