bnosac / cronR

A simple R package for managing your cron jobs.
Other
288 stars 38 forks source link

cronR addin not working. Error on startup #57

Closed tamilvanan7 closed 1 year ago

tamilvanan7 commented 1 year ago

My environment: R - v4.0.3 Rstudio - v1.4.1717-3 Shiny - v1.7.3 ShinyFiles - v0.9.3 miniUI - v0.1.1.1

When I try to use the Addins -> Scehdule R scripts on Linux / Unix,

The console shows that it's trying to run the Addin. But fails.

cronR:::cron_rstudioaddin()

Even when I try to run the command, cronR::cron_rstudioaddin(RscriptRepository = Sys.getenv("CRON_LIVE", unset = getwd())), I still get the same error. I've also properly set the CRON_LIVE environment variable before running this command

Loading required namespace: shiny Loading required namespace: miniUI Loading required namespace: shinyFiles Error in vec_as_location(): ! ... must be empty. ✖ Problematic argument: • call = call Run rlang::last_error() to see where the error occurred.

cronR:::cron_rstudioaddin() Error in vec_as_location(): ! ... must be empty. ✖ Problematic argument: • call = call Run rlang::last_error() to see where the error occurred.

When I run rlang::last_error() I get the following

<error/rlib_error_dots_nonempty> Error in vec_as_location(): ! ... must be empty. ✖ Problematic argument: • call = call

Backtrace:

  1. cronR:::cron_rstudioaddin()
    1. shiny::icon("cloud-upload")
    2. fontawesome::fa_i(name = name, class = class, ...)
    3. fontawesome:::get_icon_idx(...)
    4. fontawesome:::get_icon_idx_all_types(name = name)
    5. tibble:::[.tbl_df(...)
    6. tibble:::vectbl_as_col_location(...)
    7. vctrs::vec_as_location(j, n, names, call = call)

When I run rlang::last_trace(), I'm getting the following dump

<error/rlib_error_dots_nonempty> Error in vec_as_location(): ! ... must be empty. ✖ Problematic argument: • call = call

Backtrace: ▆

  1. └─cronR:::cron_rstudioaddin()
  2. ├─miniUI::miniPage(...)
  3. │ ├─htmltools::attachDependencies(...)
  4. │ ├─htmltools::tagList(...)
  5. │ │ └─rlang::dots_list(...)
  6. │ ├─shiny::fillPage(...)
  7. │ │ └─shiny::bootstrapPage(...)
  8. │ │ └─rlang::list2(...)
  9. │ └─tags$div(class = "gadget-container", ...)
    1. │ └─rlang::dots_list(...)
    2. ├─miniUI::miniTabstripPanel(...)
    3. │ └─miniUI:::buildTabset(list(...), "nav gadget-tabs", id = id, selected = selected)
    4. ├─miniUI::miniTabPanel(...)
    5. │ └─shiny::tabPanel(...)
    6. │ └─bslib::nav(title, ..., value = value, icon = icon)
    7. │ └─bslib:::tabPanel_(title, ..., value = value, icon = icon)
    8. │ └─bslib:::prepTabIcon(icon)
    9. └─shiny::icon("cloud-upload")
    10. └─fontawesome::fa_i(name = name, class = class, ...)
    11. └─fontawesome:::get_icon_idx(...)
    12. └─fontawesome:::get_icon_idx_all_types(name = name)
    13. ├─alias_tbl[alias_tbl$alias == name, "name", drop = TRUE]
    14. └─tibble:::[.tbl_df(...)
    15. └─tibble:::vectbl_as_col_location(...)
    16. ├─tibble:::subclass_col_index_errors(...)
    17. │ └─base::withCallingHandlers(...)
    18. └─vctrs::vec_as_location(j, n, names, call = call)
    19. └─ellipsis::check_dots_empty()
    20. └─rlang:::action_dots(...)
    21. ├─base (local) try_dots(...)
    22. └─rlang (local) action(...)
jwijffels commented 1 year ago

Looks like an error in fontawesome::fa_i, maybe follow this advice at https://community.rstudio.com/t/error-in-vec-as-location/149485 And install fontawesome, tibble, vctrs, rlang and shiny again as it looks there are some version incompatibilities on these on your computer

jwijffels commented 1 year ago

This seems to be related to shiny and fontawesome. If I read the logs of the shiny NEWS file (https://cran.r-project.org/web/packages/shiny/news/news.html) it now says

shiny 1.7.3

Bug fixes

So either upgrade to shiny 1.7.3 or downgrade shiny to < 1.7.0 seems to be solving this issue. Feel free to give comments, I'll close this issue already as it seems not caused by code in this R package but in further downstream dependencies.