Bioconductor / BiocFileCache

Manage Files Across Sessions
12 stars 6 forks source link

curl error with bfcrpath: HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1) #48

Closed lcolladotor closed 6 months ago

lcolladotor commented 1 year ago

Hi BiocFileCache team,

Last week at BioC2023 I ran into some issues with spatialLIBD::fetch_data("spatialDLPFC_Visium_modeling_results") and related functions after I wiped out clean my BiocFileCache on my laptop and forced it to re-download data. I made a reprex below abstracting away the spatialLIBD layer.

library("BiocFileCache")
#> Loading required package: dbplyr
bfc <- BiocFileCache::BiocFileCache()
BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
#> adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
#> Warning in value[[3L]](cond): 
#> trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error:
#>   HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
#> Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"): not all 'rnames' found or unique.
traceback()
#> No traceback available
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       macOS Ventura 13.4
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2023-08-11
#>  pandoc   3.1.5 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package       * version date (UTC) lib source
#>  BiocFileCache * 2.8.0   2023-04-25 [1] Bioconductor
#>  bit             4.0.5   2022-11-15 [1] CRAN (R 4.3.0)
#>  bit64           4.0.5   2020-08-30 [1] CRAN (R 4.3.0)
#>  blob            1.2.4   2023-03-17 [1] CRAN (R 4.3.0)
#>  cachem          1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
#>  cli             3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
#>  curl            5.0.1   2023-06-07 [1] CRAN (R 4.3.0)
#>  DBI             1.1.3   2022-06-18 [1] CRAN (R 4.3.0)
#>  dbplyr        * 2.3.3   2023-07-07 [1] CRAN (R 4.3.0)
#>  digest          0.6.33  2023-07-07 [1] CRAN (R 4.3.0)
#>  dplyr           1.1.2   2023-04-20 [1] CRAN (R 4.3.0)
#>  evaluate        0.21    2023-05-05 [1] CRAN (R 4.3.0)
#>  fansi           1.0.4   2023-01-22 [1] CRAN (R 4.3.0)
#>  fastmap         1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
#>  filelock        1.0.2   2018-10-05 [1] CRAN (R 4.3.0)
#>  fs              1.6.3   2023-07-20 [1] CRAN (R 4.3.0)
#>  generics        0.1.3   2022-07-05 [1] CRAN (R 4.3.0)
#>  glue            1.6.2   2022-02-24 [1] CRAN (R 4.3.0)
#>  htmltools       0.5.5   2023-03-23 [1] CRAN (R 4.3.0)
#>  httr            1.4.6   2023-05-08 [1] CRAN (R 4.3.0)
#>  knitr           1.43    2023-05-25 [1] CRAN (R 4.3.0)
#>  lifecycle       1.0.3   2022-10-07 [1] CRAN (R 4.3.0)
#>  magrittr        2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
#>  memoise         2.0.1   2021-11-26 [1] CRAN (R 4.3.0)
#>  pillar          1.9.0   2023-03-22 [1] CRAN (R 4.3.0)
#>  pkgconfig       2.0.3   2019-09-22 [1] CRAN (R 4.3.0)
#>  purrr           1.0.1   2023-01-10 [1] CRAN (R 4.3.0)
#>  R.cache         0.16.0  2022-07-21 [1] CRAN (R 4.3.0)
#>  R.methodsS3     1.8.2   2022-06-13 [1] CRAN (R 4.3.0)
#>  R.oo            1.25.0  2022-06-12 [1] CRAN (R 4.3.0)
#>  R.utils         2.12.2  2022-11-11 [1] CRAN (R 4.3.0)
#>  R6              2.5.1   2021-08-19 [1] CRAN (R 4.3.0)
#>  reprex          2.0.2   2022-08-17 [1] CRAN (R 4.3.0)
#>  rlang           1.1.1   2023-04-28 [1] CRAN (R 4.3.0)
#>  rmarkdown       2.23    2023-07-01 [1] CRAN (R 4.3.0)
#>  RSQLite         2.3.1   2023-04-03 [1] CRAN (R 4.3.0)
#>  rstudioapi      0.15.0  2023-07-07 [1] CRAN (R 4.3.0)
#>  sessioninfo     1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
#>  styler          1.10.1  2023-06-05 [1] CRAN (R 4.3.0)
#>  tibble          3.2.1   2023-03-20 [1] CRAN (R 4.3.0)
#>  tidyselect      1.2.0   2022-10-10 [1] CRAN (R 4.3.0)
#>  utf8            1.2.3   2023-01-31 [1] CRAN (R 4.3.0)
#>  vctrs           0.6.3   2023-06-14 [1] CRAN (R 4.3.0)
#>  withr           2.5.0   2022-03-03 [1] CRAN (R 4.3.0)
#>  xfun            0.39    2023-04-20 [1] CRAN (R 4.3.0)
#>  yaml            2.3.7   2023-01-23 [1] CRAN (R 4.3.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2023-08-11 with reprex v2.0.2

I was surprised by this as everything is working ok at GitHub actions using the biocthis workflow as well as in the Bioconductor BBS system.

In the 30 min prior to our spatialLIBD BioC2023 demo with @lahuuki, I tried resolving this. By googling the error message, I realized that curl (and httr), BiocFileCache dependencies, now use http version 2 instead of 1.1. See https://github.com/jeroen/curl/issues/232 for a related issue. There they link to https://cran.r-project.org/web/packages/curl/vignettes/intro.html#Disabling_HTTP2 for disabling HTTP2, but I'm not sure if I can do that as a BiocFileCache user. Maybe through the config argument https://github.com/search?q=repo%3ABioconductor%2FBiocFileCache%20config&type=code. But that doesn't seem to be the case (maybe I'm not specifying config where I should):

> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = list(http_version = 2))
adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  |==================================================================================| 100%

Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1",  : 
  not all 'rnames' found or unique.
In addition: Warning message:
In value[[3L]](cond) : 
trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error:
  HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

What I find weird is that the download does actually happen, but at the very end it errors out. So I'm not 100% sure that the error is related to the http version 1.1 vs 2 change.

Hm... maybe something else changed in BiocFileCache::bfcrpath() that I'm not aware of, but well, in that case, I would expect things to break on GitHub Actions and BBS as well.

1 to 3 students at https://github.com/lcolladotor/cshl_rstats_genome_scale_2023 ran into this error and I thought it was something related their laptop configurations, and for the purpose of that course, we could get around things by having them download the data from Dropbox manually.

Thanks, Leo

mtmorgan commented 1 year ago

Thanks, my quasi-understanding is that this is a server misconfiguration that will presumably be fixed at some point in the future. Hopefully we can investigate more in a couple of weeks...

mtmorgan commented 1 year ago

I am not able to reproduce this under either Bioc-3.17 (BiocFileCache 2.8.0) or Bioc-devel (BiocFileCache 2.9.1).

Both of these have current curl, version 5.0.2, which is different from yours? There is no mention of a relevant change in news(package = "curl").

 Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.1 Patched (2023-07-17 r84704)
 os       macOS Monterey 12.6.7
 system   aarch64, darwin21.6.0
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2023-08-14
 pandoc   3.1.2 @ /Users/ma38727/homebrew/bin/pandoc

─ Packages ───────────────────────────────────────────────────────────────────
 package       * version date (UTC) lib source
 BiocFileCache   2.8.0   2023-04-25 [1] Bioconductor
 bit             4.0.5   2022-11-15 [1] CRAN (R 4.3.0)
 bit64           4.0.5   2020-08-30 [1] CRAN (R 4.3.0)
 blob            1.2.4   2023-03-17 [1] CRAN (R 4.3.0)
 cachem          1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
 cli             3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
 curl            5.0.2   2023-08-14 [1] CRAN (R 4.3.1)
...
lcolladotor commented 1 year ago

Interesting!

Hmmm, I just updated my curl (and other packages via BiocManager::install()) to version 5.0.2 and get the same error I was getting before. We do have some differences in our operating systems, and your R version is from about a month later than mine (though both are from R 4.3.1). I'm going to update my OS next too from Ventura 13.4 to 13.5.

Screenshot 2023-08-14 at 12 24 36 PM
library("BiocFileCache")
#> Loading required package: dbplyr
bfc <- BiocFileCache::BiocFileCache()
BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = list(http_version = 2))
#> adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
#> Warning in value[[3L]](cond): 
#> trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error:
#>   HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
#> Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", : not all 'rnames' found or unique.
traceback()
#> No traceback available
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       macOS Ventura 13.4
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2023-08-14
#>  pandoc   3.1.5 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package       * version date (UTC) lib source
#>  BiocFileCache * 2.8.0   2023-04-25 [1] Bioconductor
#>  bit             4.0.5   2022-11-15 [1] CRAN (R 4.3.0)
#>  bit64           4.0.5   2020-08-30 [1] CRAN (R 4.3.0)
#>  blob            1.2.4   2023-03-17 [1] CRAN (R 4.3.0)
#>  cachem          1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
#>  cli             3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
#>  curl            5.0.2   2023-08-14 [1] CRAN (R 4.3.1)
#>  DBI             1.1.3   2022-06-18 [1] CRAN (R 4.3.0)
#>  dbplyr        * 2.3.3   2023-07-07 [1] CRAN (R 4.3.0)
#>  digest          0.6.33  2023-07-07 [1] CRAN (R 4.3.0)
#>  dplyr           1.1.2   2023-04-20 [1] CRAN (R 4.3.0)
#>  evaluate        0.21    2023-05-05 [1] CRAN (R 4.3.0)
#>  fansi           1.0.4   2023-01-22 [1] CRAN (R 4.3.0)
#>  fastmap         1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
#>  filelock        1.0.2   2018-10-05 [1] CRAN (R 4.3.0)
#>  fs              1.6.3   2023-07-20 [1] CRAN (R 4.3.0)
#>  generics        0.1.3   2022-07-05 [1] CRAN (R 4.3.0)
#>  glue            1.6.2   2022-02-24 [1] CRAN (R 4.3.0)
#>  htmltools       0.5.6   2023-08-10 [1] CRAN (R 4.3.0)
#>  httr            1.4.6   2023-05-08 [1] CRAN (R 4.3.0)
#>  knitr           1.43    2023-05-25 [1] CRAN (R 4.3.0)
#>  lifecycle       1.0.3   2022-10-07 [1] CRAN (R 4.3.0)
#>  magrittr        2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
#>  memoise         2.0.1   2021-11-26 [1] CRAN (R 4.3.0)
#>  pillar          1.9.0   2023-03-22 [1] CRAN (R 4.3.0)
#>  pkgconfig       2.0.3   2019-09-22 [1] CRAN (R 4.3.0)
#>  purrr           1.0.2   2023-08-10 [1] CRAN (R 4.3.0)
#>  R.cache         0.16.0  2022-07-21 [1] CRAN (R 4.3.0)
#>  R.methodsS3     1.8.2   2022-06-13 [1] CRAN (R 4.3.0)
#>  R.oo            1.25.0  2022-06-12 [1] CRAN (R 4.3.0)
#>  R.utils         2.12.2  2022-11-11 [1] CRAN (R 4.3.0)
#>  R6              2.5.1   2021-08-19 [1] CRAN (R 4.3.0)
#>  reprex          2.0.2   2022-08-17 [1] CRAN (R 4.3.0)
#>  rlang           1.1.1   2023-04-28 [1] CRAN (R 4.3.0)
#>  rmarkdown       2.24    2023-08-14 [1] CRAN (R 4.3.1)
#>  RSQLite         2.3.1   2023-04-03 [1] CRAN (R 4.3.0)
#>  rstudioapi      0.15.0  2023-07-07 [1] CRAN (R 4.3.0)
#>  sessioninfo     1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
#>  styler          1.10.1  2023-06-05 [1] CRAN (R 4.3.0)
#>  tibble          3.2.1   2023-03-20 [1] CRAN (R 4.3.0)
#>  tidyselect      1.2.0   2022-10-10 [1] CRAN (R 4.3.0)
#>  utf8            1.2.3   2023-01-31 [1] CRAN (R 4.3.0)
#>  vctrs           0.6.3   2023-06-14 [1] CRAN (R 4.3.0)
#>  withr           2.5.0   2022-03-03 [1] CRAN (R 4.3.0)
#>  xfun            0.40    2023-08-09 [1] CRAN (R 4.3.0)
#>  yaml            2.3.7   2023-01-23 [1] CRAN (R 4.3.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2023-08-14 with reprex v2.0.2

lcolladotor commented 1 year ago

Updating my operating system did the trick! Thanks for trying to reproduce the issue and for your companion session info!

I'm going to close the issue, but feel free to re-open it if you want. Like on the R side, I'm not sure what else could be done. Hm.... maybe using a tryCatch() chunk to detect if you are getting this type of error then checking the operating system version seems like too much of an edit for something that hopefully won't be a frequent issue. But well, maybe you have other thoughts on whether to address this from R or not.

library("BiocFileCache")
#> Loading required package: dbplyr
bfc <- BiocFileCache::BiocFileCache()
BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = list(http_version = 2))
#>                                                                                                                          BFC11 
#> "/Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache/147b3e65d5b8_modeling_results_BayesSpace_k09.Rdata%3Fdl%3D1"
traceback()
#> No traceback available
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       macOS Ventura 13.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2023-08-14
#>  pandoc   3.1.5 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package       * version date (UTC) lib source
#>  BiocFileCache * 2.8.0   2023-04-25 [1] Bioconductor
#>  bit             4.0.5   2022-11-15 [1] CRAN (R 4.3.0)
#>  bit64           4.0.5   2020-08-30 [1] CRAN (R 4.3.0)
#>  blob            1.2.4   2023-03-17 [1] CRAN (R 4.3.0)
#>  cachem          1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
#>  cli             3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
#>  curl            5.0.2   2023-08-14 [1] CRAN (R 4.3.1)
#>  DBI             1.1.3   2022-06-18 [1] CRAN (R 4.3.0)
#>  dbplyr        * 2.3.3   2023-07-07 [1] CRAN (R 4.3.0)
#>  digest          0.6.33  2023-07-07 [1] CRAN (R 4.3.0)
#>  dplyr           1.1.2   2023-04-20 [1] CRAN (R 4.3.0)
#>  evaluate        0.21    2023-05-05 [1] CRAN (R 4.3.0)
#>  fansi           1.0.4   2023-01-22 [1] CRAN (R 4.3.0)
#>  fastmap         1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
#>  filelock        1.0.2   2018-10-05 [1] CRAN (R 4.3.0)
#>  fs              1.6.3   2023-07-20 [1] CRAN (R 4.3.0)
#>  generics        0.1.3   2022-07-05 [1] CRAN (R 4.3.0)
#>  glue            1.6.2   2022-02-24 [1] CRAN (R 4.3.0)
#>  htmltools       0.5.6   2023-08-10 [1] CRAN (R 4.3.0)
#>  httr            1.4.6   2023-05-08 [1] CRAN (R 4.3.0)
#>  knitr           1.43    2023-05-25 [1] CRAN (R 4.3.0)
#>  lifecycle       1.0.3   2022-10-07 [1] CRAN (R 4.3.0)
#>  magrittr        2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
#>  memoise         2.0.1   2021-11-26 [1] CRAN (R 4.3.0)
#>  pillar          1.9.0   2023-03-22 [1] CRAN (R 4.3.0)
#>  pkgconfig       2.0.3   2019-09-22 [1] CRAN (R 4.3.0)
#>  purrr           1.0.2   2023-08-10 [1] CRAN (R 4.3.0)
#>  R.cache         0.16.0  2022-07-21 [1] CRAN (R 4.3.0)
#>  R.methodsS3     1.8.2   2022-06-13 [1] CRAN (R 4.3.0)
#>  R.oo            1.25.0  2022-06-12 [1] CRAN (R 4.3.0)
#>  R.utils         2.12.2  2022-11-11 [1] CRAN (R 4.3.0)
#>  R6              2.5.1   2021-08-19 [1] CRAN (R 4.3.0)
#>  reprex          2.0.2   2022-08-17 [1] CRAN (R 4.3.0)
#>  rlang           1.1.1   2023-04-28 [1] CRAN (R 4.3.0)
#>  rmarkdown       2.24    2023-08-14 [1] CRAN (R 4.3.1)
#>  RSQLite         2.3.1   2023-04-03 [1] CRAN (R 4.3.0)
#>  rstudioapi      0.15.0  2023-07-07 [1] CRAN (R 4.3.0)
#>  sessioninfo     1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
#>  styler          1.10.1  2023-06-05 [1] CRAN (R 4.3.0)
#>  tibble          3.2.1   2023-03-20 [1] CRAN (R 4.3.0)
#>  tidyselect      1.2.0   2022-10-10 [1] CRAN (R 4.3.0)
#>  utf8            1.2.3   2023-01-31 [1] CRAN (R 4.3.0)
#>  vctrs           0.6.3   2023-06-14 [1] CRAN (R 4.3.0)
#>  withr           2.5.0   2022-03-03 [1] CRAN (R 4.3.0)
#>  xfun            0.40    2023-08-09 [1] CRAN (R 4.3.0)
#>  yaml            2.3.7   2023-01-23 [1] CRAN (R 4.3.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2023-08-14 with reprex v2.0.2

LiNk-NY commented 1 year ago

FWIW I was not able to reproduce this on Monterey 12.6.8 Mac with Bioc 3.18 (even with curl 5.0.1):

─ Session info ───────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.1 (2023-06-16)
 os       macOS Monterey 12.6.8
 system   x86_64, darwin20
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2023-08-14
 rstudio  2023.06.1+524 Mountain Hydrangea (desktop)
 pandoc   3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────
 ! package       * version   date (UTC) lib source
   Biobase         2.61.0    2023-04-25 [1] Bioconductor
   BiocAddins      0.99.18   2023-07-13 [1] Github (Bioconductor/BiocAddins@4dcd686)
   BiocBaseUtils   1.3.2     2023-07-18 [1] Bioconductor
 P BiocCheck     * 1.37.7    2023-07-17 [?] Bioconductor
   BiocFileCache * 2.9.1     2023-07-12 [1] Bioconductor
   BiocGenerics    0.47.0    2023-04-25 [1] Bioconductor
   BiocManager     1.30.22   2023-08-06 [1] local
   biocViews       1.69.1    2023-05-10 [1] Bioconductor
   bit             4.0.5     2022-11-15 [1] CRAN (R 4.3.0)
   bit64           4.0.5     2020-08-30 [1] CRAN (R 4.3.0)
   bitops          1.0-7     2021-04-24 [1] CRAN (R 4.3.0)
   blob            1.2.4     2023-03-17 [1] CRAN (R 4.3.0)
   brio            1.1.3     2021-11-30 [1] CRAN (R 4.3.0)
   cachem          1.0.8     2023-05-01 [1] CRAN (R 4.3.0)
   callr           3.7.3     2022-11-02 [1] CRAN (R 4.3.0)
   cli             3.6.1     2023-03-23 [1] CRAN (R 4.3.0)
   codetools       0.2-19    2023-02-01 [2] CRAN (R 4.3.1)
   colorout      * 1.2-2     2019-11-14 [1] Github (jalvesaq/colorout@641ed38)
   crayon          1.5.2     2022-09-29 [1] CRAN (R 4.3.0)
   curl            5.0.1     2023-06-07 [1] CRAN (R 4.3.0)
lcolladotor commented 1 year ago

Thanks for the info Marcel!

lcolladotor commented 6 months ago

Hi,

This issue has resurfaced. Unlike last time, I'm using the latest version of macOS available for my computer: macOS Sonoma 14.5 (23F79).

Screenshot 2024-05-20 at 9 27 49 AM

Have you seen this issue too?

Best, Leo

R 4.4.0 - bioc 3.19 output

``` r library("BiocFileCache") #> Loading required package: dbplyr ``` ``` r bfc <- BiocFileCache::BiocFileCache() BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") #> adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' #> Warning in value[[3L]](cond): #> trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error: #> HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1) #> Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"): not all 'rnames' found or unique. ``` ``` r traceback() #> No traceback available ``` ``` r options(width = 120) sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────── #> setting value #> version R version 4.4.0 (2024-04-24) #> os macOS Sonoma 14.5 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2024-05-20 #> pandoc 3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> BiocFileCache * 2.12.0 2024-04-30 [1] Bioconductor 3.19 (R 4.4.0) #> bit 4.0.5 2022-11-15 [1] CRAN (R 4.4.0) #> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.4.0) #> blob 1.2.4 2023-03-17 [1] CRAN (R 4.4.0) #> cachem 1.1.0 2024-05-16 [1] CRAN (R 4.4.0) #> cli 3.6.2 2023-12-11 [1] CRAN (R 4.4.0) #> curl 5.2.1 2024-03-01 [1] CRAN (R 4.4.0) #> DBI 1.2.2 2024-02-16 [1] CRAN (R 4.4.0) #> dbplyr * 2.5.0 2024-03-19 [1] CRAN (R 4.4.0) #> digest 0.6.35 2024-03-11 [1] CRAN (R 4.4.0) #> dplyr 1.1.4 2023-11-17 [1] CRAN (R 4.4.0) #> evaluate 0.23 2023-11-01 [1] CRAN (R 4.4.0) #> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.4.0) #> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.4.0) #> filelock 1.0.3 2023-12-11 [1] CRAN (R 4.4.0) #> fs 1.6.4 2024-04-25 [1] CRAN (R 4.4.0) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.4.0) #> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0) #> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0) #> httr 1.4.7 2023-08-15 [1] CRAN (R 4.4.0) #> knitr 1.46 2024-04-06 [1] CRAN (R 4.4.0) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.4.0) #> memoise 2.0.1 2021-11-26 [1] CRAN (R 4.4.0) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.4.0) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.4.0) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.4.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.4.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.4.0) #> R.oo 1.26.0 2024-01-24 [1] CRAN (R 4.4.0) #> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.4.0) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.4.0) #> reprex 2.1.0 2024-01-11 [1] CRAN (R 4.4.0) #> rlang 1.1.3 2024-01-10 [1] CRAN (R 4.4.0) #> rmarkdown 2.27 2024-05-17 [1] CRAN (R 4.4.0) #> RSQLite 2.3.6 2024-03-31 [1] CRAN (R 4.4.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.4.0) #> styler 1.10.3 2024-04-07 [1] CRAN (R 4.4.0) #> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.4.0) #> tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.4.0) #> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.4.0) #> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0) #> withr 3.0.0 2024-01-16 [1] CRAN (R 4.4.0) #> xfun 0.44 2024-05-15 [1] CRAN (R 4.4.0) #> yaml 2.3.8 2023-12-11 [1] CRAN (R 4.4.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ``` Created on 2024-05-20 with [reprex v2.1.0](https://reprex.tidyverse.org)

R 4.3.2 - bioc 3.18 output

``` r library("BiocFileCache") #> Warning: package 'BiocFileCache' was built under R version 4.3.3 #> Loading required package: dbplyr ``` ``` r bfc <- BiocFileCache::BiocFileCache() BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") #> adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' #> Warning in value[[3L]](cond): #> trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error: #> HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1) #> Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"): not all 'rnames' found or unique. ``` ``` r traceback() #> No traceback available ``` ``` r options(width = 120) sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.2 (2023-10-31) #> os macOS Sonoma 14.5 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2024-05-20 #> pandoc 3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> BiocFileCache * 2.10.2 2024-03-30 [1] Bioconductor 3.18 (R 4.3.3) #> bit 4.0.5 2022-11-15 [1] CRAN (R 4.3.0) #> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.3.0) #> blob 1.2.4 2023-03-17 [1] CRAN (R 4.3.0) #> cachem 1.1.0 2024-05-16 [1] CRAN (R 4.3.3) #> cli 3.6.2 2023-12-11 [1] CRAN (R 4.3.1) #> curl 5.2.1 2024-03-01 [1] CRAN (R 4.3.1) #> DBI 1.2.2 2024-02-16 [1] CRAN (R 4.3.1) #> dbplyr * 2.5.0 2024-03-19 [1] CRAN (R 4.3.1) #> digest 0.6.35 2024-03-11 [1] CRAN (R 4.3.1) #> dplyr 1.1.4 2023-11-17 [1] CRAN (R 4.3.1) #> evaluate 0.23 2023-11-01 [1] CRAN (R 4.3.1) #> fansi 1.0.6 2023-12-08 [1] CRAN (R 4.3.1) #> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.3.3) #> filelock 1.0.3 2023-12-11 [1] CRAN (R 4.3.1) #> fs 1.6.4 2024-04-25 [1] CRAN (R 4.3.1) #> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.0) #> glue 1.7.0 2024-01-09 [1] CRAN (R 4.3.1) #> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.3.1) #> httr 1.4.7 2023-08-15 [1] CRAN (R 4.3.0) #> knitr 1.46 2024-04-06 [1] CRAN (R 4.3.2) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.3.1) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0) #> memoise 2.0.1 2021-11-26 [1] CRAN (R 4.3.0) #> pillar 1.9.0 2023-03-22 [1] CRAN (R 4.3.0) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.0) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.0) #> R.oo 1.26.0 2024-01-24 [1] CRAN (R 4.3.1) #> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.3.1) #> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0) #> reprex 2.1.0 2024-01-11 [1] CRAN (R 4.3.1) #> rlang 1.1.3 2024-01-10 [1] CRAN (R 4.3.1) #> rmarkdown 2.27 2024-05-17 [1] CRAN (R 4.3.3) #> RSQLite 2.3.6 2024-03-31 [1] CRAN (R 4.3.1) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0) #> styler 1.10.3 2024-04-07 [1] CRAN (R 4.3.1) #> tibble 3.2.1 2023-03-20 [1] CRAN (R 4.3.0) #> tidyselect 1.2.1 2024-03-11 [1] CRAN (R 4.3.1) #> utf8 1.2.4 2023-10-22 [1] CRAN (R 4.3.1) #> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.3.1) #> withr 3.0.0 2024-01-16 [1] CRAN (R 4.3.1) #> xfun 0.44 2024-05-15 [1] CRAN (R 4.3.3) #> yaml 2.3.8 2023-12-11 [1] CRAN (R 4.3.1) #> #> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ``` Created on 2024-05-20 with [reprex v2.1.0](https://reprex.tidyverse.org)

I've also tried with R 4.4.0 and install.packages("curl", type = "source").

lcolladotor commented 6 months ago

If it helps, note that this does work:

local_file <-
    tempfile("modeling_results_BayesSpace_k09.Rdata")
download.file(
    "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1",
    local_file,
    mode = "wb"
)
tools::md5sum(local_file)
#> /var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T//RtmpiNWpyE/modeling_results_BayesSpace_k09.Rdatad2784a52363e 
#>                                                                             "ab6b6730efe4aeae2d79edec93ba4702"
load(local_file, verbose = TRUE)
#> Loading objects:
#>   modeling_results
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.0 (2024-04-24)
#>  os       macOS Sonoma 14.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2024-05-20
#>  pandoc   3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.4.0)
#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.4.0)
#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.4.0)
#>  fastmap       1.2.0   2024-05-15 [1] CRAN (R 4.4.0)
#>  fs            1.6.4   2024-04-25 [1] CRAN (R 4.4.0)
#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.4.0)
#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0)
#>  knitr         1.46    2024-04-06 [1] CRAN (R 4.4.0)
#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.4.0)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.4.0)
#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.4.0)
#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.4.0)
#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.4.0)
#>  R.oo          1.26.0  2024-01-24 [1] CRAN (R 4.4.0)
#>  R.utils       2.12.3  2023-11-18 [1] CRAN (R 4.4.0)
#>  reprex        2.1.0   2024-01-11 [1] CRAN (R 4.4.0)
#>  rlang         1.1.3   2024-01-10 [1] CRAN (R 4.4.0)
#>  rmarkdown     2.27    2024-05-17 [1] CRAN (R 4.4.0)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.4.0)
#>  styler        1.10.3  2024-04-07 [1] CRAN (R 4.4.0)
#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.4.0)
#>  withr         3.0.0   2024-01-16 [1] CRAN (R 4.4.0)
#>  xfun          0.44    2024-05-15 [1] CRAN (R 4.4.0)
#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.4.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2024-05-20 with reprex v2.1.0

The above code is based on https://github.com/LieberInstitute/spatialLIBD/issues/73#issuecomment-2016520542 and it's the workaround I provide to people when they can't use spatialLIBD::fetch_data() (which internally uses BiocFileCache).

lcolladotor commented 6 months ago

Note that this also works:

local_file <-
    tempfile("modeling_results_BayesSpace_k09.Rdata")
curl::curl_download("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", destfile = local_file)
tools::md5sum(local_file)
#> /var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T//Rtmp9yEf2g/modeling_results_BayesSpace_k09.Rdatad6b914231bc9 
#>                                                                             "ab6b6730efe4aeae2d79edec93ba4702"
load(local_file, verbose = TRUE)
#> Loading objects:
#>   modeling_results
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.0 (2024-04-24)
#>  os       macOS Sonoma 14.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2024-05-20
#>  pandoc   3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.4.0)
#>  curl          5.2.1   2024-03-01 [1] CRAN (R 4.4.0)
#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.4.0)
#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.4.0)
#>  fastmap       1.2.0   2024-05-15 [1] CRAN (R 4.4.0)
#>  fs            1.6.4   2024-04-25 [1] CRAN (R 4.4.0)
#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.4.0)
#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0)
#>  knitr         1.46    2024-04-06 [1] CRAN (R 4.4.0)
#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.4.0)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.4.0)
#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.4.0)
#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.4.0)
#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.4.0)
#>  R.oo          1.26.0  2024-01-24 [1] CRAN (R 4.4.0)
#>  R.utils       2.12.3  2023-11-18 [1] CRAN (R 4.4.0)
#>  reprex        2.1.0   2024-01-11 [1] CRAN (R 4.4.0)
#>  rlang         1.1.3   2024-01-10 [1] CRAN (R 4.4.0)
#>  rmarkdown     2.27    2024-05-17 [1] CRAN (R 4.4.0)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.4.0)
#>  styler        1.10.3  2024-04-07 [1] CRAN (R 4.4.0)
#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.4.0)
#>  withr         3.0.0   2024-01-16 [1] CRAN (R 4.4.0)
#>  xfun          0.44    2024-05-15 [1] CRAN (R 4.4.0)
#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.4.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2024-05-20 with reprex v2.1.0

I tried that after looking at https://github.com/jeroen/curl/issues/338.

lcolladotor commented 6 months ago

Also this works:

websource <- "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
local_file <-
    tempfile("modeling_results_BayesSpace_k09.Rdata")
httr::GET(websource, httr::progress(con = stderr()), config= list(),
                    httr::write_disk(local_file, overwrite=TRUE))
#> Response [https://ucc9233162d1f4ce89cda3dc33db.dl.dropboxusercontent.com/cd/0/get/CTQsU5KdGZ49ZnCdyfN2Vm5KaWMrGU8IW06HCAaOx4y2tFBc7NoVTgvO-pI2df3n7k840W83qcpQ-qIxqaW2sGDo2GET4s4JC0q5llXElgUU-XRrBDDpuvNfUFpsf8iL_FuH8AO3AB58hCRU4X_NxdLH/file?dl=1]
#>   Date: 2024-05-20 14:02
#>   Status: 200
#>   Content-Type: application/binary
#>   Size: 12.3 MB
#> <ON DISK>  /var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T//RtmpuMCdUx/modeling_results_BayesSpace_k09.Rdatad9b73f154781
tools::md5sum(local_file)
#> /var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T//RtmpuMCdUx/modeling_results_BayesSpace_k09.Rdatad9b73f154781 
#>                                                                             "ab6b6730efe4aeae2d79edec93ba4702"
load(local_file, verbose = TRUE)
#> Loading objects:
#>   modeling_results
options(width = 120)
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.0 (2024-04-24)
#>  os       macOS Sonoma 14.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2024-05-20
#>  pandoc   3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.4.0)
#>  curl          5.2.1   2024-03-01 [1] CRAN (R 4.4.0)
#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.4.0)
#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.4.0)
#>  fastmap       1.2.0   2024-05-15 [1] CRAN (R 4.4.0)
#>  fs            1.6.4   2024-04-25 [1] CRAN (R 4.4.0)
#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.4.0)
#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0)
#>  httr          1.4.7   2023-08-15 [1] CRAN (R 4.4.0)
#>  knitr         1.46    2024-04-06 [1] CRAN (R 4.4.0)
#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.4.0)
#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.4.0)
#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.4.0)
#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.4.0)
#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.4.0)
#>  R.oo          1.26.0  2024-01-24 [1] CRAN (R 4.4.0)
#>  R.utils       2.12.3  2023-11-18 [1] CRAN (R 4.4.0)
#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.4.0)
#>  reprex        2.1.0   2024-01-11 [1] CRAN (R 4.4.0)
#>  rlang         1.1.3   2024-01-10 [1] CRAN (R 4.4.0)
#>  rmarkdown     2.27    2024-05-17 [1] CRAN (R 4.4.0)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.4.0)
#>  styler        1.10.3  2024-04-07 [1] CRAN (R 4.4.0)
#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.4.0)
#>  withr         3.0.0   2024-01-16 [1] CRAN (R 4.4.0)
#>  xfun          0.44    2024-05-15 [1] CRAN (R 4.4.0)
#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.4.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2024-05-20 with reprex v2.1.0

That was from adapting the internal BiocFileCache code at https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/httr.R#L62-L67. I saw that BiocFileCache:::.httr_download() gets used by BiocFileCache:::.util_download_and_rename(), which is used by bfcdownload(). But well, I can't see the connection to those functions from bfcrpath(), but maybe you do.

mtmorgan commented 6 months ago

It's more helpful to use traceback() to see where the error is occurring, followed by debug() or options(error=recover) to identify the explicit call and values that cause the problem, and finally to do the call outside the BiocFileCache framework, where you'll reproduced the error with a minimal example; currently it sounds like a curl problem rather than BiocFileCache...

Also it seems like the most helpful debuging information comes from curl::curl_version(). I have

> curl::curl_version()
$version
[1] "8.4.0"

$ssl_version
[1] "(SecureTransport) LibreSSL/3.3.6"

$libz_version
[1] "1.2.12"

$libssh_version
[1] NA

$libidn_version
[1] NA

$host
[1] "x86_64-apple-darwin23.0"

$protocols
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"
 [8] "https"   "imap"    "imaps"   "ldap"    "ldaps"   "mqtt"    "pop3"
[15] "pop3s"   "rtsp"    "smb"     "smbs"    "smtp"    "smtps"   "telnet"
[22] "tftp"

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] FALSE

and also no problems (Sonoma 14.4.1) with the command

> bfc = BiocFileCache(tempfile())
/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T//Rtmpq4qT5r/file127deb0da726
does not exist, create directory? (yes/no): yes
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  |=====================================================================| 100%

                                                                                                                                        BFC1
"/var/folders/yn/gmsh_22s2c55v816r6d51fx1tnyl61/T//Rtmpq4qT5r/file127deb0da726/127de2d58b575_modeling_results_BayesSpace_k09.Rdata%3Fdl%3D1"
> sessionInfo()
R version 4.4.0 beta (2024-04-14 r86424)
Platform: aarch64-apple-darwin23.4.0
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /Users/ma38727/bin/R-4-4-branch/lib/libRblas.dylib
LAPACK: /Users/ma38727/bin/R-4-4-branch/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] BiocFileCache_2.13.0 dbplyr_2.5.0

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5      httr_1.4.7       cli_3.6.2        rlang_1.1.3
 [5] DBI_1.2.2        purrr_1.0.2      generics_0.1.3   glue_1.7.0
 [9] bit_4.0.5        fansi_1.0.6      tibble_3.2.1     filelock_1.0.3
[13] fastmap_1.1.1    lifecycle_1.0.4  memoise_2.0.1    compiler_4.4.0
[17] dplyr_1.1.4      RSQLite_2.3.6    blob_1.2.4       pkgconfig_2.0.3
[21] R6_2.5.1         tidyselect_1.2.1 utf8_1.2.4       pillar_1.9.0
[25] curl_5.2.1       magrittr_2.0.3   withr_3.0.0      tools_4.4.0
[29] bit64_4.0.5      cachem_1.0.8
>

Without being able to reproduce the error, I can only guess that the following is a minimal reproducible example

url = "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
path = tempfile()
handle = curl::new_handle()
curl::curl_fetch_disk(url, path, handle)
lcolladotor commented 6 months ago

Hi Martin,

curl::curl_fetch_disk() works

Thanks for the smaller code. I ran it and did not run into any problems with it as shown below.

``` r url = "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1" path = tempfile() file.exists(path) #> [1] FALSE ``` ``` r handle = curl::new_handle() curl::curl_fetch_disk(url, path, handle) #> $url #> [1] "https://uc424f538e4d3a0a928bce0b0be0.dl.dropboxusercontent.com/cd/0/get/CTQweKwAWe7_Zj0HLLX5ityLTpGVd21mZJtm2ujtw35z37trA56VbhEuXrXHqoDPZX_1qo_UXAewcdmvDjAzcFtcKuH0sYPuuNZ-lmc-k7el7XU1cQxUEu9Fw7pCw5uJxh2gyiDuwH_PUZilNXHaq00z/file?dl=1" #> #> $status_code #> [1] 200 #> #> $type #> [1] "application/binary" #> #> $headers #> [1] 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65 72 6d 61 #> [25] 6e 65 6e 74 6c 79 0d 0a 6c 6f 63 61 74 69 6f 6e 3a 20 68 74 74 70 73 3a #> [49] 2f 2f 77 77 77 2e 64 72 6f 70 62 6f 78 2e 63 6f 6d 2f 73 2f 73 72 6b 62 #> [73] 32 69 66 65 37 35 70 78 32 79 7a 2f 6d 6f 64 65 6c 69 6e 67 5f 72 65 73 #> [97] 75 6c 74 73 5f 42 61 79 65 73 53 70 61 63 65 5f 6b 30 39 2e 52 64 61 74 #> [121] 61 3f 64 6c 3d 31 0d 0a 64 61 74 65 3a 20 4d 6f 6e 2c 20 32 30 20 4d 61 #> [145] 79 20 32 30 32 34 20 31 35 3a 35 37 3a 34 36 20 47 4d 54 0d 0a 73 65 72 #> [169] 76 65 72 3a 20 65 6e 76 6f 79 0d 0a 78 2d 64 72 6f 70 62 6f 78 2d 72 65 #> [193] 71 75 65 73 74 2d 69 64 3a 20 32 31 39 63 63 35 30 63 65 66 31 66 34 36 #> [217] 32 37 39 33 61 61 64 30 36 61 61 63 65 32 65 39 32 34 0d 0a 63 6f 6e 74 #> [241] 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 30 0d 0a 0d 0a 48 54 54 50 2f 32 20 #> [265] 33 30 32 20 0d 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 74 65 78 74 #> [289] 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 6c 6f #> [313] 63 61 74 69 6f 6e 3a 20 2f 73 2f 64 6c 2f 73 72 6b 62 32 69 66 65 37 35 #> [337] 70 78 32 79 7a 2f 6d 6f 64 65 6c 69 6e 67 5f 72 65 73 75 6c 74 73 5f 42 #> [361] 61 79 65 73 53 70 61 63 65 5f 6b 30 39 2e 52 64 61 74 61 0d 0a 70 72 61 #> [385] 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 72 65 66 65 72 72 65 72 2d #> [409] 70 6f 6c 69 63 79 3a 20 73 74 72 69 63 74 2d 6f 72 69 67 69 6e 2d 77 68 #> [433] 65 6e 2d 63 72 6f 73 73 2d 6f 72 69 67 69 6e 0d 0a 73 65 74 2d 63 6f 6f #> [457] 6b 69 65 3a 20 67 76 63 3d 4d 54 63 32 4e 7a 51 31 4d 7a 41 30 4d 44 55 #> [481] 33 4f 44 51 33 4d 7a 6b 7a 4d 7a 55 78 4e 7a 67 77 4f 54 49 78 4e 54 63 #> [505] 32 4d 7a 59 32 4d 6a 55 32 4d 6a 45 78 3b 20 50 61 74 68 3d 2f 3b 20 45 #> [529] 78 70 69 72 65 73 3d 53 61 74 2c 20 31 39 20 4d 61 79 20 32 30 32 39 20 #> [553] 31 35 3a 35 37 3a 34 37 20 47 4d 54 3b 20 48 74 74 70 4f 6e 6c 79 3b 20 #> [577] 53 65 63 75 72 65 3b 20 53 61 6d 65 53 69 74 65 3d 4e 6f 6e 65 0d 0a 73 #> [601] 65 74 2d 63 6f 6f 6b 69 65 3a 20 74 3d 6d 46 4a 73 4f 37 6d 30 6a 5a 6e #> [625] 54 75 67 65 54 64 71 33 4c 66 4f 4d 63 3b 20 50 61 74 68 3d 2f 3b 20 44 #> [649] 6f 6d 61 69 6e 3d 64 72 6f 70 62 6f 78 2e 63 6f 6d 3b 20 45 78 70 69 72 #> [673] 65 73 3d 54 75 65 2c 20 32 30 20 4d 61 79 20 32 30 32 35 20 31 35 3a 35 #> [697] 37 3a 34 37 20 47 4d 54 3b 20 48 74 74 70 4f 6e 6c 79 3b 20 53 65 63 75 #> [721] 72 65 3b 20 53 61 6d 65 53 69 74 65 3d 4e 6f 6e 65 0d 0a 73 65 74 2d 63 #> [745] 6f 6f 6b 69 65 3a 20 5f 5f 48 6f 73 74 2d 6a 73 5f 63 73 72 66 3d 6d 46 #> [769] 4a 73 4f 37 6d 30 6a 5a 6e 54 75 67 65 54 64 71 33 4c 66 4f 4d 63 3b 20 #> [793] 50 61 74 68 3d 2f 3b 20 45 78 70 69 72 65 73 3d 54 75 65 2c 20 32 30 20 #> [817] 4d 61 79 20 32 30 32 35 20 31 35 3a 35 37 3a 34 37 20 47 4d 54 3b 20 53 #> [841] 65 63 75 72 65 3b 20 53 61 6d 65 53 69 74 65 3d 4e 6f 6e 65 0d 0a 73 65 #> [865] 74 2d 63 6f 6f 6b 69 65 3a 20 5f 5f 48 6f 73 74 2d 73 73 3d 69 31 73 4f #> [889] 6f 51 35 74 4e 6f 3b 20 50 61 74 68 3d 2f 3b 20 45 78 70 69 72 65 73 3d #> [913] 54 75 65 2c 20 32 30 20 4d 61 79 20 32 30 32 35 20 31 35 3a 35 37 3a 34 #> [937] 37 20 47 4d 54 3b 20 48 74 74 70 4f 6e 6c 79 3b 20 53 65 63 75 72 65 3b #> [961] 20 53 61 6d 65 53 69 74 65 3d 53 74 72 69 63 74 0d 0a 73 65 74 2d 63 6f #> [985] 6f 6b 69 65 3a 20 6c 6f 63 61 6c 65 3d 65 6e 3b 20 50 61 74 68 3d 2f 3b #> [1009] 20 44 6f 6d 61 69 6e 3d 64 72 6f 70 62 6f 78 2e 63 6f 6d 3b 20 45 78 70 #> [1033] 69 72 65 73 3d 53 61 74 2c 20 31 39 20 4d 61 79 20 32 30 32 39 20 31 35 #> [1057] 3a 35 37 3a 34 37 20 47 4d 54 0d 0a 78 2d 63 6f 6e 74 65 6e 74 2d 74 79 #> [1081] 70 65 2d 6f 70 74 69 6f 6e 73 3a 20 6e 6f 73 6e 69 66 66 0d 0a 78 2d 70 #> [1105] 65 72 6d 69 74 74 65 64 2d 63 72 6f 73 73 2d 64 6f 6d 61 69 6e 2d 70 6f #> [1129] 6c 69 63 69 65 73 3a 20 6e 6f 6e 65 0d 0a 78 2d 72 6f 62 6f 74 73 2d 74 #> [1153] 61 67 3a 20 6e 6f 69 6e 64 65 78 2c 20 6e 6f 66 6f 6c 6c 6f 77 2c 20 6e #> [1177] 6f 69 6d 61 67 65 69 6e 64 65 78 0d 0a 78 2d 78 73 73 2d 70 72 6f 74 65 #> [1201] 63 74 69 6f 6e 3a 20 31 3b 20 6d 6f 64 65 3d 62 6c 6f 63 6b 0d 0a 64 61 #> [1225] 74 65 3a 20 4d 6f 6e 2c 20 32 30 20 4d 61 79 20 32 30 32 34 20 31 35 3a #> [1249] 35 37 3a 34 37 20 47 4d 54 0d 0a 73 74 72 69 63 74 2d 74 72 61 6e 73 70 #> [1273] 6f 72 74 2d 73 65 63 75 72 69 74 79 3a 20 6d 61 78 2d 61 67 65 3d 33 31 #> [1297] 35 33 36 30 30 30 3b 20 69 6e 63 6c 75 64 65 53 75 62 44 6f 6d 61 69 6e #> [1321] 73 0d 0a 73 65 72 76 65 72 3a 20 65 6e 76 6f 79 0d 0a 63 61 63 68 65 2d #> [1345] 63 6f 6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 2c 20 6e 6f 2d 73 74 #> [1369] 6f 72 65 0d 0a 63 6f 6e 74 65 6e 74 2d 65 6e 63 6f 64 69 6e 67 3a 20 67 #> [1393] 7a 69 70 0d 0a 76 61 72 79 3a 20 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 #> [1417] 6e 67 0d 0a 78 2d 64 72 6f 70 62 6f 78 2d 72 65 73 70 6f 6e 73 65 2d 6f #> [1441] 72 69 67 69 6e 3a 20 66 61 72 5f 72 65 6d 6f 74 65 0d 0a 78 2d 64 72 6f #> [1465] 70 62 6f 78 2d 72 65 71 75 65 73 74 2d 69 64 3a 20 30 33 32 35 65 35 33 #> [1489] 34 64 63 37 63 34 64 35 39 62 39 34 33 66 36 37 36 30 62 33 30 37 61 65 #> [1513] 34 0d 0a 0d 0a 48 54 54 50 2f 32 20 33 30 32 20 0d 0a 63 6f 6e 74 65 6e #> [1537] 74 2d 74 79 70 65 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 #> [1561] 65 74 3d 75 74 66 2d 38 0d 0a 63 6f 6e 74 65 6e 74 2d 73 65 63 75 72 69 #> [1585] 74 79 2d 70 6f 6c 69 63 79 3a 20 73 61 6e 64 62 6f 78 0d 0a 6c 6f 63 61 #> [1609] 74 69 6f 6e 3a 20 68 74 74 70 73 3a 2f 2f 75 63 34 32 34 66 35 33 38 65 #> [1633] 34 64 33 61 30 61 39 32 38 62 63 65 30 62 30 62 65 30 2e 64 6c 2e 64 72 #> [1657] 6f 70 62 6f 78 75 73 65 72 63 6f 6e 74 65 6e 74 2e 63 6f 6d 2f 63 64 2f #> [1681] 30 2f 67 65 74 2f 43 54 51 77 65 4b 77 41 57 65 37 5f 5a 6a 30 48 4c 4c #> [1705] 58 35 69 74 79 4c 54 70 47 56 64 32 31 6d 5a 4a 74 6d 32 75 6a 74 77 33 #> [1729] 35 7a 33 37 74 72 41 35 36 56 62 68 45 75 58 72 58 48 71 6f 44 50 5a 58 #> [1753] 5f 31 71 6f 5f 55 58 41 65 77 63 64 6d 76 44 6a 41 7a 63 46 74 63 4b 75 #> [1777] 48 30 73 59 50 75 75 4e 5a 2d 6c 6d 63 2d 6b 37 65 6c 37 58 55 31 63 51 #> [1801] 78 55 45 75 39 46 77 37 70 43 77 35 75 4a 78 68 32 67 79 69 44 75 77 48 #> [1825] 5f 50 55 5a 69 6c 4e 58 48 61 71 30 30 7a 2f 66 69 6c 65 3f 64 6c 3d 31 #> [1849] 23 0d 0a 72 65 66 65 72 72 65 72 2d 70 6f 6c 69 63 79 3a 20 73 74 72 69 #> [1873] 63 74 2d 6f 72 69 67 69 6e 2d 77 68 65 6e 2d 63 72 6f 73 73 2d 6f 72 69 #> [1897] 67 69 6e 0d 0a 73 65 74 2d 63 6f 6f 6b 69 65 3a 20 20 5f 5f 48 6f 73 74 #> [1921] 2d 6c 6f 67 67 65 64 2d 6f 75 74 2d 73 65 73 73 69 6f 6e 3d 43 68 44 31 #> [1945] 6b 71 66 59 52 35 76 72 4a 2b 5a 44 69 25 32 46 34 31 55 6a 72 43 45 50 #> [1969] 76 6c 72 62 49 47 47 69 35 42 53 6a 4e 48 61 45 4a 59 64 45 77 34 54 6c #> [1993] 68 43 64 56 4e 77 65 55 46 33 59 6d 64 71 59 56 70 55 64 32 73 33 4e 6e #> [2017] 52 6b 5a 57 5a 5a 59 56 39 4c 54 31 52 76 58 30 70 4c 4e 55 4a 52 3b 20 #> [2041] 48 74 74 70 4f 6e 6c 79 3b 20 50 61 74 68 3d 2f 3b 20 53 61 6d 65 53 69 #> [2065] 74 65 3d 4e 6f 6e 65 3b 20 53 65 63 75 72 65 0d 0a 78 2d 63 6f 6e 74 65 #> [2089] 6e 74 2d 74 79 70 65 2d 6f 70 74 69 6f 6e 73 3a 20 6e 6f 73 6e 69 66 66 #> [2113] 0d 0a 78 2d 66 72 61 6d 65 2d 6f 70 74 69 6f 6e 73 3a 20 44 45 4e 59 0d #> [2137] 0a 78 2d 70 65 72 6d 69 74 74 65 64 2d 63 72 6f 73 73 2d 64 6f 6d 61 69 #> [2161] 6e 2d 70 6f 6c 69 63 69 65 73 3a 20 6e 6f 6e 65 0d 0a 78 2d 78 73 73 2d #> [2185] 70 72 6f 74 65 63 74 69 6f 6e 3a 20 31 3b 20 6d 6f 64 65 3d 62 6c 6f 63 #> [2209] 6b 0d 0a 64 61 74 65 3a 20 4d 6f 6e 2c 20 32 30 20 4d 61 79 20 32 30 32 #> [2233] 34 20 31 35 3a 35 37 3a 34 37 20 47 4d 54 0d 0a 73 65 72 76 65 72 3a 20 #> [2257] 65 6e 76 6f 79 0d 0a 73 74 72 69 63 74 2d 74 72 61 6e 73 70 6f 72 74 2d #> [2281] 73 65 63 75 72 69 74 79 3a 20 6d 61 78 2d 61 67 65 3d 33 31 35 33 36 30 #> [2305] 30 30 3b 20 69 6e 63 6c 75 64 65 53 75 62 44 6f 6d 61 69 6e 73 0d 0a 73 #> [2329] 74 72 69 63 74 2d 74 72 61 6e 73 70 6f 72 74 2d 73 65 63 75 72 69 74 79 #> [2353] 3a 20 6d 61 78 2d 61 67 65 3d 33 31 35 33 36 30 30 30 3b 20 69 6e 63 6c #> [2377] 75 64 65 53 75 62 44 6f 6d 61 69 6e 73 0d 0a 63 61 63 68 65 2d 63 6f 6e #> [2401] 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 2c 20 6e 6f 2d 73 74 6f 72 65 #> [2425] 0d 0a 63 6f 6e 74 65 6e 74 2d 65 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 #> [2449] 0d 0a 76 61 72 79 3a 20 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 0d #> [2473] 0a 78 2d 64 72 6f 70 62 6f 78 2d 72 65 73 70 6f 6e 73 65 2d 6f 72 69 67 #> [2497] 69 6e 3a 20 66 61 72 5f 72 65 6d 6f 74 65 0d 0a 78 2d 64 72 6f 70 62 6f #> [2521] 78 2d 72 65 71 75 65 73 74 2d 69 64 3a 20 31 37 63 34 32 61 33 61 31 63 #> [2545] 39 31 34 64 30 64 38 64 66 38 31 38 33 31 30 36 65 36 34 65 65 38 0d 0a #> [2569] 0d 0a 48 54 54 50 2f 32 20 32 30 30 20 0d 0a 63 6f 6e 74 65 6e 74 2d 74 #> [2593] 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 62 69 6e 61 72 79 0d #> [2617] 0a 61 63 63 65 70 74 2d 72 61 6e 67 65 73 3a 20 62 79 74 65 73 0d 0a 63 #> [2641] 61 63 68 65 2d 63 6f 6e 74 72 6f 6c 3a 20 6d 61 78 2d 61 67 65 3d 36 30 #> [2665] 0d 0a 63 6f 6e 74 65 6e 74 2d 64 69 73 70 6f 73 69 74 69 6f 6e 3a 20 61 #> [2689] 74 74 61 63 68 6d 65 6e 74 3b 20 66 69 6c 65 6e 61 6d 65 3d 22 6d 6f 64 #> [2713] 65 6c 69 6e 67 5f 72 65 73 75 6c 74 73 5f 42 61 79 65 73 53 70 61 63 65 #> [2737] 5f 6b 30 39 2e 52 64 61 74 61 22 3b 20 66 69 6c 65 6e 61 6d 65 2a 3d 55 #> [2761] 54 46 2d 38 27 27 6d 6f 64 65 6c 69 6e 67 5f 72 65 73 75 6c 74 73 5f 42 #> [2785] 61 79 65 73 53 70 61 63 65 5f 6b 30 39 2e 52 64 61 74 61 0d 0a 63 6f 6e #> [2809] 74 65 6e 74 2d 73 65 63 75 72 69 74 79 2d 70 6f 6c 69 63 79 3a 20 73 61 #> [2833] 6e 64 62 6f 78 0d 0a 65 74 61 67 3a 20 31 36 39 34 31 30 38 30 39 33 39 #> [2857] 34 33 30 35 35 64 0d 0a 70 72 61 67 6d 61 3a 20 70 75 62 6c 69 63 0d 0a #> [2881] 72 65 66 65 72 72 65 72 2d 70 6f 6c 69 63 79 3a 20 6e 6f 2d 72 65 66 65 #> [2905] 72 72 65 72 0d 0a 76 61 72 79 3a 20 4f 72 69 67 69 6e 0d 0a 78 2d 63 6f #> [2929] 6e 74 65 6e 74 2d 73 65 63 75 72 69 74 79 2d 70 6f 6c 69 63 79 3a 20 73 #> [2953] 61 6e 64 62 6f 78 0d 0a 78 2d 63 6f 6e 74 65 6e 74 2d 74 79 70 65 2d 6f #> [2977] 70 74 69 6f 6e 73 3a 20 6e 6f 73 6e 69 66 66 0d 0a 78 2d 72 6f 62 6f 74 #> [3001] 73 2d 74 61 67 3a 20 6e 6f 69 6e 64 65 78 2c 20 6e 6f 66 6f 6c 6c 6f 77 #> [3025] 2c 20 6e 6f 69 6d 61 67 65 69 6e 64 65 78 0d 0a 78 2d 73 65 72 76 65 72 #> [3049] 2d 72 65 73 70 6f 6e 73 65 2d 74 69 6d 65 3a 20 33 36 38 0d 0a 78 2d 77 #> [3073] 65 62 6b 69 74 2d 63 73 70 3a 20 73 61 6e 64 62 6f 78 0d 0a 64 61 74 65 #> [3097] 3a 20 4d 6f 6e 2c 20 32 30 20 4d 61 79 20 32 30 32 34 20 31 35 3a 35 37 #> [3121] 3a 34 37 20 47 4d 54 0d 0a 73 65 72 76 65 72 3a 20 65 6e 76 6f 79 0d 0a #> [3145] 73 74 72 69 63 74 2d 74 72 61 6e 73 70 6f 72 74 2d 73 65 63 75 72 69 74 #> [3169] 79 3a 20 6d 61 78 2d 61 67 65 3d 33 31 35 33 36 30 30 30 3b 20 69 6e 63 #> [3193] 6c 75 64 65 53 75 62 44 6f 6d 61 69 6e 73 3b 20 70 72 65 6c 6f 61 64 0d #> [3217] 0a 63 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 31 32 32 37 31 34 30 #> [3241] 36 0d 0a 78 2d 64 72 6f 70 62 6f 78 2d 72 65 73 70 6f 6e 73 65 2d 6f 72 #> [3265] 69 67 69 6e 3a 20 66 61 72 5f 72 65 6d 6f 74 65 0d 0a 78 2d 64 72 6f 70 #> [3289] 62 6f 78 2d 72 65 71 75 65 73 74 2d 69 64 3a 20 64 64 33 66 31 36 39 36 #> [3313] 64 31 61 62 34 32 37 66 62 61 34 31 64 35 39 61 30 35 39 64 33 32 62 37 #> [3337] 0d 0a 0d 0a #> #> $modified #> [1] NA #> #> $times #> redirect namelookup connect pretransfer starttransfer #> 0.611155 0.089587 0.127949 0.181376 1.132570 #> total #> 1.705798 #> #> $content #> [1] "/var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T//RtmpHmyrb1/filef94f68339d73" ``` ``` r load(path, verbose = TRUE) #> Loading objects: #> modeling_results ``` ``` r options(width = 120) sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────── #> setting value #> version R version 4.4.0 (2024-04-24) #> os macOS Sonoma 14.5 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2024-05-20 #> pandoc 3.1.12.1 @ /opt/homebrew/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> cli 3.6.2 2023-12-11 [1] CRAN (R 4.4.0) #> curl 5.2.1 2024-03-01 [1] CRAN (R 4.4.0) #> digest 0.6.35 2024-03-11 [1] CRAN (R 4.4.0) #> evaluate 0.23 2023-11-01 [1] CRAN (R 4.4.0) #> fastmap 1.2.0 2024-05-15 [1] CRAN (R 4.4.0) #> fs 1.6.4 2024-04-25 [1] CRAN (R 4.4.0) #> glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0) #> htmltools 0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0) #> knitr 1.46 2024-04-06 [1] CRAN (R 4.4.0) #> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.4.0) #> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.4.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.4.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.4.0) #> R.oo 1.26.0 2024-01-24 [1] CRAN (R 4.4.0) #> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.4.0) #> reprex 2.1.0 2024-01-11 [1] CRAN (R 4.4.0) #> rlang 1.1.3 2024-01-10 [1] CRAN (R 4.4.0) #> rmarkdown 2.27 2024-05-17 [1] CRAN (R 4.4.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.4.0) #> styler 1.10.3 2024-04-07 [1] CRAN (R 4.4.0) #> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0) #> withr 3.0.0 2024-01-16 [1] CRAN (R 4.4.0) #> xfun 0.44 2024-05-15 [1] CRAN (R 4.4.0) #> yaml 2.3.8 2023-12-11 [1] CRAN (R 4.4.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library #> #> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ``` ``` r curl::curl_version() #> $version #> [1] "8.6.0" #> #> $ssl_version #> [1] "(SecureTransport) LibreSSL/3.3.6" #> #> $libz_version #> [1] "1.2.12" #> #> $libssh_version #> [1] NA #> #> $libidn_version #> [1] NA #> #> $host #> [1] "x86_64-apple-darwin23.0" #> #> $protocols #> [1] "dict" "file" "ftp" "ftps" "gopher" "gophers" "http" "https" "imap" "imaps" "ldap" #> [12] "ldaps" "mqtt" "pop3" "pop3s" "rtsp" "smb" "smbs" "smtp" "smtps" "telnet" "tftp" #> #> $ipv6 #> [1] TRUE #> #> $http2 #> [1] TRUE #> #> $idn #> [1] FALSE ``` Created on 2024-05-20 with [reprex v2.1.0](https://reprex.tidyverse.org)

options(error = recover) output

Based on httr::GET() andcurl::curl_download() working too, I'm wondering if some info BiocFileCache expects is absent from curl with the versions I have installed.

Here's also some output with options(error=recover). My understanding is that it runs well until https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/BiocFileCache-class.R#L585 as the rmdx object does have a length > 0.

> options(error=recover)
> library("BiocFileCache")
Loading required package: dbplyr
> bfc <- BiocFileCache::BiocFileCache()
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  |======================================================================| 100%

Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") :
  not all 'rnames' found or unique.
In addition: Warning message:
In value[[3L]](cond) :
trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error:
  HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: 1
Called from: top level
Browse[1]> ls()
[1] "exact"  "rids"   "rnames" "x"
Browse[1]> ls.str()
exact :  logi TRUE
rids : <missing>
rnames :  chr "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
x : Formal class 'BiocFileCache' [package "BiocFileCache"] with 1 slot
Browse[1]> x
class: BiocFileCache
bfccache: /Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache
bfccount: 0
For more information see: bfcinfo() or bfcquery()
Browse[1]> c

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: 2
Called from: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Browse[1]> ls.str()
add_or_return_rname : function (x, rname, ..., exact)
exact :  logi TRUE
rids :  chr(0)
rids0 :  Named chr NA
rmdx :  chr "BFC11"
rnames :  chr "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
update_time_and_path : function (x, i)
x : Formal class 'BiocFileCache' [package "BiocFileCache"] with 1 slot
Browse[1]> bfcrid(x)
character(0)
Browse[1]> rids
character(0)
Browse[1]> rids0
http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1
                                                                                 NA
Browse[1]> rmdx
[1] "BFC11"
Browse[1]> setdiff(bfcrid(x), rids)
character(0)
Browse[1]> bfcrpath(x, rids = rids0)
Error during wrapup: all(rids %in% bfcrid(x)) is not TRUE
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Browse[1]> traceback()
No traceback available
Browse[1]> c

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: 2
Called from: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Browse[1]> n

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: s
Enter an item from the menu, or 0 to exit
Selection: 2
Browse[1]> s

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection:

Manual traceback() output

Here's also the manual traceback() output since it seems like reprex::reprex() didn't capture it:

> library("BiocFileCache")
Loading required package: dbplyr
bfc <- BiocFileCache::BiocFileCache()
BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
> bfc <- BiocFileCache::BiocFileCache()
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  |======================================================================| 100%

Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") :
  not all 'rnames' found or unique.
In addition: Warning message:
In value[[3L]](cond) :
trying to add rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' produced error:
  HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
> traceback()
3: stop("not all 'rnames' found or unique.")
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")

From there, I see that https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/BiocFileCache-class.R#L586 is being the error triggered.

Best, Leo

lcolladotor commented 6 months ago

Hi again,

Browse[1]>

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection:
Enter an item from the menu, or 0 to exit
Selection: 1
Browse[1]> ls()
[1] "exact"  "rids"   "rnames" "x"
Browse[1]> ls.str()
exact :  logi TRUE
rids : <missing>
rnames :  chr "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
x : Formal class 'BiocFileCache' [package "BiocFileCache"] with 1 slot
Browse[1]> bfcrid(x)
character(0)
Browse[1]> rname <- rnames[1]
Browse[1]> res <- bfcrid(bfcquery(x, rname, field="rname", exact = exact))
Browse[1]> res
character(0)
Browse[1]> id <- "add_or_return_rname"
Browse[1]>             locfile_path <- file.path(bfccache(x), id)
Browse[1]>  locfile <- .lock2(locfile_path, exclusive = TRUE)
Browse[1]> res <- bfcrid(bfcquery(x, rname, field="rname", exact = exact))
Browse[1]> length(res)
[1] 0
Browse[1]> bfcadd(x, rname)
  |======================================================================| 100%

Error during wrapup: HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

Using the options(error=recover) mode, I went to the first option in the browser mode and ran code manually till getting to https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/BiocFileCache-class.R#L550C27-L550C42.

Then I got a new smaller reproducible example with its traceback() output:

library("BiocFileCache")
bfc <- BiocFileCache::BiocFileCache()
bfcadd(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
> library("BiocFileCache")
Loading required package: dbplyr
> bfc <- BiocFileCache::BiocFileCache()
> bfcadd(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
  |======================================================================| 100%

Error in curl::curl_fetch_memory(url, handle = handle) :
  HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
> traceback()
11: curl::curl_fetch_memory(url, handle = handle)
10: request_fetch.write_memory(req$output, req$url, handle)
9: request_fetch(req$output, req$url, handle)
8: request_perform(req, hu$handle$handle)
7: HEAD(link)
6: withCallingHandlers({
       HEAD(link)
   }, warning = function(w) {
       invokeRestart("muffleWarning")
   })
5: .httr_get_cache_info(fpath)
4: .util_set_cache_info(bfc, rid[ok])
3: .util_download(x, rid[i], proxy, config, "bfcadd()", ...)
2: bfcadd(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
1: bfcadd(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")

Navigating that output, I got to https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/httr.R#L5, which leads to an even shorter reproducible example.

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Error in curl::curl_fetch_memory(url, handle = handle) :
  HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
> traceback()
5: curl::curl_fetch_memory(url, handle = handle)
4: request_fetch.write_memory(req$output, req$url, handle)
3: request_fetch(req$output, req$url, handle)
2: request_perform(req, hu$handle$handle)
1: httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")

The above code does run well in a different setup (the HPC environment I have access to at work):

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Response [https://uc3bfce8a204fbffc8c2c4a98fd9.dl.dropboxusercontent.com/cd/0/get/CTS2_3XITELM2KSAE_Qh46834uS63kMAoVskY_o_fWc5A2wgbjgfrpunSESznpLbLN0oSZbM1nsZcn87VMggDvQPxPnYCcXQV0RDOXFSabRrooQrtABqtcSckf9flESrxDHzDvajnP4CAILi4MOxNzoM/file?dl=1]
  Date: 2024-05-20 16:36
  Status: 200
  Content-Type: application/json
<EMPTY BODY>
> options(width = 120)
sessioninfo::session_info()
curl::curl_version()
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.2 Patched (2024-02-08 r85876)
 os       Rocky Linux 9.2 (Blue Onyx)
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       US/Eastern
 date     2024-05-20
 pandoc   3.1.3 @ /jhpce/shared/community/core/conda_R/4.3.x/bin/pandoc

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date (UTC) lib source
 cli           3.6.2   2023-12-11 [2] CRAN (R 4.3.2)
 colorout    * 1.3-0.1 2023-11-29 [1] Github (jalvesaq/colorout@deda341)
 colorspace    2.1-0   2023-01-23 [2] CRAN (R 4.3.2)
 curl          5.2.0   2023-12-08 [2] CRAN (R 4.3.2)
 digest        0.6.34  2024-01-11 [2] CRAN (R 4.3.2)
 dplyr         1.1.4   2023-11-17 [1] CRAN (R 4.3.2)
 fansi         1.0.6   2023-12-08 [2] CRAN (R 4.3.2)
 fastmap       1.1.1   2023-02-24 [2] CRAN (R 4.3.2)
 generics      0.1.3   2022-07-05 [2] CRAN (R 4.3.2)
 ggplot2       3.4.4   2023-10-12 [2] CRAN (R 4.3.2)
 glue          1.7.0   2024-01-09 [2] CRAN (R 4.3.2)
 gtable        0.3.4   2023-08-21 [2] CRAN (R 4.3.2)
 htmltools     0.5.7   2023-11-03 [2] CRAN (R 4.3.2)
 htmlwidgets   1.6.4   2023-12-06 [2] CRAN (R 4.3.2)
 httpuv        1.6.14  2024-01-26 [2] CRAN (R 4.3.2)
 httr          1.4.7   2023-08-15 [2] CRAN (R 4.3.2)
 jsonlite      1.8.8   2023-12-04 [2] CRAN (R 4.3.2)
 later         1.3.2   2023-12-06 [2] CRAN (R 4.3.2)
 lattice       0.22-5  2023-10-24 [3] CRAN (R 4.3.2)
 lifecycle     1.0.4   2023-11-07 [2] CRAN (R 4.3.2)
 magrittr      2.0.3   2022-03-30 [2] CRAN (R 4.3.2)
 munsell       0.5.0   2018-06-12 [2] CRAN (R 4.3.2)
 pillar        1.9.0   2023-03-22 [2] CRAN (R 4.3.2)
 pkgconfig     2.0.3   2019-09-22 [2] CRAN (R 4.3.2)
 png           0.1-8   2022-11-29 [2] CRAN (R 4.3.2)
 promises      1.2.1   2023-08-10 [2] CRAN (R 4.3.2)
 R6            2.5.1   2021-08-19 [2] CRAN (R 4.3.2)
 Rcpp          1.0.12  2024-01-09 [2] CRAN (R 4.3.2)
 rlang         1.1.3   2024-01-10 [2] CRAN (R 4.3.2)
 rmote         0.3.4   2023-11-29 [1] Github (cloudyr/rmote@fbce611)
 scales        1.3.0   2023-11-28 [2] CRAN (R 4.3.2)
 servr         0.27    2023-05-02 [1] CRAN (R 4.3.2)
 sessioninfo   1.2.2   2021-12-06 [2] CRAN (R 4.3.2)
 tibble        3.2.1   2023-03-20 [2] CRAN (R 4.3.2)
 tidyselect    1.2.0   2022-10-10 [2] CRAN (R 4.3.2)
 utf8          1.2.4   2023-10-22 [2] CRAN (R 4.3.2)
 vctrs         0.6.5   2023-12-01 [2] CRAN (R 4.3.2)
 xfun          0.42    2024-02-08 [2] CRAN (R 4.3.2)

 [1] /users/lcollado/R/4.3.x
 [2] /jhpce/shared/community/core/conda_R/4.3.x/R/lib64/R/site-library
 [3] /jhpce/shared/community/core/conda_R/4.3.x/R/lib64/R/library

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$version
[1] "8.1.2"

$ssl_version
[1] "OpenSSL/3.1.5"

$libz_version
[1] "1.2.13"

$libssh_version
[1] "libssh2/1.11.0"

$libidn_version
[1] NA

$host
[1] "x86_64-conda-linux-gnu"

$protocols
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"    "https"   "imap"    "imaps"   "mqtt"
[12] "pop3"    "pop3s"   "rtsp"    "scp"     "sftp"    "smb"     "smbs"    "smtp"    "smtps"   "telnet"  "tftp"

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] FALSE

>

Best, Leo

lcolladotor commented 6 months ago

In case it's useful, here's more verbose output from httr::HEAD(). I was trying to see if the suggestion from https://github.com/jeroen/curl/issues/232#issuecomment-1231686216 would work, but it doesn't.

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = httr::config(http_version=2, forbid_reuse=TRUE))
Error in curl::curl_fetch_memory(url, handle = handle) :
  chunk hex-length char not a hex digit: 0x1f
> traceback()
5: curl::curl_fetch_memory(url, handle = handle)
4: request_fetch.write_memory(req$output, req$url, handle)
3: request_fetch(req$output, req$url, handle)
2: request_perform(req, hu$handle$handle)
1: httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1",
       config = httr::config(http_version = 2, forbid_reuse = TRUE))

On the HPC system I can use, it does work:

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = httr::config(http_version=2, forbid_reuse=TRUE))
Response [https://ucd3a9ce967aa423ff53dfce3fab.dl.dropboxusercontent.com/cd/0/get/CTS8sMMFV9VT4s6vrKigycGYF3rx1eoNDFVVI0iedt5v_3qfKqK3soJqepGGiFj-LZISyaz1ibERXe1G-7buAwp_vEw1ajt5ItQLKdZSFfvbH1LHMMCewwj3MkVRTs0Sifc-RNibpc7P0Tc34lroo9dS/file?dl=1]
  Date: 2024-05-20 17:23
  Status: 200
  Content-Type: application/json
<EMPTY BODY>

Verbose output on macOS Sonoma 14.5

```R > httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = httr::config(verbose = TRUE)) * Host www.dropbox.com:80 was resolved. * IPv6: (none) * IPv4: 162.125.6.18 * Trying 162.125.6.18:80... * Connected to www.dropbox.com (162.125.6.18) port 80 > HEAD /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 HTTP/1.1 Host: www.dropbox.com User-Agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7 Accept-Encoding: deflate, gzip Accept: application/json, text/xml, application/xml, */* < HTTP/1.1 301 Moved Permanently < location: https://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 < date: Mon, 20 May 2024 17:20:45 GMT < server: envoy < x-dropbox-request-id: 4e933461b9604a128f0890d4684e589a < transfer-encoding: chunked < * Ignoring the response-body * Connection #0 to host www.dropbox.com left intact * Clear auth, redirects to port from 80 to 443 * Issue another request to this URL: 'https://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' * NTLM-proxy picked AND auth done set, clear picked * Host www.dropbox.com:443 was resolved. * IPv6: (none) * IPv4: 162.125.6.18 * Trying 162.125.6.18:443... * Connected to www.dropbox.com (162.125.6.18) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc; CN=*.dropbox.com * start date: Oct 31 00:00:00 2023 GMT * expire date: Nov 30 23:59:59 2024 GMT * subjectAltName: host "www.dropbox.com" matched cert's "*.dropbox.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 * [HTTP/2] [1] [:method: HEAD] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: www.dropbox.com] * [HTTP/2] [1] [:path: /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1] * [HTTP/2] [1] [user-agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7] * [HTTP/2] [1] [accept-encoding: deflate, gzip] * [HTTP/2] [1] [accept: application/json, text/xml, application/xml, */*] > HEAD /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 HTTP/2 Host: www.dropbox.com User-Agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7 Accept-Encoding: deflate, gzip Accept: application/json, text/xml, application/xml, */* < HTTP/2 302 < content-type: text/html; charset=utf-8 < location: /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata < pragma: no-cache < referrer-policy: strict-origin-when-cross-origin * Added cookie gvc="NjcwODUyMDAxNzE4NjI3OTMxNDM5NDAyMDM0MjIwNzc5OTA2OTI=" for domain www.dropbox.com, path /, expire 1873905645 < set-cookie: gvc=NjcwODUyMDAxNzE4NjI3OTMxNDM5NDAyMDM0MjIwNzc5OTA2OTI=; Path=/; Expires=Sat, 19 May 2029 17:20:45 GMT; HttpOnly; Secure; SameSite=None * Added cookie t="jVZTCup0q55WoSv5P2bR0eEm" for domain dropbox.com, path /, expire 1747761645 < set-cookie: t=jVZTCup0q55WoSv5P2bR0eEm; Path=/; Domain=dropbox.com; Expires=Tue, 20 May 2025 17:20:45 GMT; HttpOnly; Secure; SameSite=None * Added cookie __Host-js_csrf="jVZTCup0q55WoSv5P2bR0eEm" for domain www.dropbox.com, path /, expire 1747761645 < set-cookie: __Host-js_csrf=jVZTCup0q55WoSv5P2bR0eEm; Path=/; Expires=Tue, 20 May 2025 17:20:45 GMT; Secure; SameSite=None * Added cookie __Host-ss="nMyd7SlD_c" for domain www.dropbox.com, path /, expire 1747761645 < set-cookie: __Host-ss=nMyd7SlD_c; Path=/; Expires=Tue, 20 May 2025 17:20:45 GMT; HttpOnly; Secure; SameSite=Strict * Added cookie locale="en" for domain dropbox.com, path /, expire 1873905645 < set-cookie: locale=en; Path=/; Domain=dropbox.com; Expires=Sat, 19 May 2029 17:20:45 GMT < x-content-type-options: nosniff < x-permitted-cross-domain-policies: none < x-robots-tag: noindex, nofollow, noimageindex < x-xss-protection: 1; mode=block < date: Mon, 20 May 2024 17:20:45 GMT < strict-transport-security: max-age=31536000; includeSubDomains < server: envoy < cache-control: no-cache, no-store < vary: Accept-Encoding < x-dropbox-response-origin: far_remote < x-dropbox-request-id: db5b571b3dd2438381184e5c24e436a1 < * Ignoring the response-body * Connection #1 to host www.dropbox.com left intact * Issue another request to this URL: 'https://www.dropbox.com/s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata' * Found bundle for host: 0x600003237330 [can multiplex] * Re-using existing connection with host www.dropbox.com * [HTTP/2] [3] OPENED stream for https://www.dropbox.com/s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata * [HTTP/2] [3] [:method: HEAD] * [HTTP/2] [3] [:scheme: https] * [HTTP/2] [3] [:authority: www.dropbox.com] * [HTTP/2] [3] [:path: /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata] * [HTTP/2] [3] [user-agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7] * [HTTP/2] [3] [accept-encoding: deflate, gzip] * [HTTP/2] [3] [cookie: __Host-js_csrf=jVZTCup0q55WoSv5P2bR0eEm; __Host-ss=nMyd7SlD_c; gvc=NjcwODUyMDAxNzE4NjI3OTMxNDM5NDAyMDM0MjIwNzc5OTA2OTI=; locale=en; t=jVZTCup0q55WoSv5P2bR0eEm] * [HTTP/2] [3] [accept: application/json, text/xml, application/xml, */*] > HEAD /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata HTTP/2 Host: www.dropbox.com User-Agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7 Accept-Encoding: deflate, gzip Cookie: __Host-js_csrf=jVZTCup0q55WoSv5P2bR0eEm; __Host-ss=nMyd7SlD_c; gvc=NjcwODUyMDAxNzE4NjI3OTMxNDM5NDAyMDM0MjIwNzc5OTA2OTI=; locale=en; t=jVZTCup0q55WoSv5P2bR0eEm Accept: application/json, text/xml, application/xml, */* < HTTP/2 302 < content-type: text/html; charset=utf-8 < content-security-policy: sandbox < location: https://ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com/cd/0/get/CTRrCxRfwFT9KelaOAxxc5GTEVVOibuObf2NvzuUfFNCz04Z47vKFhHQ-dL8N7Fyc1QWmoEGHDIsHaFzBuAKDqeftOEWprKGkv7u5NwuhUqCe3KYU6cXfb-8RshetiVzasXHpwgQNaZJqgPCn0fzvvIe/file?dl=1# < referrer-policy: strict-origin-when-cross-origin * Added cookie __Host-logged-out-session="ChC7wBWVjVF3+k71+UIA2VQVEO2MrrIGGi5BSjF5QjMzaTl2YnFrelNmWDFOZzBUaWdZRXdrdjdzekhJbVZBcHNNekZkdm93" for domain www.dropbox.com, path /, expire 0 < set-cookie: __Host-logged-out-session=ChC7wBWVjVF3+k71+UIA2VQVEO2MrrIGGi5BSjF5QjMzaTl2YnFrelNmWDFOZzBUaWdZRXdrdjdzekhJbVZBcHNNekZkdm93; HttpOnly; Path=/; SameSite=None; Secure < x-content-type-options: nosniff < x-frame-options: DENY < x-permitted-cross-domain-policies: none < x-xss-protection: 1; mode=block < date: Mon, 20 May 2024 17:20:45 GMT < server: envoy < strict-transport-security: max-age=31536000; includeSubDomains < content-length: 0 < strict-transport-security: max-age=31536000; includeSubDomains < cache-control: no-cache, no-store < x-dropbox-response-origin: far_remote < x-dropbox-request-id: e502d75669034136acfa5eeada89849e < * Ignoring the response-body * Connection #1 to host www.dropbox.com left intact * Issue another request to this URL: 'https://ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com/cd/0/get/CTRrCxRfwFT9KelaOAxxc5GTEVVOibuObf2NvzuUfFNCz04Z47vKFhHQ-dL8N7Fyc1QWmoEGHDIsHaFzBuAKDqeftOEWprKGkv7u5NwuhUqCe3KYU6cXfb-8RshetiVzasXHpwgQNaZJqgPCn0fzvvIe/file?dl=1' * NTLM picked AND auth done set, clear picked * NTLM-proxy picked AND auth done set, clear picked * Host ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com:443 was resolved. * IPv6: (none) * IPv4: 162.125.6.15 * Trying 162.125.6.15:443... * Connected to ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com (162.125.6.15) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * (304) (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc; CN=*.dl.dropboxusercontent.com * start date: Mar 25 00:00:00 2024 GMT * expire date: Mar 11 23:59:59 2025 GMT * subjectAltName: host "ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com" matched cert's "*.dl.dropboxusercontent.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com/cd/0/get/CTRrCxRfwFT9KelaOAxxc5GTEVVOibuObf2NvzuUfFNCz04Z47vKFhHQ-dL8N7Fyc1QWmoEGHDIsHaFzBuAKDqeftOEWprKGkv7u5NwuhUqCe3KYU6cXfb-8RshetiVzasXHpwgQNaZJqgPCn0fzvvIe/file?dl=1 * [HTTP/2] [1] [:method: HEAD] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com] * [HTTP/2] [1] [:path: /cd/0/get/CTRrCxRfwFT9KelaOAxxc5GTEVVOibuObf2NvzuUfFNCz04Z47vKFhHQ-dL8N7Fyc1QWmoEGHDIsHaFzBuAKDqeftOEWprKGkv7u5NwuhUqCe3KYU6cXfb-8RshetiVzasXHpwgQNaZJqgPCn0fzvvIe/file?dl=1] * [HTTP/2] [1] [user-agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7] * [HTTP/2] [1] [accept-encoding: deflate, gzip] * [HTTP/2] [1] [accept: application/json, text/xml, application/xml, */*] > HEAD /cd/0/get/CTRrCxRfwFT9KelaOAxxc5GTEVVOibuObf2NvzuUfFNCz04Z47vKFhHQ-dL8N7Fyc1QWmoEGHDIsHaFzBuAKDqeftOEWprKGkv7u5NwuhUqCe3KYU6cXfb-8RshetiVzasXHpwgQNaZJqgPCn0fzvvIe/file?dl=1 HTTP/2 Host: ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com User-Agent: libcurl/8.6.0 r-curl/5.2.1 httr/1.4.7 Accept-Encoding: deflate, gzip Accept: application/json, text/xml, application/xml, */* < HTTP/2 200 < content-type: application/json < accept-ranges: bytes < cache-control: max-age=60 < content-disposition: attachment; filename="modeling_results_BayesSpace_k09.Rdata"; filename*=UTF-8''modeling_results_BayesSpace_k09.Rdata < content-security-policy: sandbox < pragma: public < referrer-policy: no-referrer < vary: Origin, Accept-Encoding < x-content-security-policy: sandbox < x-content-type-options: nosniff < x-robots-tag: noindex, nofollow, noimageindex < x-server-response-time: 302 < x-webkit-csp: sandbox < date: Mon, 20 May 2024 17:20:46 GMT < server: envoy < strict-transport-security: max-age=31536000; includeSubDomains; preload < content-encoding: gzip < x-dropbox-response-origin: far_remote < x-dropbox-request-id: 5f44a3482a9d4f168f4a458c7563f895 < * HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1) * Connection #2 to host ucbd0010e742fd5ee8d0f3ad00c6.dl.dropboxusercontent.com left intact Error in curl::curl_fetch_memory(url, handle = handle) : HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1) > ```

Verbose output from HPC

```R > httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", config = httr::config(verbose = TRUE)) * WARNING: failed to open cookie file "" * Trying 162.125.6.18:80... * Connected to www.dropbox.com (162.125.6.18) port 80 (#0) > HEAD /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 HTTP/1.1 Host: www.dropbox.com User-Agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7 Accept-Encoding: deflate, gzip, zstd Accept: application/json, text/xml, application/xml, */* < HTTP/1.1 301 Moved Permanently < location: https://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 < date: Mon, 20 May 2024 17:20:37 GMT < server: envoy < x-dropbox-request-id: 9a794f81cb084841bb7798e7e226b502 < transfer-encoding: chunked < * Connection #0 to host www.dropbox.com left intact * Issue another request to this URL: 'https://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1' * Trying 162.125.6.18:443... * Connected to www.dropbox.com (162.125.6.18) port 443 (#1) * ALPN: offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CAfile: /jhpce/shared/community/core/conda_R/4.3.x/ssl/cacert.pem * CApath: none * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc; CN=*.dropbox.com * start date: Oct 31 00:00:00 2023 GMT * expire date: Nov 30 23:59:59 2024 GMT * subjectAltName: host "www.dropbox.com" matched cert's "*.dropbox.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 * SSL certificate verify ok. * using HTTP/2 * h2 [:method: HEAD] * h2 [:scheme: https] * h2 [:authority: www.dropbox.com] * h2 [:path: /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1] * h2 [user-agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7] * h2 [accept-encoding: deflate, gzip, zstd] * h2 [accept: application/json, text/xml, application/xml, */*] * Using Stream ID: 1 (easy handle 0x560d1a2517a0) > HEAD /s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1 HTTP/2 Host: www.dropbox.com User-Agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7 Accept-Encoding: deflate, gzip, zstd Accept: application/json, text/xml, application/xml, */* < HTTP/2 302 < content-type: text/html; charset=utf-8 < location: /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata < pragma: no-cache < referrer-policy: strict-origin-when-cross-origin * Added cookie gvc="MjI3NzM3MDIzOTU2NTExODg0NzA0MDU4OTgzOTM2NjMzNjA4MDk0" for domain www.dropbox.com, path /, expire 1873905638 < set-cookie: gvc=MjI3NzM3MDIzOTU2NTExODg0NzA0MDU4OTgzOTM2NjMzNjA4MDk0; Path=/; Expires=Sat, 19 May 2029 17:20:38 GMT; HttpOnly; Secure; SameSite=None * Added cookie t="npKYFBY65UTqS9cjN4UuzLhW" for domain dropbox.com, path /, expire 1747761638 < set-cookie: t=npKYFBY65UTqS9cjN4UuzLhW; Path=/; Domain=dropbox.com; Expires=Tue, 20 May 2025 17:20:38 GMT; HttpOnly; Secure; SameSite=None * Added cookie __Host-js_csrf="npKYFBY65UTqS9cjN4UuzLhW" for domain www.dropbox.com, path /, expire 1747761638 < set-cookie: __Host-js_csrf=npKYFBY65UTqS9cjN4UuzLhW; Path=/; Expires=Tue, 20 May 2025 17:20:38 GMT; Secure; SameSite=None * Added cookie __Host-ss="zMWmKTqxmE" for domain www.dropbox.com, path /, expire 1747761638 < set-cookie: __Host-ss=zMWmKTqxmE; Path=/; Expires=Tue, 20 May 2025 17:20:38 GMT; HttpOnly; Secure; SameSite=Strict * Added cookie locale="en" for domain dropbox.com, path /, expire 1873905638 < set-cookie: locale=en; Path=/; Domain=dropbox.com; Expires=Sat, 19 May 2029 17:20:38 GMT < x-content-type-options: nosniff < x-permitted-cross-domain-policies: none < x-robots-tag: noindex, nofollow, noimageindex < x-xss-protection: 1; mode=block < date: Mon, 20 May 2024 17:20:38 GMT < strict-transport-security: max-age=31536000; includeSubDomains < server: envoy < cache-control: no-cache, no-store < vary: Accept-Encoding < x-dropbox-response-origin: far_remote < x-dropbox-request-id: 285cd8c237d64b70be4eb4ccb7ca340a < * Connection #1 to host www.dropbox.com left intact * Issue another request to this URL: 'https://www.dropbox.com/s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata' * Found bundle for host: 0x560d1b51a420 [can multiplex] * Re-using existing connection #1 with host www.dropbox.com * h2 [:method: HEAD] * h2 [:scheme: https] * h2 [:authority: www.dropbox.com] * h2 [:path: /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata] * h2 [user-agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7] * h2 [accept-encoding: deflate, gzip, zstd] * h2 [cookie: __Host-js_csrf=npKYFBY65UTqS9cjN4UuzLhW; __Host-ss=zMWmKTqxmE; gvc=MjI3NzM3MDIzOTU2NTExODg0NzA0MDU4OTgzOTM2NjMzNjA4MDk0; locale=en; t=npKYFBY65UTqS9cjN4UuzLhW] * h2 [accept: application/json, text/xml, application/xml, */*] * Using Stream ID: 3 (easy handle 0x560d1a2517a0) > HEAD /s/dl/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata HTTP/2 Host: www.dropbox.com User-Agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7 Accept-Encoding: deflate, gzip, zstd Cookie: __Host-js_csrf=npKYFBY65UTqS9cjN4UuzLhW; __Host-ss=zMWmKTqxmE; gvc=MjI3NzM3MDIzOTU2NTExODg0NzA0MDU4OTgzOTM2NjMzNjA4MDk0; locale=en; t=npKYFBY65UTqS9cjN4UuzLhW Accept: application/json, text/xml, application/xml, */* < HTTP/2 302 < content-type: text/html; charset=utf-8 < content-security-policy: sandbox < location: https://uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com/cd/0/get/CTQsaXKXwp8-P8ffZmyB6AjytGH66n5TJU3SfRn9ZpUU7e2zylr2vWUBih2AwbXDx0EKGphJSMkhQN7bVhnqqri8fS4J19FgFUFXc0AvU0hgn7fygSbNcthjW2IKFxe5CUu-U-Nzpj9OE53PofzBI48I/file?dl=1# < referrer-policy: strict-origin-when-cross-origin * Added cookie __Host-logged-out-session="ChDybJWy+g8kd8A4LNMre+9DEOaMrrIGGi5BSjBXMjZLdlZvLWdybDJBT2VvNnJfZ29Nak02eGRMWVJnSEttczBralktOXRR" for domain www.dropbox.com, path /, expire 0 < set-cookie: __Host-logged-out-session=ChDybJWy+g8kd8A4LNMre+9DEOaMrrIGGi5BSjBXMjZLdlZvLWdybDJBT2VvNnJfZ29Nak02eGRMWVJnSEttczBralktOXRR; HttpOnly; Path=/; SameSite=None; Secure < x-content-type-options: nosniff < x-frame-options: DENY < x-permitted-cross-domain-policies: none < x-xss-protection: 1; mode=block < date: Mon, 20 May 2024 17:20:38 GMT < server: envoy < strict-transport-security: max-age=31536000; includeSubDomains < content-length: 0 < strict-transport-security: max-age=31536000; includeSubDomains < cache-control: no-cache, no-store < x-dropbox-response-origin: far_remote < x-dropbox-request-id: 2a3c2d0b328a4e73a3e5d3532ef62a39 < * Connection #1 to host www.dropbox.com left intact * Issue another request to this URL: 'https://uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com/cd/0/get/CTQsaXKXwp8-P8ffZmyB6AjytGH66n5TJU3SfRn9ZpUU7e2zylr2vWUBih2AwbXDx0EKGphJSMkhQN7bVhnqqri8fS4J19FgFUFXc0AvU0hgn7fygSbNcthjW2IKFxe5CUu-U-Nzpj9OE53PofzBI48I/file?dl=1' * Trying 162.125.6.15:443... * Connected to uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com (162.125.6.15) port 443 (#2) * ALPN: offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc; CN=*.dl.dropboxusercontent.com * start date: Mar 25 00:00:00 2024 GMT * expire date: Mar 11 23:59:59 2025 GMT * subjectAltName: host "uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com" matched cert's "*.dl.dropboxusercontent.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1 * SSL certificate verify ok. * using HTTP/2 * h2 [:method: HEAD] * h2 [:scheme: https] * h2 [:authority: uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com] * h2 [:path: /cd/0/get/CTQsaXKXwp8-P8ffZmyB6AjytGH66n5TJU3SfRn9ZpUU7e2zylr2vWUBih2AwbXDx0EKGphJSMkhQN7bVhnqqri8fS4J19FgFUFXc0AvU0hgn7fygSbNcthjW2IKFxe5CUu-U-Nzpj9OE53PofzBI48I/file?dl=1] * h2 [user-agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7] * h2 [accept-encoding: deflate, gzip, zstd] * h2 [accept: application/json, text/xml, application/xml, */*] * Using Stream ID: 1 (easy handle 0x560d1a2517a0) > HEAD /cd/0/get/CTQsaXKXwp8-P8ffZmyB6AjytGH66n5TJU3SfRn9ZpUU7e2zylr2vWUBih2AwbXDx0EKGphJSMkhQN7bVhnqqri8fS4J19FgFUFXc0AvU0hgn7fygSbNcthjW2IKFxe5CUu-U-Nzpj9OE53PofzBI48I/file?dl=1 HTTP/2 Host: uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com User-Agent: libcurl/8.1.2 r-curl/5.2.0 httr/1.4.7 Accept-Encoding: deflate, gzip, zstd Accept: application/json, text/xml, application/xml, */* < HTTP/2 200 < content-type: application/json < accept-ranges: bytes < cache-control: max-age=60 < content-disposition: attachment; filename="modeling_results_BayesSpace_k09.Rdata"; filename*=UTF-8''modeling_results_BayesSpace_k09.Rdata < content-security-policy: sandbox < pragma: public < referrer-policy: no-referrer < vary: Origin, Accept-Encoding < x-content-security-policy: sandbox < x-content-type-options: nosniff < x-robots-tag: noindex, nofollow, noimageindex < x-server-response-time: 277 < x-webkit-csp: sandbox < date: Mon, 20 May 2024 17:20:38 GMT < server: envoy < strict-transport-security: max-age=31536000; includeSubDomains; preload < content-encoding: gzip < x-dropbox-response-origin: far_remote < x-dropbox-request-id: 6a1f77c12fdf4ef594d5dc9ca7f7d124 < * Connection #2 to host uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com left intact Response [https://uc18f1b826a3d74dba415d727151.dl.dropboxusercontent.com/cd/0/get/CTQsaXKXwp8-P8ffZmyB6AjytGH66n5TJU3SfRn9ZpUU7e2zylr2vWUBih2AwbXDx0EKGphJSMkhQN7bVhnqqri8fS4J19FgFUFXc0AvU0hgn7fygSbNcthjW2IKFxe5CUu-U-Nzpj9OE53PofzBI48I/file?dl=1] Date: 2024-05-20 17:20 Status: 200 Content-Type: application/json > ```

I can imagine a few paths forward:

  1. Wait for httr::HEAD() / curl::curl_fetch_memory() updates.
    • I've posted on the curl issues page.
  2. Wait for macOS updates.
    • That worked in the past.
  3. If possible, avoid using httr::HEAD() in BiocFileCache at https://github.com/Bioconductor/BiocFileCache/blob/8458c9d0e80238ba2b9ee1bd07931822a78d4af2/R/httr.R#L5. Other httr functions seem to be working now.
    • I don't see this as a very viable option. I guess that it'll depend on how large of an issue this becomes (maybe I'm the only one trying to download data hosted on Dropbox with BiocFileCache).
  4. Change data from Dropbox to somewhere else.
    • I should likely do this at some point.
  5. Download the data with other R code for now.
    • The solution I've told users for now.

I'll think about what to do given that I'll be using some of this data for a course in a few weeks (June 9-11 https://github.com/lcolladotor/cshl_rstats_genome_scale_2024).

Best, Leo

jeroen commented 6 months ago

Reported this upstream here: https://github.com/curl/curl/issues/13725

lcolladotor commented 6 months ago

Thank you very much @jeroen!

jeroen commented 6 months ago

I think this bug is now fixed in libcurl 8.8.0 (released today!).

lcolladotor commented 6 months ago

Hi,

This bug is indeed fixed with libcurl 8.8.0. Thanks @jeroen @mtmorgan!

Here's the short version:

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Response [https://ucdbc32b7b700d6261f94c3da621.dl.dropboxusercontent.com/cd/0/get/CTbe7dI6tdpq8dtOuGenty52KBo-ipktH2JhguDt2PNGBhJ5l3oAvIsfFLFpM0CV0gUXElQQrWSQVy9l879G0xoV0tkWHWLs5tIULWB8tu0YKGki7Fm_a9mdfaKKf7RbTlCnm9riOI6B7uv9Mp7Tcm-D/file?dl=1]
  Date: 2024-05-22 14:01
  Status: 200
  Content-Type: application/json
<EMPTY BODY>

Next, I show in more detailed steps I took.

Thanks again! Leo

Install libcurl 8.8.0

curl version 8.7.1 is the one available right now from Homebrew at https://formulae.brew.sh/formula/curl. I tried brew install --HEAD curl but that didn't work.

``` % brew install curl --HEAD ==> Downloading https://formulae.brew.sh/api/formula.jws.json ############################################################################################################################# 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ############################################################################################################################# 100.0% curl is already installed but outdated (so it will be upgraded). ==> Fetching dependencies for curl: m4, autoconf, automake and libtool ==> Fetching m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 ############################################################################################################################# 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:f42d89db519a07d67bcaead6c8dfb2da45e8266bebb996dd8b3f19b1ca13b8a0 ############################################################################################################################# 100.0% ==> Fetching autoconf ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72 ############################################################################################################################# 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:bb39057e87dd9cb940bee15ff5b5172952a0350e59b14a6f55b8006a07813 ############################################################################################################################# 100.0% ==> Fetching automake ==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.5 ############################################################################################################################# 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/automake/blobs/sha256:7a116fd1052d95a13b40837b85a34cca35dbae9ed2864d1db92abfa960176 ############################################################################################################################# 100.0% ==> Fetching libtool ==> Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1 ############################################################################################################################# 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/libtool/blobs/sha256:211b174c29c24b3bdd42c44a12262ba479c4707b19bd2abd41f41a67f1b45c ############################################################################################################################# 100.0% ==> Fetching curl ==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/0f0bcf8cd7710dbc5a9763b43c5955cc0952fefb/Formula/c/curl.rb ############################################################################################################################# 100.0% ==> Downloading https://github.com/curl/curl/commit/b30d694a027eb771c02a3db0dee0ca03ccab7377.patch?full_index=1 ############################################################################################################################# 100.0% ==> Cloning https://github.com/curl/curl.git Cloning into '/Users/leocollado/Library/Caches/Homebrew/curl--git'... ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. ==> Installing dependencies for curl: m4, autoconf, automake and libtool ==> Installing curl dependency: m4 ==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19 Already downloaded: /Users/leocollado/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json ==> Pouring m4--1.4.19.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/m4/1.4.19: 14 files, 728.8KB ==> Installing curl dependency: autoconf ==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72 Already downloaded: /Users/leocollado/Library/Caches/Homebrew/downloads/b73cdb320c4261bbf8d02d03e50dc755c869c5859c1d4e93616898fc7cd939ff--autoconf-2.72.bottle_manifest.json ==> Pouring autoconf--2.72.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/autoconf/2.72: 72 files, 3.6MB ==> Installing curl dependency: automake ==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.5 Already downloaded: /Users/leocollado/Library/Caches/Homebrew/downloads/6863d3ffa73c5a5cbf1f1ea9e47b60784d09b232ac9e56149c1b931d9ec44d8b--automake-1.16.5.bottle_manifest.json ==> Pouring automake--1.16.5.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/automake/1.16.5: 132 files, 3.5MB ==> Installing curl dependency: libtool ==> Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1 Already downloaded: /Users/leocollado/Library/Caches/Homebrew/downloads/606e79b61b857bc4e83f71abf7afa8e087c4ad71539989e7066a4055439bf129--libtool-2.4.7-1.bottle_manifest.json ==> Pouring libtool--2.4.7.arm64_sonoma.bottle.1.tar.gz 🍺 /opt/homebrew/Cellar/libtool/2.4.7: 76 files, 3.8MB ==> Installing curl --HEAD ==> Patching ==> Applying b30d694a027eb771c02a3db0dee0ca03ccab7377.patch patching file 'lib/content_encoding.c' 5 out of 5 hunks failed--saving rejects to 'lib/content_encoding.c.rej' patching file 'tests/http/test_02_download.py' patching file 'tests/http/testenv/env.py' 1 out of 2 hunks failed--saving rejects to 'tests/http/testenv/env.py.rej' patching file 'tests/http/testenv/httpd.py' 2 out of 3 hunks failed--saving rejects to 'tests/http/testenv/httpd.py.rej' READ THIS: https://docs.brew.sh/Troubleshooting curl's formula was built from an unstable upstream --HEAD. This build failure is expected behaviour. Do not create issues about this on Homebrew's GitHub repositories. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help in Homebrew's discussions but are unlikely to receive a response. Try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it. ```

The instructions at https://curl.se/docs/install.html for Apple systems was a bit confusing to me. The Feeling Brave? Build curl yourself! section of https://snyk.io/blog/how-to-update-curl/ helped me a bit.

From https://github.com/Homebrew/homebrew-core/blob/e15ae5d5eba1a35089f0776216e91d38d4689a4a/Formula/c/curl.rb#L5, I figured that I should download the file ending with .tar.bz2 from https://github.com/curl/curl/releases/tag/curl-8_8_0. Note that by this point, I likely already had run brew install curl pkg-config (in case this matters for reproducibility).

In the end I used this:

cd ~/Desktop
wget https://github.com/curl/curl/releases/download/curl-8_8_0/curl-8.8.0.tar.bz2
## manually uncompressed curl-8.8.0.tar.bz2 which created the curl-8.8.0 directory
cd curl-8.8.0

## I copied the instructions from https://curl.se/docs/install.html
## then edited the ARCH and DEPLOYMENT_TARGET variables
export ARCH=arm64
export SDK=macosx
export DEPLOYMENT_TARGET=14.5

export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts --with-secure-transport
make -j8
make install

I then re-compiled curl in R by adapting the instructions from https://github.com/jeroen/curl?tab=readme-ov-file#macos-using-curl-from-homebrew. I didn't have to edit my PATH variable on my ~/.zshrc file to get this to work.

> Sys.setenv(PKG_CONFIG_PATH="/Users/leocollado/Desktop/curl-8.8.0/artifacts/lib/pkgconfig")
> install.packages("curl", type = "source")
trying URL 'https://cloud.r-project.org/src/contrib/curl_5.2.1.tar.gz'
Content type 'application/x-gzip' length 716695 bytes (699 KB)
==================================================
downloaded 699 KB

Loading required package: colorout
* installing *source* package ‘curl’ ...
** package ‘curl’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include
Using PKG_LIBS=-L/Users/leocollado/Desktop/curl-8.8.0/artifacts/lib -lcurl
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using SDK: ‘MacOSX14.4.sdk’
rm -f curl.so callbacks.o curl.o download.o escape.o fetch.o findport.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o options.o reflist.o split.o ssl.o typechecking.o utils.o version.o winidn.o writer.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c callbacks.c -o callbacks.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c curl.c -o curl.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c download.c -o download.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c escape.c -o escape.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c fetch.c -o fetch.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c findport.c -o findport.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c form.c -o form.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c getdate.c -o getdate.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c handle.c -o handle.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c ieproxy.c -o ieproxy.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c init.c -o init.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c interrupt.c -o interrupt.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c multi.c -o multi.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c nslookup.c -o nslookup.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c options.c -o options.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c reflist.c -o reflist.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c split.c -o split.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c ssl.c -o ssl.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c typechecking.c -o typechecking.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c utils.c -o utils.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c version.c -o version.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c winidn.c -o winidn.o
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Users/leocollado/Desktop/curl-8.8.0/artifacts/include -DSTRICT_R_HEADERS -DR_NO_REMAP  -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c writer.c -o writer.o
clang -arch arm64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o curl.so callbacks.o curl.o download.o escape.o fetch.o findport.o form.o getdate.o handle.o ieproxy.o init.o interrupt.o multi.o nslookup.o options.o reflist.o split.o ssl.o typechecking.o utils.o version.o winidn.o writer.o -L/Users/leocollado/Desktop/curl-8.8.0/artifacts/lib -lcurl -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-curl/00new/curl/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Loading required package: colorout
** help
*** installing help indices
** building package indices
Loading required package: colorout
** installing vignettes
** testing if installed package can be loaded from temporary location
Loading required package: colorout
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
Loading required package: colorout
** testing if installed package keeps a record of temporary installation path
* DONE (curl)

The downloaded source packages are in
    ‘/private/var/folders/_2/hqcmhc1d1bl3lqxgcrkpv8_00000gn/T/Rtmp2jZmXO/downloaded_packages’

I verified that the output of curl::curl_version() listed version 8.8.0.

> curl::curl_version()
$version
[1] "8.8.0"

$ssl_version
[1] "SecureTransport"

$libz_version
[1] "1.2.12"

$libssh_version
[1] NA

$libidn_version
[1] "2.3.7"

$host
[1] "aarch64-apple-darwin"

$protocols
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"
 [8] "https"   "imap"    "imaps"   "ldap"    "ldaps"   "mqtt"    "pop3"
[15] "pop3s"   "rtsp"    "smb"     "smbs"    "smtp"    "smtps"   "telnet"
[22] "tftp"

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] TRUE

Checking the earlier reprexes

The smaller test worked immediately.

> httr::HEAD("http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Response [https://ucdbc32b7b700d6261f94c3da621.dl.dropboxusercontent.com/cd/0/get/CTbe7dI6tdpq8dtOuGenty52KBo-ipktH2JhguDt2PNGBhJ5l3oAvIsfFLFpM0CV0gUXElQQrWSQVy9l879G0xoV0tkWHWLs5tIULWB8tu0YKGki7Fm_a9mdfaKKf7RbTlCnm9riOI6B7uv9Mp7Tcm-D/file?dl=1]
  Date: 2024-05-22 14:01
  Status: 200
  Content-Type: application/json
<EMPTY BODY>

But my BiocFileCache::bfcrpath() failed with a different error message suggesting that I should use bfcquery().

> library("BiocFileCache")
Loading required package: dbplyr
> bfc <- BiocFileCache::BiocFileCache()
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") :
  not all 'rnames' found or unique.
In addition: Warning message:
In FUN(X[[i]], ...) : 'rnames' exact pattern
    'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  is not unique; use 'bfcquery()' to see matches.
> traceback()
3: stop("not all 'rnames' found or unique.")
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")

I however initially just tried the earlier bfcadd() example, which worked.

> bfcadd(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
  |======================================================================| 100%

                                                                                                                         BFC18
"/Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache/23a11ed998ca_modeling_results_BayesSpace_k09.Rdata%3Fdl%3D1"

I then tried some of the options(error=recover) code from earlier. There I noticed in particular this piece:

> bfcrid(x)
[1] "BFC15" "BFC16" "BFC17" "BFC18"
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") :
  not all 'rnames' found or unique.
In addition: Warning message:
In FUN(X[[i]], ...) : 'rnames' exact pattern
    'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  is not unique; use 'bfcquery()' to see matches.
> options(error=recover)
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
Error in BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1") :
  not all 'rnames' found or unique.
In addition: Warning message:
In FUN(X[[i]], ...) : 'rnames' exact pattern
    'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  is not unique; use 'bfcquery()' to see matches.

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: 1
Called from: top level
Browse[1]> ls.str()
exact :  logi TRUE
rids : <missing>
rnames :  chr "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1"
x : Formal class 'BiocFileCache' [package "BiocFileCache"] with 1 slot
Browse[1]> bfcrid(x)
[1] "BFC15" "BFC16" "BFC17" "BFC18"
Browse[1]> n

Enter a frame number, or 0 to exit

1: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode
2: BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/mode

Selection: 0

I then tried using bfcquery() which I didn't remember the syntax for. Some of the info at https://bioconductor.org/packages/release/bioc/vignettes/BiocFileCache/inst/doc/BiocFileCache.html#investigating-accessing-resources was useful to remember this.

> bfcquery()
...     exact=  field=  query=  x=
> bfcquery(query = "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1", x = bfc)
# A tibble: 0 × 10
# ℹ 10 variables: rid <chr>, rname <chr>, create_time <dbl>, access_time <dbl>,
#   rpath <chr>, rtype <chr>, fpath <chr>, last_modified_time <dbl>,
#   etag <chr>, expires <dbl>
> bfcquery(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
# A tibble: 0 × 10
# ℹ 10 variables: rid <chr>, rname <chr>, create_time <dbl>, access_time <dbl>,
#   rpath <chr>, rtype <chr>, fpath <chr>, last_modified_time <dbl>,
#   etag <chr>, expires <dbl>

But well, I wasn't being able to find the IDs that I had already found earlier under options(error=recover). So I then simply removed them with bfcremove(), and after cleaning up my BiocFileCache from earlier attempts to download http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1, things worked well ^^.

> bfcremove(bfc, c("BFC15", "BFC16", "BFC17", "BFC18"))
> BiocFileCache::bfcrpath(bfc, "http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1")
adding rname 'http://www.dropbox.com/s/srkb2ife75px2yz/modeling_results_BayesSpace_k09.Rdata?dl=1'
  |======================================================================| 100%

                                                                                                                         BFC19
"/Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache/23a134616f43_modeling_results_BayesSpace_k09.Rdata%3Fdl%3D1"

Here's the R session info

> options(width = 120)
> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.4.0 (2024-04-24)
 os       macOS Sonoma 14.5
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2024-05-22
 pandoc   3.2 @ /opt/homebrew/bin/pandoc

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package       * version    date (UTC) lib source
 BiocFileCache * 2.12.0     2024-04-30 [1] Bioconductor 3.19 (R 4.4.0)
 bit             4.0.5      2022-11-15 [1] CRAN (R 4.4.0)
 bit64           4.0.5      2020-08-30 [1] CRAN (R 4.4.0)
 blob            1.2.4      2023-03-17 [1] CRAN (R 4.4.0)
 brio            1.1.5      2024-04-24 [1] CRAN (R 4.4.0)
 cachem          1.1.0      2024-05-16 [1] CRAN (R 4.4.0)
 cli             3.6.2      2023-12-11 [1] CRAN (R 4.4.0)
 colorout      * 1.3-0.2    2024-05-03 [1] Github (jalvesaq/colorout@c6113a2)
 curl            5.2.1      2024-03-01 [1] CRAN (R 4.4.0)
 DBI             1.2.2      2024-02-16 [1] CRAN (R 4.4.0)
 dbplyr        * 2.5.0      2024-03-19 [1] CRAN (R 4.4.0)
 devtools      * 2.4.5      2022-10-11 [1] CRAN (R 4.4.0)
 digest          0.6.35     2024-03-11 [1] CRAN (R 4.4.0)
 dplyr           1.1.4      2023-11-17 [1] CRAN (R 4.4.0)
 ellipsis        0.3.2      2021-04-29 [1] CRAN (R 4.4.0)
 fansi           1.0.6      2023-12-08 [1] CRAN (R 4.4.0)
 fastmap         1.2.0      2024-05-15 [1] CRAN (R 4.4.0)
 filelock        1.0.3      2023-12-11 [1] CRAN (R 4.4.0)
 fs              1.6.4      2024-04-25 [1] CRAN (R 4.4.0)
 generics        0.1.3      2022-07-05 [1] CRAN (R 4.4.0)
 glue            1.7.0      2024-01-09 [1] CRAN (R 4.4.0)
 htmltools       0.5.8.1    2024-04-04 [1] CRAN (R 4.4.0)
 htmlwidgets     1.6.4      2023-12-06 [1] CRAN (R 4.4.0)
 httpuv          1.6.15     2024-03-26 [1] CRAN (R 4.4.0)
 httr            1.4.7      2023-08-15 [1] CRAN (R 4.4.0)
 later           1.3.2      2023-12-06 [1] CRAN (R 4.4.0)
 lifecycle       1.0.4      2023-11-07 [1] CRAN (R 4.4.0)
 magrittr        2.0.3      2022-03-30 [1] CRAN (R 4.4.0)
 memoise         2.0.1      2021-11-26 [1] CRAN (R 4.4.0)
 mime            0.12       2021-09-28 [1] CRAN (R 4.4.0)
 miniUI          0.1.1.1    2018-05-18 [1] CRAN (R 4.4.0)
 pillar          1.9.0      2023-03-22 [1] CRAN (R 4.4.0)
 pkgbuild        1.4.4      2024-03-17 [1] CRAN (R 4.4.0)
 pkgconfig       2.0.3      2019-09-22 [1] CRAN (R 4.4.0)
 pkgload         1.3.4      2024-01-16 [1] CRAN (R 4.4.0)
 profvis         0.3.8      2023-05-02 [1] CRAN (R 4.4.0)
 promises        1.3.0      2024-04-05 [1] CRAN (R 4.4.0)
 prompt          1.0.2.9000 2024-05-03 [1] Github (gaborcsardi/prompt@17bd0e1)
 purrr           1.0.2      2023-08-10 [1] CRAN (R 4.4.0)
 R6              2.5.1      2021-08-19 [1] CRAN (R 4.4.0)
 Rcpp            1.0.12     2024-01-09 [1] CRAN (R 4.4.0)
 remotes         2.5.0      2024-03-17 [1] CRAN (R 4.4.0)
 rlang           1.1.3      2024-01-10 [1] CRAN (R 4.4.0)
 RSQLite         2.3.6      2024-03-31 [1] CRAN (R 4.4.0)
 rsthemes        0.4.0      2024-05-03 [1] Github (gadenbuie/rsthemes@34a55a4)
 rstudioapi      0.16.0     2024-03-24 [1] CRAN (R 4.4.0)
 sessioninfo     1.2.2      2021-12-06 [1] CRAN (R 4.4.0)
 shiny           1.8.1.1    2024-04-02 [1] CRAN (R 4.4.0)
 stringi         1.8.4      2024-05-06 [1] CRAN (R 4.4.0)
 stringr         1.5.1      2023-11-14 [1] CRAN (R 4.4.0)
 testthat      * 3.2.1.1    2024-04-14 [1] CRAN (R 4.4.0)
 tibble          3.2.1      2023-03-20 [1] CRAN (R 4.4.0)
 tidyselect      1.2.1      2024-03-11 [1] CRAN (R 4.4.0)
 urlchecker      1.0.1      2021-11-30 [1] CRAN (R 4.4.0)
 usethis       * 2.2.3      2024-02-19 [1] CRAN (R 4.4.0)
 utf8            1.2.4      2023-10-22 [1] CRAN (R 4.4.0)
 vctrs           0.6.5      2023-12-01 [1] CRAN (R 4.4.0)
 withr           3.0.0      2024-01-16 [1] CRAN (R 4.4.0)
 xtable          1.8-4      2019-04-21 [1] CRAN (R 4.4.0)

 [1] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>
> curl::curl_version()
$version
[1] "8.8.0"

$ssl_version
[1] "SecureTransport"

$libz_version
[1] "1.2.12"

$libssh_version
[1] NA

$libidn_version
[1] "2.3.7"

$host
[1] "aarch64-apple-darwin"

$protocols
 [1] "dict"    "file"    "ftp"     "ftps"    "gopher"  "gophers" "http"    "https"   "imap"    "imaps"   "ldap"
[12] "ldaps"   "mqtt"    "pop3"    "pop3s"   "rtsp"    "smb"     "smbs"    "smtp"    "smtps"   "telnet"  "tftp"

$ipv6
[1] TRUE

$http2
[1] TRUE

$idn
[1] TRUE