Failing to use tree package with shinyapps.io

library(shiny)
library(shinydashboard)
library(dplyr) #For data manipulation
library(magrittr)
library(shinycssloaders)
library(stringr)
library(tree)
library(party)
library(maptree)
library(data.table)
library(ggplot2)
library(tidyr)
library(lattice)
library(caret)
library(pROC)

I have this list of packages but when I try to publish this onto shinyapps.io, I get this message

Error: Unhandled Exception: Child Task 601619863 failed: Error building image: Error fetching tree (1.0-39) source. unable to satisfy package: tree (1.0-39)
Execution halted

If I comment out the tree pacakge then it's fine.

What is the problem here?

It appears that at the time that you deployed, tree 1.0-39 might not have been the latest version in the package index. Could you try to deploy again? If it still fails, uninstall the package tree and then reinstall it and try deploying.

I just tried it again and I am getting the same error.

So I tried to uninstall the pacakge and then closed R, restart it, and then reinstall.

I am still getting the same error

Error: Unhandled Exception: Child Task 601938103 failed: Error building image: Error fetching tree (1.0-39) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: tree (1.0-39)
Execution halted

Okay, I have tracked this down to a bug in how we handle the presence of future versions of a package that appear in the package index. We will work on getting a fix out for next week.

1 Like

Thanks! I have an assignment due on the 10th April T_T using Shinyappio.

Do you think it will be before then? Thanks for your help anyway

I am getting a new error now

2019-04-09T08:12:22.830705+00:00 shinyapps[838336]: Warning: namespace ‘partykit’ is not available and has been replaced
2019-04-09T08:12:22.830706+00:00 shinyapps[838336]: by .GlobalEnv when processing object ‘

I have the same issue, essentially, as is mentioned in this post. I hav an app that uses leaflet which I wrote as part of a job candidacy. It works fine on my machine (MacBook) and works fine when I push it to my own shiny server (Digital Ocean instance of Ubuntu 16.04 where I control package installations) but get messages about libraries (26!) uninstalled which seem to be upstream of the leaflet package when I try to publish it at shinyapps.io. I don't see any workaround since I have no control over packages there.

Would you like some specific help in this area ?

Yes. I'd appreciate that very much.

Youre welcome to name a package & version, and then we can see if it can be supported on shinyapps.io

Here is the message I get when I try to deploy:

Preparing to deploy application...DONE
Uploading bundle for application: 3082802...Error:

  • Application depends on package "farver" but it is not installed.
    Please resolve before continuing.

  • Application depends on package "isoband" but it is not installed.
    Please resolve before continuing.

  • Application depends on package "labeling" but it is not installed.
    Please resolve before continuing.

  • Application depends on package "utf8" but it is not installed.
    Please resolve before continuing.
    In addition: There were 29 warnings (use warnings() to see them)
    Execution halted

I deployed the following app succesfully:

library(shiny)
library(farver)
library(isoband)
library(labeling)
library(utf8)
ui <- fluidPage(

   verbatimTextOutput("tout")
)

server <- function(input, output) {

    output$tout <- renderPrint({
       cat("list package version of required apps\n")
        cat("\nfarver ", as.character(packageVersion("farver")))
        cat("\nisoband ", as.character(packageVersion("isoband")))
        cat("\nlabeling ", as.character(packageVersion("labeling")))
        cat("\nutf8 ", as.character(packageVersion("utf8")))
        
    })
}

shinyApp(ui = ui, server = server)

url: https://nguk.shinyapps.io/pkgsupportedtest/

what happens when you try to deploy the same ?

The app you posted wouldn't initially work on my machine. I installed farver, isoband, labeling and utf8 and then it worked locally and deployed. My original app makes no explicit reference to these packages, though. It begins thusly:

library(shiny)
library(leaflet)
library(leaflet.extras)
library(Imap)
library(magrittr)

then you should list them. you know they are dependencies, so add in the library statements to load them....:slight_smile:

shinyapps.io wants to know (via the rsconnect mechanism) what packages to supply. listing the library's is for that purpose.

I'll give it a whirl. Thanks.

Yes, that worked. Thanks very much. I feel like such a dope...