Skip to content
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

[BUG] Deployment issue: Claims that the package i'm creating is not installed. #1136

Closed
jzadra opened this issue Apr 1, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@jzadra
Copy link

jzadra commented Apr 1, 2024

When I deploy my golem app to shinyapps.io, named "jzApp", I get the warning:

rsconnect::deployApp(
  appName = desc::desc_get_field("Package"),
  appTitle = desc::desc_get_field("Package"),
  appFiles = c(
    # Add any additional files unique to your app here.
    "R/",
    "inst/",
    #"data/",
    "NAMESPACE",
    "DESCRIPTION",
    "app.R"
  ),
  appId = rsconnect::deployments(".")$appID,
  lint = FALSE,
  forceUpdate = TRUE
)


ℹ Capturing R dependencies with renv
The following required packages are not installed:
- jzApp

Packages must first be installed before renv can snapshot them.
Use `renv::dependencies()` to see where this package is used in your project.

What do you want to do? 

1: Snapshot, just using the currently installed packages.
2: Install the packages, then snapshot.
3: Cancel, and resolve the situation on your own.

Is this supposed to happen or do I have something mis-configured?

Choosing Option 1 deploys, but the app does not work and gives the following errors in the log:

2024-04-01T15:47:31.123473+00:00 shinyapps[11331578]: Starting R with process ID: '75'
2024-04-01T15:47:31.128384+00:00 shinyapps[11331578]: Shiny application starting ...
2024-04-01T15:47:31.132042+00:00 shinyapps[11331578]: Warning in loadSupport(appDir, renv = sharedEnv, globalrenv = NULL) :
2024-04-01T15:47:31.135519+00:00 shinyapps[11331578]:   Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.
2024-04-01T15:47:31.139369+00:00 shinyapps[11331578]: ℹ Loading jzApp
2024-04-01T15:47:31.984508+00:00 shinyapps[11331578]: 
2024-04-01T15:47:31.988280+00:00 shinyapps[11331578]: Listening on http://127.0.0.1:41329
2024-04-01T16:24:18.216042+00:00 shinyapps[11331578]: Container event from container-9377171: stop

Option 2 yields:

Selection: 2
Error: package 'jzApp' is not available
@jzadra jzadra added the bug Something isn't working label Apr 1, 2024
@VincentGuyader
Copy link
Member

Hi

Can you update rsconnect and renv.
Then restart ans retry ?

:)

@jzadra
Copy link
Author

jzadra commented Apr 1, 2024

Both were already up to date: rsconnect @ 1.2.1 and renv @ 1.0.5

@VincentGuyader
Copy link
Member

Thank you for this feedback. This is an issue we encountered some time ago, but we were unable to reproduce it with the latest versions of renv and rsconnect.

There are three avenues to explore:

1/
Try using packrat instead of renv:

options(rsconnect.packrat = TRUE)

2/
Create your own renv.lock:

remotes::install_github("thinkr-open/attachment@renv_no_desc")
attachment::create_renv_for_prod(output = "renv.lock")

Then deploy using rsconnect::deployApp().

3/
Explicitly ask renv to ignore the jzApp package:

renv::settings$ignored.packages("jzApp")

Then deploy using rsconnect::deployApp().

@VincentGuyader
Copy link
Member

hi,

did you manage to deal with this issue ?

Regards

@jzadra
Copy link
Author

jzadra commented Apr 21, 2024

I used #3 and it seems to be working fine.

@ColinFay
Copy link
Member

closing if it's working, feel free to comment if you need the issue to be reopen :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants