3

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

emr2
  • 1,436
  • 7
  • 23
  • 2
    It's used [here](https://github.com/datastorm-open/shinymanager/blob/f45bc258013d8e293038017de703d8fd7f5ae6c7/R/fab_button.R#L57). You might want to [file an issue](https://github.com/datastorm-open/shinymanager/issues). However, it was [asked before](https://github.com/datastorm-open/shinymanager/issues/117). – ismirsehregal Jan 18 '22 at 14:42
  • 2
    FYI I've created a [PR](https://github.com/datastorm-open/shinymanager/pull/130) to fix this. – ismirsehregal Jan 20 '22 at 22:48

2 Answers2

1

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

See the 3 commits.

emr2
  • 1,436
  • 7
  • 23
-1

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/')\""
Saurabh
  • 1,566
  • 10
  • 23
  • Thanks for your comment! I have tried to remove the package using RStudio (instead of the terminal) and I still get the same error. I gave a try your solution but after I write the password, it appears me `su: Authentication failure`. In addition, I tried to launch R through the terminal but I realised that the package is in another library path, so it cannot be found... Anyway, why did you use the terminal instead of RStudio? Because I have removed it there and install it again, and the error doesn't want to disappear... – emr2 Jun 27 '22 at 08:58
  • Since I am using Linux as development environment, I use Terminal. On Windows, you should be able to run the command ```remove.packages``` to remove the package from within RStrudio. – Saurabh Jun 27 '22 at 19:21
  • 1
    I am using Linux too, I tried on the terminal and I got that error... and using RStudio with the command `remove.packages` and then install it again, the error doesn't want to disappear.. – emr2 Jun 28 '22 at 06:23
  • I think the administrator has not given you the right to update packages. I have admin rights and can easily update the packages. – Saurabh Jun 28 '22 at 08:01