1

I just installed on my machine R 3.6 and tried to run my Shiny app and all of a sudden I get this error message:

Listening on http://10.81.197.170:1234
Error in makeTcpServer(host, port, private$appWrapper$onHeaders, private$appWrapper$onBodyData,  : 
  Static path must not have trailing slash.

I tried to check what explained here Host shiny app on Windows but I do only have one single IP address. I'm a very basic R user so I have no idea of what I could do to fix this problem. I also see another person had a similar issue a couple of months ago https://community.rstudio.com/t/error-using-a-shiny-app-on-windows-maketcpserver/64841 but he didn't get any answers. Thanks for the help

Angelo
  • 1,594
  • 5
  • 17
  • 50

1 Answers1

0

This is difficult to answer specifically without seeing the code of your app.

However, I ran across the same error recently and will share what I did wrong and the fix, in case someone else got the error for the same reason I did.

In my app, I wanted to access data stored in a different folder from www, and to do this I had to add a resource path:

addResourcePath("myfolder","/foldername/")
data <- readxl::read_xlsx("myfolder/mydata.xlsx", sheet=1)

This worked when running the script locally, but not when it happened to be on a flash drive. That's when I got the error you describe above.

I also got it when using an absolute location for that folder:

addResourcePath("myfolder","E:/foldername/")

The fix was simple: remove the trailing backslash.

addResourcePath("myfolder","E:/foldername")

This may not be exactly your situation, but I'd look out for any instances where you're specifying directories to start out with.

mweylandt
  • 108
  • 5