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

cannot run gallery apps according to README #89

Open
chlebowa opened this issue Oct 21, 2023 · 3 comments
Open

cannot run gallery apps according to README #89

chlebowa opened this issue Oct 21, 2023 · 3 comments
Assignees
Labels
bug Something isn't working core

Comments

@chlebowa
Copy link

The README for teal.gallery says:

Running the restore_and_run("APP_NAME") will run the APP_NAME by restoring the packages using renv
restore_and_run("basic-teal")

This does not work. First, the link to sourceme.R is 404, the file has been moved to teal.galley/_internal/utils.
Second, this happens:

> source("./_internal/utils/sourceme.R")
> restore_and_run("basic-teal")
Downloading https://github.com/insightsengineering/teal.gallery/archive/HEAD.tar.gz
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
- Updated 1 record in "/tmp/RtmpKoQX1F/shinyappae535d39f48d/teal.gallery-6cbee27c2e9c63e4b549a36170c109ad604bfc47/basic-teal/renv.lock".
# Bootstrapping renv 1.0.3 ---------------------------------------------------
- Downloading renv ... FAILED
Error in h(simpleError(msg, call)) : failed to download:
All download methods failed

I can run the app with

(apps <- list.files(pattern = "app\\.R", recursive = TRUE))
shiny::shinyAppFile(apps[1], options = list("launch.browser" = TRUE))

to use my won environment but that's not the point, is it?

@chlebowa chlebowa added bug Something isn't working core labels Oct 21, 2023
@vedhav
Copy link
Contributor

vedhav commented Oct 21, 2023

Regarding the sourcing of the remote sourceme.R file. I notice that the redirect fails when I'm connected to one network (broadband connection) while it succeeds when I'm using another network (mobile hotspot) I think there is some issue with certain ISPs blocking it. I will change it to https://raw.githubusercontent.com/insightsengineering/teal.gallery/main/_internal/utils/sourceme.R so it will work regardless.
Edit: Okay, I'm not able to access this link through one of my networks. Are you able to view the Raw code when you click it from here?

Now, regarding the restore_and_run("basic-teal") which did not work for you (it does for me btw) I would like to know more regarding this to figure out what is going on. Could you please provide these details?

  1. Which R version are you using?
  2. What version of renv are you using packageVersion('renv')?

And yes, you're right the point is to not make the user install anything other than renv and having to set the GitHub_PAT so our teal packages can be installed via GitHub (In future, after the CRAN releases this will go away)

@chlebowa
Copy link
Author

Why not link to system.file(...)?

> R.version
               _                                          
platform       x86_64-pc-linux-gnu                        
arch           x86_64                                     
os             linux-gnu                                  
system         x86_64, linux-gnu                          
status         Patched                                    
major          4                                          
minor          2.2                                        
year           2022                                       
month          11                                         
day            10                                         
svn rev        83330                                      
language       R                                          
version.string R version 4.2.2 Patched (2022-11-10 r83330)
nickname       Innocent and Trusting      

> packageVersion("renv")
[1] ‘1.0.1’

@vedhav
Copy link
Contributor

vedhav commented Oct 23, 2023

I tried to restore and run using the same R and renv version in my machine and it worked fine so that's not an issue:

> R.version
               _
platform       aarch64-apple-darwin20
arch           aarch64
os             darwin20
system         aarch64, darwin20
status
major          4
minor          2.2
year           2022
month          10
day            31
svn rev        83211
language       R
version.string R version 4.2.2 (2022-10-31)
nickname       Innocent and Trusting
> packageVersion('renv')
[1] ‘1.0.1

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

No branches or pull requests

2 participants