Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push-button-deploy to Rsconnect: "Could not find files to deploy: Error occurred while executing method" #10672

Closed
cropland-bv opened this issue Feb 24, 2022 · 20 comments
Assignees
Labels
backport Issues whose associated fixes will need to be backported for a previous release. bug publishing windows

Comments

@cropland-bv
Copy link

System details

RStudio Edition : Desktop [Open Source]
RStudio Version : 2022.2.0.443
OS Version      : Windows 10 x64 (build 19044)
R Version       : R version 4.1.1 (2021-08-10)

Steps to reproduce the problem

  1. Press blue publishing button.

Describe the problem in detail

After upgrading R version 3.6.3 to R version 4.1.1 and upgrading RStudio the following error occurred while trying to publish application to Rsconnect:
image

The Console gives the following error message:
Error in rle(toplevel) : 'x' must be a vector of an atomic type

Related issue: #3754
But no special character in path.

Error occurs while trying to deploy different applications with varying paths.

Describe the behavior you expected

Expected a clear error explanation or the ability to publish application.

@ronblum
Copy link
Contributor

ronblum commented Feb 24, 2022

@cropland-bv Thank you for notifying us of this! Can you please provide a sample document for which this occurs—it can be just a few lines. This will help me try to reproduce the issue. Thanks!

Also, which was the last version of RStudio Desktop in which this worked?

@ronblum ronblum added bug publishing info needed Additional information requested—reprex, steps, open question, etc. labels Feb 24, 2022
@cropland-bv
Copy link
Author

cropland-bv commented Feb 24, 2022

Error occurs while trying to publish Shiny Web applications, but not while publishing a RMarkdown document.
Standard RStudio code example:

library(shiny)

# Define UI for application that draws a histogram
ui <- fluidPage(

    # Application title
    titlePanel("Old Faithful Geyser Data"),

    # Sidebar with a slider input for number of bins 
    sidebarLayout(
        sidebarPanel(
            sliderInput("bins",
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30)
        ),

        # Show a plot of the generated distribution
        mainPanel(
           plotOutput("distPlot")
        )
    )
)

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$distPlot <- renderPlot({
        # generate bins based on input$bins from ui.R
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)

        # draw the histogram with the specified number of bins
        hist(x, breaks = bins, col = 'darkgray', border = 'white')
    })
}

# Run the application 
shinyApp(ui = ui, server = server)

Regarding the RStudio Desktop version, I don't know the specific version but probably 1.3.

@wimpel
Copy link

wimpel commented Feb 28, 2022

same problem here... No special characters in filenames..
RStudio 2022.02.0 Build 443

Error comes up when trying to publish to shinyapps
Listening on http://127.0.0.1:6150
Error in rle(toplevel) : 'x' must be a vector of an atomic type

update: re-installed old version (RStudio Version 1.4.1717).. no error and file published fine

@ronblum ronblum added backport Issues whose associated fixes will need to be backported for a previous release. triage windows and removed info needed Additional information requested—reprex, steps, open question, etc. labels Feb 28, 2022
@ronblum
Copy link
Contributor

ronblum commented Feb 28, 2022

Thank you both! I can reproduce this in Prairie Trillium on Windows 10, while it continues to work on MacOS 12.1, and worked previously in Ghost Orchid.

Triage: regression in Prairie Trillium, strong candidate for patch.

@gtritchie
Copy link
Member

I repro'd this problem with R 3.6.3, on Windows-10, with RStudio 2022.2.0.443. This was a clean Windows-10 machine where only R 3.6.3, RTools 3.5, and that version of RStudio were installed.

So, not related to the upgrade to R 4.1.1 mentioned in the repro steps; purely an RStudio thing it appears.

@gtritchie
Copy link
Member

This problem started with build 416 on 2022-02-02; build 415 works.

@kevinushey
Copy link
Contributor

Thanks for the bug report. As a workaround, you can execute:

.rs.files.restoreBindings()

before attempting to deploy your application. We'll try to get this fixed soon.

@kevinushey
Copy link
Contributor

A fix will be part of #10682; the underlying issue here is that we were failing to expand tilde-prefixed paths in our list.files() shim.

kevinushey added a commit that referenced this issue Mar 1, 2022
@jmcphers
Copy link
Member

jmcphers commented Mar 1, 2022

kevinushey added a commit that referenced this issue Mar 2, 2022
* disable file hooks by default; handle idiosyncrasies

* use grepl

* re-enable

* alignment

* tweak

* minor optimization

* disable file hooks for UCRT R

* additional fixes for #10672

* update NEWS
@astayleraz astayleraz self-assigned this Mar 10, 2022
@astayleraz
Copy link
Contributor

I verified this is working as expected on Windows 10 with version 2022.02.0+455. I was able to publish successfully a shiny app as well as other file types and also got the expected output in the steps in #10679 Lower level automation tests were added so I did not add any end to end tests for this at this time, but I think it might warrant us having end to end tests of publishing all file types. Closing issue.

@samrit2442
Copy link

Thanks a lot. It is working after executing that code.

@costavale
Copy link

still the same error, the deploying worked only after passing the code
.rs.files.restoreBindings()

@astayleraz
Copy link
Contributor

@costavale What version of RStudio did you see this with and OS setup and steps did you take to run into the error?

@costavale
Copy link

2022.02.0 with R updated this morning to 4.1.3
I am working with Windows 11 and I run into this error today after updating R to 4.1.3

@astayleraz
Copy link
Contributor

@costavale which version of 2022.02.0 exactly? The version of R should not matter I do think.

@costavale
Copy link

costavale commented Mar 14, 2022

Build 443, RStudio 2022.02.0+443 "Prairie Trillium" Release (9f79693, 2022-02-16) for Windows

@jgutman
Copy link
Contributor

jgutman commented Mar 14, 2022

Unfortunately 2022.02.0+443 is the version that still contains the error. We're about to release a patch release for Prairie Trillium that will contain this fix, but in the meantime if you'd like to try the fixed version you can download 2022.02.1+457 from here: https://dailies.rstudio.com/rstudio/prairie-trillium/

@costavale
Copy link

Thank you for the suggestion. With the 457 version, now the deployment is working again!

@ronblum
Copy link
Contributor

ronblum commented Mar 16, 2022

@costavale Glad to hear it, and thank you for confirming!

@enzedonline
Copy link

Good to find this, was trying to figure out what I was doing wrong ;-)
Can confirm the upgrade fixes the problem, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Issues whose associated fixes will need to be backported for a previous release. bug publishing windows
Projects
None yet
Development

No branches or pull requests