Warning using ShinyManager: Font Awesome icon ('close') does not exist

2.2k views Asked by At

I am getting these warnings from my Shiny app due to the new version of Font Awesome 5.

The `name` provided ('sign-out') is deprecated in Font Awesome 5:
* please consider using 'sign-out-alt' or 'fas fa-sign-out-alt' instead
* use the `verify_fa = FALSE` to deactivate these messages
This Font Awesome icon ('close') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`

I have been checking this problem and I found this solution but I don't know how to change the name of the icon (since I don't use it, shinymanager is using it) and I don't know where I have to add verify_fa = FALSE in the code either.

Here it is a reproducible example:

library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(shinymanager)
credentials <- data.frame(
  user = c("shiny"),
  password = c("shiny"),
  stringsAsFactors = FALSE
)


ui <- dashboardPage(
  
  dashboardHeader(title = "Dashboard"),
  ## Sidebar content
  dashboardSidebar(
    sidebarMenu(
      menuItem("App1", tabName = "App1", icon = icon("th")),
      menuItem("App2", tabName = "App2", icon = icon("th")),
      menuItem("App3", tabName = "App3", icon = icon("th"))
    )
  ),
  
  dashboardBody(
    fluidRow(
      tabItems(
        
        tabItem(tabName = "App1",
                sidebarPanel(
                  numericInput("num",
                               "Select a number",
                               min = 1,
                               value = 10),
                  
                  sliderInput("slider1",
                              "Number of bins:",
                              min = 1,
                              max = 50,
                              value = 30),
                  checkboxInput("remove", "Remove...", value = FALSE),
                  
                  
                  
                ),
                mainPanel(
                  verbatimTextOutput("value"),
                  plotOutput("plot1"),
                  
                )
                
        ),
        tabItem(tabName = "App2",
                sidebarPanel(
                  numericInput("num2",
                               "Select a number",
                               min = 1,
                               value = 10),
                  
                  sliderInput("slider2",
                              "Number of bins:",
                              min = 1,
                              max = 50,
                              value = 30),
                  
                  checkboxInput("remove2", "Remove...", value = FALSE),
                  checkboxInput("select", "I want to select....", value = FALSE),
                  radioButtons(inputId = "buttons", label="Decide...", c("Option1" = "Option 1",
                                                                         "Option2" = "Option 2"))
                  
                ),
                mainPanel(
                  verbatimTextOutput("value2"),
                  plotOutput("plot2"),
                  dataTableOutput("table1")
                )
                
        ),
        tabItem(tabName = "App3",
                sidebarPanel(
                  textInput("mytext", "Write text"),
                  radioButtons(inputId = "buttons", label="Decide...", c("Option1" = "Option 1",
                                                                         "Option2" = "Option 2"))
                  
                ),
                mainPanel(
                  verbatimTextOutput("text"),
                  dataTableOutput("table2")
                )
                
                
        )
      )
    )
  )
)

ui <- secure_app(ui)

server <- function(input, output, session) {
  
  res_auth <- secure_server(
    check_credentials = check_credentials(credentials)
  )
  
  
  
  output$value <- renderText({ input$num })
  
  output$plot1 <- renderPlot({
    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$slider1 + 1)
    
    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
    
  })
  
  output$plot2 <- renderPlot({
    # generate bins based on input$bins from ui.R
    x    <- mtcars$mpg
    bins <- seq(min(x), max(x), length.out = input$slider2 + 1)
    
    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white')
  })
  
  output$text <-  renderText({ input$mytext })
  
  output$table1 <- renderDataTable({
    head(iris,15)
  })
  
  output$table2 <- renderDataTable({
    head(mtcars,15)
  })
  
}

shinyApp(ui, server)

Does anyone know how to solve the warning?

Thanks in advance

2

There are 2 answers

0
emr2 On BEST ANSWER

These warnings were solved in new versions of shinyManager. Thanks to @ismirsehregal.

See the 3 commits.

4
Saurabh On

Removing the ShinyManager package and reinstalling it helped me get rid of this warning.

Here are the steps to do it on Linux.

su - -c "R -e \"remove.packages('shinymanager')\""
su - -c "R -e \"install.packages('shinymanager', repos='http://cran.rstudio.com/')\""