Help with Shiny app execution error

Listening on http://127.0.0.1:5638
Error in .Call("rs_shinyviewer", url, getwd(), 3) :
Incorrect number of arguments (3), expecting 4 for 'rs_shinyviewer'

How do I fix this error ?

Thanks,
Abi

Can you give a little more context?, ideally a reprex?

are you able to run the minimal shinyapp snippet ?

library(shiny)

ui <- fluidPage()

server <- function(input, output, session) {}

shinyApp(ui, server)

I get the same error, even when running this minimal shinyapp snippet.

When you installed the shiny package did you compile from source or use a binary? Might be worth trying the binary if you can

I re-installed several versions:

The CRAN binary (https://cran.r-project.org/bin/windows/contrib/3.6/shiny_1.4.0.2.zip), the CRAN tar.gz, and the shiny_1.4.0.tar.gz.

None resolved the problem, I'm afraid!

I have a shiny app that ran perfectly on Friday. Now, when I press 'run app' or shinyApp(ui, server), I get this error:

Listening on http://127.0.0.1:5638
Error in .Call("rs_shinyviewer", url, getwd(), 3) :
Incorrect number of arguments (3), expecting 4 for 'rs_shinyviewer'

I get the same error when I run this skeleton shiny app:

library(shiny)
ui <- fluidPage()
server <- function(input, output, session) {}
shinyApp(ui, server)

This suggests it's a problem with the RStudio cloud shiny support. Help?

Hi mwauben, I'm trying to keep the forum tidy, and reduce duplication of posts.
I think it also helps the more senior RStudio staff to find worthy issues and to triage better, so hopefully they will get to this in due course. I added rstudiocloud tag to your thread as well.

I'm getting the same issue running shiny apps on RStudio Cloud. Nothing changed in my code, it worked fine Friday, started having this issue today.

So you get this issue both on Rstudio cloud, and on your local Rstudio ?

Works fine on local RStudio, issue only occurs on RStudio Cloud

ok good, thats as I thought. I was unsure because of how you said that you get the same issue on the cloud, i assumed you meant same issue as not on the cloud, but I suppose not. I'm afraid I cant help with cloud issues, but if we're patient this will be investigated.

Hi All,

I reinstalled all my libraries and the app runs fine.

Hi Ravua,

Thanks for posting this.
I have the same trouble with a Rstudio cloud project at the moment.
I followed your notes of reinstalled all libraries, but I still got the same error.
The app runs fine locally, and if I publish it on shinyapp.io, it works fine too.

Can you let me know if there is any intermediary step I have missed, please?

Hi ytsong,

I actually created a new project on cloud and copied all the code. After which I installed the libraries which fixed the issue.

Thanks

thanks. But I would really love to keep my current project URL as I put in other posts. I will keep them there first.

Thanks for the information.

I too have a Shiny app that runs fine from RStudio desktop but not from RStudio Cloud. I get

Listening on http://127.0.0.1:3501
Error in .Call("rs_shinyviewer", url, getwd(), 3) :
Incorrect number of arguments (3), expecting 4 for 'rs_shinyviewer'

All packages are up to date.

Even this code

library(shiny)
ui <- fluidPage()
server <- function(input, output, session) {}
shinyApp(ui, server)

generates the error:

Listening on http://127.0.0.1:3501
Error in .Call("rs_shinyviewer", url, getwd(), 3) :
Incorrect number of arguments (3), expecting 4 for 'rs_shinyviewer'

Hello,

Sorry for the inconvenience. We have recently updated the version of RStudio server pro running on rstudio.cloud and have identified an issue related to shiny applications created on earlier version of RStudio server pro. It looks like the function rs_shinyviewer is stored by the IDE and the more recent versions of the function takes an additional argument - hence the error.

We think this can be resolved by toggling back and forth where the output is shown between "Run in Window" and "Run in Viewer Pane". This should use the more recent version of the function moving forward:

Please let me know if this does not resolve this issue,

Sean

4 Likes