Publish Shiny App - Requires XML Package

I'm trying to publish my app to Shiny.io and get the following error:

Preparing to deploy document...DONE
Uploading bundle for document: 2700710...Error: Unable to retrieve package records for the following packages:

  • "XML"
    In addition: Warning message:
    In FUN(X[[i]], ...) : Package 'XML' not available in repository or locally
    Execution halted

I'm not explicitly using this package and could not find it on the CRAN. Publishing fails at this point. Any suggestions on how to resolve this issue? I've published other applications no problem from my environment.

The package is on CRAN: https://cran.r-project.org/web/packages/XML/index.html
but it is now bound to R > 4.0.0
I guess you are using an older version ?

You need to install a previous version of the package that is available with your R version. remotes::install_version could help for that.

thanks for your reply. I'm not using the XML package for my application.

I have two issues - I'm not using XML and my app runs fine locally without it, and there's no such package I can find called XML thru my CRAN unless its called something different. I see your link to the package, but am not sure what all of the links, etc. mean. Maybe if I knew how to get the package thru other means I'd just install it and be done. It is odd that the XML package is being called out in the first place when I believe I'm not using it.

What is the output of rsconnect::appDependencies()?

I usually don't run the console, but here's what I get:

Error: Unable to retrieve package records for the following packages:

  • "XML"
    In addition: Warning messages:
    1: In fileDependencies.R(tempfile) :
    Failed to parse C:\Users\mikeg\AppData\Local\Temp\RtmpOacE1Q\file2c50793b65f5 ; dependencies in this file will not be discovered.
    2: In FUN(X[[i]], ...) :
    Package 'XML' not available in repository or locally

Josh,

Appreciate any ideas you may have as I'm not making any progress on this issue. Here's what I've done:

  1. Updated RStudio to Version 1.3.1073, then updated all my packages

  2. Tried to publish my app and get the following error:
    Preparing to deploy document...DONE
    Uploading bundle for document: 2700710...Error: Unable to retrieve package records for the following packages:

  • "XML"
    In addition: Warning message:
    In FUN(X[[i]], ...) : Package 'XML' not available in repository or locally
    Execution halted
  1. ran rsconnect::appDependencies("app_course_v4.R") for my app and get the following error:
    Error in if (tolower(source) %in% c("github", "bitbucket", "source")) { :
    argument is of length zero
    In addition: Warning message:
    Unable to package DESCRIPTION files: subscript out of bounds

  2. Ran install.packages("XML") and get the following message:
    Installing package into �C:/Users/mikeg/Documents/R/win-library/3.6�
    (as �lib� is unspecified)
    Warning in install.packages :
    package ‘XML’ is not available (for R version 3.6.1)

  3. My app does not use the XML package

If the rsconnect package is unable to determine the dependencies of your application, it will not be able to deploy it to shinyapps.io.

I don't think that you want to run rsconnect::appDependencies() on a singular R file. Instead run on your application directory (the default behavior with no arguments, assuming the current working directly is the top directory of your application).

If you are still unable to determine the cause of the issue, I would suggest opening an issue with the rsconnect package itself.

thanks, when I run this on my application directory I get:

Error: Unable to retrieve package records for the following packages: - "XML"

Again, I am not installing or need this package. Is my only option to recreate my 2000 line application and bring in one library at a time to determine which package or something else is requiring XML?

I am not a developer of the rsconnect package, and so I can't say why it is failing to scan your application directory successfully. I will bring this topic to their attention and see if they can be of assistance.

What is the output of:

renv::dependencies()

within your project? (be sure to install renv via install.packages("renv") if you don't already have it installed)

let me remove the archive folder and resend the list of packages...

Source Package Require Version Dev
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R ada FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd ada FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R AppliedPredictiveModeling FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd AppliedPredictiveModeling FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R C50 FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd C50 FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R caret FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd caret FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R caretEnsemble FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd caretEnsemble FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R corrplot FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd corrplot FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R DBI FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd DBI FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R dbplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd dbplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R distr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd distr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R dplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd dplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd dplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd dplyr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R DT FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd DT FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R ellipse FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd ellipse FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R evd FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd evd FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R extRemes FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd extRemes FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R FinCal FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd FinCal FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R funModeling FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd funModeling FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R gbm FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd gbm FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R ggplot2 FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd ggplot2 FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd ggplot2 FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R gumbel FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd gumbel FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R h2o FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd h2o FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R Hmisc FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd Hmisc FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R htmltools FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd htmltools FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd knitr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R leaflet FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd leaflet FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R lubridate FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd lubridate FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R miceadds FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd miceadds FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R normalr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd normalr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R plotly FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd plotly FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R prc FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd prc FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R pROC FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd pROC FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R R.utils FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd R.utils FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R randomForest FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd randomForest FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R raster FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd raster FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rattle FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rattle FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R readxl FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd readxl FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd readxl FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd remotes FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd renv FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rgdal FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rmarkdown FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rpart FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rpart FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rpart.plot FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rpart.plot FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rpivotTable FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rpivotTable FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R rsconnect FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rsconnect FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd rsconnect FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R RSQLite FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd RSQLite FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd RWeka FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd RWekajars FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R scales FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd scales FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R sf FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd sf FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shiny FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shiny FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shiny FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shinydashboard FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shinydashboard FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shinydashboardPlus FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shinydashboardPlus FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shinyFeedback FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shinyFeedback FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shinyFiles FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R shinythemes FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd shinythemes FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R skimr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd skimr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R smotefamily FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd smotefamily FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R sqldf FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd sqldf FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R stringr FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd stringr FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R summarytools FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd summarytools FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R tidyverse FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd tidyverse FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R writexl FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd writexl FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd writexl FALSE
C:/Users/mikeg/OneDrive/R/Course/app_course_v4.R xgboost FALSE
C:/Users/mikeg/OneDrive/R/Course/courseDev.Rmd xgboost FALSE

Kevin,

Once I moved my "archive" folder with old dev files & versions out of my development environment folder which only includes the list above, I'm not able to "Run App" and get the following error.

Warning in FUN(X[[i]], ...) :
Package 'XML' not available in repository or locally
Error: Unable to retrieve package records for the following packages:

  • "XML"

It looks like this XML related package was somewhere in my development folder, but now it's not available to even run my app since I moved my archive folder to another back-up location. I still don't see the XML package anywhere in my current dev directory or archived, and don't see the package "XML" available to install?

The rattle package depends on XML:

https://cran.r-project.org/web/packages/rattle/index.html

hence why it's inferred as a dependency for your project.

I can't seem to figure out how to get the XML package installed from any source (lots of posts on the issue)...maybe I should remove rattle and find something else, unless there's a process to get XML into my app?

thanks, this resolved the issue as I find an alternative to rattle

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.