startPipeServer broken since 1.5.3.1

Đang mở
#282 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c, r
Lĩnh vực
backend, networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C
Star
252
Fork
87
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rstudio/httpuv

Tất cả issue của rstudio/httpuv

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.