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

error with bioconductor URL #648

Open
alejandrohagan opened this issue Jun 12, 2024 · 4 comments
Open

error with bioconductor URL #648

alejandrohagan opened this issue Jun 12, 2024 · 4 comments

Comments

@alejandrohagan
Copy link

Hi,

I get the following error when I try to use pak::pak(). It occured after I upgraded to R 4.4 and its for package that I try to download

I'm not trying to use bioconductor as my repo and not sure why it is looking for it

! error in pak subprocess
Caused by error in `download.file(url, tmp, quiet = TRUE)`:
! cannot open URL 'http://bioconductor.org/config.yaml'

session info below

R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] marquee_0.1.0   lubridate_1.9.3 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.2     readr_2.1.5     tidyr_1.3.1     tibble_3.2.1    ggplot2_3.5.1   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] gtable_0.3.5      compiler_4.4.0    tidyselect_1.2.1  systemfonts_1.1.0 scales_1.3.0      textshaping_0.4.0 R6_2.5.1          pak_0.7.2         labeling_0.4.3    generics_0.1.3    munsell_0.5.1     pillar_1.9.0     
[13] tzdb_0.4.0        rlang_1.1.4       utf8_1.2.4        stringi_1.8.4     timechange_0.3.0  cli_3.6.2         withr_3.0.0       magrittr_2.0.3    grid_4.4.0        rstudioapi_0.16.0 hms_1.1.3         lifecycle_1.0.4  
[25] vctrs_0.6.5       glue_1.7.0        farver_2.1.2      fansi_1.0.6       colorspace_2.1-0  tools_4.4.0       pkgconfig_2.0.3  
@gaborcsardi
Copy link
Member

Can you access that URL from R?

@wurli
Copy link

wurli commented Jun 19, 2024

Looks likely to be the same issue as #295

@alejandrohagan
Copy link
Author

Can you access that URL from R?

Sorry for delay.

When I use the httr package I get the below screen shot results image

@arthur-shaw
Copy link

arthur-shaw commented Aug 15, 2024

I'm facing the same issue.

While there may be more to this, I think the issue might be that:

  • the bioconductor URL in pak uses http instead of https.
  • some (enterprise) networks may filter out requests to URLs that use http

In any case, I notice that pak fails when corporate VPN is enabled and succeeds when VPN is disabled.

#> r$> pak::pak("gt")
Error:
! error in pak subprocess
Caused by error in `download.file(url, tmp, quiet = TRUE)`:
! cannot open URL 'http://bioconductor.org/config.yaml'
Type .Last.error to see the more details.

#> r$> .Last.error
<callr_error/rlib_error_3_0/rlib_error/error>
Error:
! error in pak subprocess
Caused by error in `download.file(url, tmp, quiet = TRUE)`:
! cannot open URL 'http://bioconductor.org/config.yaml'
---
Backtrace:
1. pak::pak("gt")
2. pak::pkg_install(pkg, ...)
3. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), ..4. err$throw(res$error)
---
Subprocess backtrace:
 1. base::withCallingHandlers(cli_message = function(msg) { ...
 2. get("pkg_install_make_plan", asNamespace("pak"))(...)
 3. pkgdepends::new_pkg_installation_proposal(pkg, config = list(library = lib, ...
 4. pkg_installation_proposal$new(refs, config = config, ...)
 5. local initialize(...)
 6. pkg_plan$new(refs, config = config, library = config$library, ...
 7. local initialize(...)
 8. pkgdepends:::pkgplan_init(self, private, refs, config, library, remote_types, ...
 9. pkgcache::cranlike_metadata_cache$new(replica_path = private$config$get("metada...
10. local initialize(...)
11. pkgcache:::cmc_init(self, private, primary_path, replica_path, platforms, ...
12. pkgcache:::cmc__get_repos(repos, bioc, cran_mirror, r_version)
13. bioconductor$get_repos()
14. local get_bioc_version(getRversion(), forget)
15. local get_matching_bioc_version(r_version, forget = forget)
16. local get_version_map(forget = forget)
17. local get_yaml_config(forget)
18. base::stop(new)
19. global (function (e) ...

#> r$> # disabling VPN, which filters out requests to sites with http

#> r$> pak::pak("gt")
✔ Updated metadata database: 1.42 MB in 2 files.                          
✔ Updating metadata database ... done

When I try the bioconductor URL in the web browser (even while VPN is enabled)--that is, copy-paste the bioconductor URL from the pak error message--I seem to get redirected to the bioconductor URL that uses https. I'm guessing that the request sent through pak doesn't follow redirects.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants