-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to publish Shiny App to RStudio Connect #934
Comments
Could you try installing the development version of renv and report back if that changes the behavior? remotes::install_github("rstudio/renv") Could you also try deploying from the R console to see if that provides any additional feedback? # Unset the option so we use renv.
options(rsconnect.packrat = NULL)
rsconnect::deployApp() You should be able to bypass the use of renv when deploying from the R console: options(rsconnect.packrat = TRUE)
rsconnect::deployApp() Unfortunately, that option does not appear to alert the R session that is used by the Deploy pane for push-button deployment. I have filed #935 to track the fact that the If you are still having trouble with the latest version of renv, you will need to install the previous rsconnect release until we can solve your problem. remotes::install_version("rsconnect", "0.8.29") Reverting rsconnect should let you use the deployment button again. |
Thank you for your prompt response! I tried installing the development version of renv and it did not change the behavior. Deploying from the R console also unfortunately did not provide any additional feedback; just the same error message I received earlier (but in multiple colors). Thankfully bypassing the use of renv using the code you supplied worked and I was able to publish my updates. I appreciate your help! |
@kevinushey & @hadley - Do you have any advice to have renv emit additional information about the preflight issue? @DEQabrits Is there any chance that you could narrow your application into something you would be willing to share with us? |
You'll need to ensure rsconnect/R/bundlePackageRenv.R Lines 6 to 10 in a5db832
|
That application would be difficult. But I did get the same issue with another one of my applications that I can share more easily: https://github.com/OR-Dept-Environmental-Quality/FlowDataPull. |
Thanks for that project, @DEQabrits. In experimenting with it, I did uncover one type of (related) error that is not revealing much feedback. I've filed that as rstudio/renv#1607. Could you run these commands from the R console within your original project and tell us if any details are provided? options(renv.consent = TRUE)
deps <- renv::dependencies(getwd())
renv::snapshot(getwd(), packages = deps$Package, prompt = FALSE) If these steps happen to create an unlink("renv.lock") |
@DEQabrits - I think I figured out the problem. You have the Could you try the following before deploying again? devtools::install_github("OR-Dept-Environmental-Quality/dflowR") Installing like this will record information about where the package came from, which renv then uses when creating its snapshot. I've filed rstudio/renv#1608 to track this problem. |
@aronatkins - I ran the commands in the R console and I got a lot more details that what was originally provided. I've copied it below. options(renv.consent = TRUE)
The following package(s) have unsatisfied dependencies:
|
@DEQabrits - Thanks so much for your continued involvement. It sounds like each of those problems are indeed issues that should have blocked deployment, but neither rsconnect nor renv were reporting them correctly. Would you agree with that assessment? After installing the suggested packages and package updates, are you able to deploy? |
@DEQabrits you should be able to eliminate many of those problems by either commenting out or replacing devtools with remotes on this line: https://github.com/OR-Dept-Environmental-Quality/FlowDataPull/blob/main/USGSdatapull.R#L72-L74 (and this will generally make a bundle that's much smaller to deploy) |
@aronatkins - Yes, I agree with that assessment. After installing the packages/updates I was able to deploy. @hadley Thank you for the suggestion! I plan on doing so. |
…or message. Once I installed S4Arrays from source (aka `BiocManager::install("S4Arrays", type = "source")`), it seems like things are working ok with `renv`. At rstudio/rsconnect#934 (comment) and that thread in general, I realized that `renv` might not always give informative error messages.
The renv-1.0.1 release contains the rstudio/renv#1608 fix; closing this issue as resolved. Please open a new issue if you encounter other problems. |
I recently tried to update a shiny app I had published (last update was 3/7/2023) after updating to rsconnect version 1.0.1 and ran into the following error:
-- Preparing for deployment ----------------------------------------------------
v Re-deploying "shinynpdes_awqms2" to "server: rstudioconnect.deq.state.or.us / username: l_abritson"
i Looking up application with id "47"...
v Found application https://rstudioconnect.deq.state.or.us/content/09545f4b-3d21-4ad2-aff7-600e956289e9/
i Bundling 10 files: 'AlBLM_Transform.R', 'app.R', 'CalcHardness_Function.R', 'Continuous_Summary_Function.R', 'MonteCarlo.R', 'NameandFraction.R', 'NPDES_AWQMSQuery.R', 'query_cache.RData', 'query_cache_allchar.RData', and 'README.md'
i Capturing R dependencies with renv
Error in renv_snapshot_validate_report(valid, prompt, force) :
aborting snapshot due to pre-flight validation failure
Calls: ... snapshotRenvDependencies -> -> renv_snapshot_validate_report
Execution halted
I tried running options(rsconnect.packrat = TRUE) as was recommended in the package description, but it did not seem to work. Please let me know if there is more information you need, this is my first time posting an issue.
The text was updated successfully, but these errors were encountered: