ropensci-archive/fulltext

curl config bug?

maelle opened this issue · 10 comments

library("fulltext")
res1 <- ft_search(query = 'biology', from = 'entrez', limit = 5)
ft_links(res1)
#> Only 5 found for Entrez, proceeding...
#> Error in curl::curl_fetch_memory(url, handle = handle): Error in the HTTP2 framing layer

Created on 2019-03-18 by the reprex package (v0.2.1)

Session info
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.4.4 (2018-03-15)
#>  os       Ubuntu 18.04.2 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language en_US                       
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Europe/Paris                
#>  date     2019-03-18                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version    date       lib source                         
#>  aRxiv         0.5.16     2017-04-28 [1] CRAN (R 3.4.4)                 
#>  assertthat    0.2.0      2017-04-11 [1] CRAN (R 3.4.4)                 
#>  backports     1.1.3      2018-12-14 [1] CRAN (R 3.4.4)                 
#>  bibtex        0.4.2      2017-06-30 [1] CRAN (R 3.4.4)                 
#>  callr         3.1.1      2018-12-21 [1] CRAN (R 3.4.4)                 
#>  cli           1.0.1      2018-09-25 [1] CRAN (R 3.4.4)                 
#>  colorspace    1.4-0      2019-01-13 [1] CRAN (R 3.4.4)                 
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.4.4)                 
#>  crul          0.7.0      2019-01-04 [1] CRAN (R 3.4.4)                 
#>  curl          3.3        2019-01-10 [1] CRAN (R 3.4.4)                 
#>  desc          1.2.0      2019-03-05 [1] Github (r-lib/desc@ef9e3a4)    
#>  devtools      2.0.1      2018-10-26 [1] CRAN (R 3.4.4)                 
#>  digest        0.6.18     2018-10-10 [1] CRAN (R 3.4.4)                 
#>  dplyr         0.8.0.1    2019-02-15 [1] CRAN (R 3.4.4)                 
#>  DT            0.5        2018-11-05 [1] CRAN (R 3.4.4)                 
#>  evaluate      0.13       2019-02-12 [1] CRAN (R 3.4.4)                 
#>  fs            1.2.6      2018-08-23 [1] CRAN (R 3.4.4)                 
#>  fulltext    * 1.2.0.9100 2019-03-18 [1] local                          
#>  ggplot2       3.1.0      2018-10-25 [1] CRAN (R 3.4.4)                 
#>  glue          1.3.0.9000 2019-03-11 [1] Github (tidyverse/glue@821f8e8)
#>  gtable        0.2.0      2016-02-26 [1] CRAN (R 3.4.4)                 
#>  highr         0.7        2018-06-09 [1] CRAN (R 3.4.4)                 
#>  hoardr        0.5.2      2018-12-02 [1] CRAN (R 3.4.4)                 
#>  htmltools     0.3.6      2017-04-28 [1] CRAN (R 3.4.4)                 
#>  htmlwidgets   1.3        2018-09-30 [1] CRAN (R 3.4.4)                 
#>  httpcode      0.2.0      2016-11-14 [1] CRAN (R 3.4.4)                 
#>  httpuv        1.4.5.1    2018-12-18 [1] CRAN (R 3.4.4)                 
#>  httr          1.4.0      2018-12-11 [1] CRAN (R 3.4.4)                 
#>  jsonlite      1.6        2018-12-07 [1] CRAN (R 3.4.4)                 
#>  knitr         1.22       2019-03-08 [1] CRAN (R 3.4.4)                 
#>  later         0.8.0      2019-02-11 [1] CRAN (R 3.4.4)                 
#>  lazyeval      0.2.1      2017-10-29 [1] CRAN (R 3.4.4)                 
#>  lubridate     1.7.4      2018-04-11 [1] CRAN (R 3.4.4)                 
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.4.4)                 
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 3.4.4)                 
#>  microdemic    0.4.0      2018-10-25 [1] CRAN (R 3.4.4)                 
#>  mime          0.6        2018-10-05 [1] CRAN (R 3.4.4)                 
#>  miniUI        0.1.1.1    2018-05-18 [1] CRAN (R 3.4.4)                 
#>  munsell       0.5.0      2018-06-12 [1] CRAN (R 3.4.4)                 
#>  pillar        1.3.1      2018-12-15 [1] CRAN (R 3.4.4)                 
#>  pkgbuild      1.0.2      2018-10-16 [1] CRAN (R 3.4.4)                 
#>  pkgconfig     2.0.2      2018-08-16 [1] CRAN (R 3.4.4)                 
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.4.4)                 
#>  plyr          1.8.4      2016-06-08 [1] CRAN (R 3.4.4)                 
#>  prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.4.4)                 
#>  processx      3.3.0      2019-03-10 [1] CRAN (R 3.4.4)                 
#>  promises      1.0.1      2018-04-13 [1] CRAN (R 3.4.4)                 
#>  ps            1.3.0      2018-12-21 [1] CRAN (R 3.4.4)                 
#>  purrr         0.3.1      2019-03-03 [1] CRAN (R 3.4.4)                 
#>  R6            2.4.0      2019-02-14 [1] CRAN (R 3.4.4)                 
#>  rappdirs      0.3.1      2016-03-28 [1] CRAN (R 3.4.4)                 
#>  Rcpp          1.0.0      2018-11-07 [1] CRAN (R 3.4.4)                 
#>  rcrossref     0.9.0      2019-01-14 [1] CRAN (R 3.4.4)                 
#>  remotes       2.0.2.9000 2019-03-14 [1] local                          
#>  rentrez       1.2.1      2018-03-05 [1] CRAN (R 3.4.4)                 
#>  reshape2      1.4.3      2017-12-11 [1] CRAN (R 3.4.4)                 
#>  rlang         0.3.1      2019-01-08 [1] CRAN (R 3.4.4)                 
#>  rmarkdown     1.11       2018-12-08 [1] CRAN (R 3.4.4)                 
#>  rplos         0.8.4      2018-08-14 [1] CRAN (R 3.4.4)                 
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.4.4)                 
#>  scales        1.0.0      2018-08-09 [1] CRAN (R 3.4.4)                 
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.4.4)                 
#>  shiny         1.2.0      2018-11-02 [1] CRAN (R 3.4.4)                 
#>  solrium       1.0.2      2018-12-13 [1] CRAN (R 3.4.4)                 
#>  storr         1.2.1      2018-10-18 [1] CRAN (R 3.4.4)                 
#>  stringi       1.3.1      2019-02-13 [1] CRAN (R 3.4.4)                 
#>  stringr       1.4.0      2019-02-10 [1] CRAN (R 3.4.4)                 
#>  testthat      2.0.1      2018-10-13 [1] CRAN (R 3.4.4)                 
#>  tibble        2.0.1      2019-01-12 [1] CRAN (R 3.4.4)                 
#>  tidyselect    0.2.5      2018-10-11 [1] CRAN (R 3.4.4)                 
#>  usethis       1.4.0.9000 2019-03-11 [1] Github (r-lib/usethis@db0570b) 
#>  whisker       0.3-2      2013-04-28 [1] CRAN (R 3.4.4)                 
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.4.4)                 
#>  xfun          0.5        2019-02-20 [1] CRAN (R 3.4.4)                 
#>  XML           3.98-1.19  2019-03-06 [1] CRAN (R 3.4.4)                 
#>  xml2          1.2.0      2018-01-24 [1] CRAN (R 3.4.4)                 
#>  xtable        1.8-3      2018-08-29 [1] CRAN (R 3.4.4)                 
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.4.4)                 
#> 
#> [1] /home/maelle/R/x86_64-pc-linux-gnu-library/3.4
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library

Looks like jeroen/curl#156

thanks @maelle !

does this suggestion help? jeroen/curl#156 (comment)

Where would I write it? I am trying to knit the README

hmmm, i need to get this #199 started, then i can answer you

okay, reinstall from master - then try

ft_links(res1, config=httr::verbose())

and report back the verbose http outout

library("fulltext")
res1 <- ft_search(query = 'biology', from = 'entrez', limit = 5)
ft_links(res1, config = httr::verbose())
#> Error in curl::curl_fetch_memory(url, handle = handle): Error in the HTTP2 framing layer

Created on 2019-03-21 by the reprex package (v0.2.1)

Session info
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.4.4 (2018-03-15)
#>  os       Ubuntu 18.04.2 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language en_US                       
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Europe/Paris                
#>  date     2019-03-21                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version    date       lib
#>  aRxiv         0.5.16     2017-04-28 [1]
#>  assertthat    0.2.0      2017-04-11 [1]
#>  backports     1.1.3      2018-12-14 [1]
#>  bibtex        0.4.2      2017-06-30 [1]
#>  callr         3.2.0      2019-03-15 [1]
#>  cli           1.1.0      2019-03-19 [1]
#>  colorspace    1.4-1      2019-03-18 [1]
#>  crayon        1.3.4      2017-09-16 [1]
#>  crul          0.7.0      2019-01-04 [1]
#>  curl          3.3        2019-01-10 [1]
#>  desc          1.2.0      2019-03-05 [1]
#>  devtools      2.0.1      2018-10-26 [1]
#>  digest        0.6.18     2018-10-10 [1]
#>  dplyr         0.8.0.1    2019-02-15 [1]
#>  DT            0.5        2018-11-05 [1]
#>  evaluate      0.13       2019-02-12 [1]
#>  fs            1.2.6      2018-08-23 [1]
#>  fulltext    * 1.2.0.9310 2019-03-21 [1]
#>  ggplot2       3.1.0      2018-10-25 [1]
#>  glue          1.3.1      2019-03-19 [1]
#>  gtable        0.2.0      2016-02-26 [1]
#>  highr         0.7        2018-06-09 [1]
#>  hoardr        0.5.2      2018-12-02 [1]
#>  htmltools     0.3.6      2017-04-28 [1]
#>  htmlwidgets   1.3        2018-09-30 [1]
#>  httpcode      0.2.0      2016-11-14 [1]
#>  httpuv        1.5.0      2019-03-15 [1]
#>  httr          1.4.0      2018-12-11 [1]
#>  jsonlite      1.6        2018-12-07 [1]
#>  knitr         1.22       2019-03-08 [1]
#>  later         0.8.0      2019-02-11 [1]
#>  lazyeval      0.2.2      2019-03-15 [1]
#>  lubridate     1.7.4      2018-04-11 [1]
#>  magrittr      1.5        2014-11-22 [1]
#>  memoise       1.1.0      2017-04-21 [1]
#>  microdemic    0.4.0      2018-10-25 [1]
#>  mime          0.6        2018-10-05 [1]
#>  miniUI        0.1.1.1    2018-05-18 [1]
#>  munsell       0.5.0      2018-06-12 [1]
#>  pillar        1.3.1      2018-12-15 [1]
#>  pkgbuild      1.0.2      2018-10-16 [1]
#>  pkgconfig     2.0.2      2018-08-16 [1]
#>  pkgload       1.0.2      2018-10-29 [1]
#>  plyr          1.8.4      2016-06-08 [1]
#>  prettyunits   1.0.2      2015-07-13 [1]
#>  processx      3.3.0      2019-03-10 [1]
#>  promises      1.0.1      2018-04-13 [1]
#>  ps            1.3.0      2018-12-21 [1]
#>  purrr         0.3.2      2019-03-15 [1]
#>  R6            2.4.0      2019-02-14 [1]
#>  rappdirs      0.3.1      2016-03-28 [1]
#>  Rcpp          1.0.1      2019-03-17 [1]
#>  rcrossref     0.9.0      2019-01-14 [1]
#>  remotes       2.0.2.9000 2019-03-14 [1]
#>  rentrez       1.2.1      2018-03-05 [1]
#>  reshape2      1.4.3      2017-12-11 [1]
#>  rlang         0.3.1      2019-01-08 [1]
#>  rmarkdown     1.12       2019-03-14 [1]
#>  rplos         0.8.4      2018-08-14 [1]
#>  rprojroot     1.3-2      2018-01-03 [1]
#>  scales        1.0.0      2018-08-09 [1]
#>  sessioninfo   1.1.1      2018-11-05 [1]
#>  shiny         1.2.0      2018-11-02 [1]
#>  solrium       1.0.2      2018-12-13 [1]
#>  storr         1.2.1      2018-10-18 [1]
#>  stringi       1.4.3      2019-03-12 [1]
#>  stringr       1.4.0      2019-02-10 [1]
#>  testthat      2.0.1      2018-10-13 [1]
#>  tibble        2.1.1      2019-03-16 [1]
#>  tidyselect    0.2.5      2018-10-11 [1]
#>  usethis       1.4.0.9000 2019-03-19 [1]
#>  whisker       0.3-2      2013-04-28 [1]
#>  withr         2.1.2      2018-03-15 [1]
#>  xfun          0.5        2019-02-20 [1]
#>  XML           3.98-1.19  2019-03-06 [1]
#>  xml2          1.2.0      2018-01-24 [1]
#>  xtable        1.8-3      2018-08-29 [1]
#>  yaml          2.2.0      2018-07-25 [1]
#>  source                            
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  Github (r-lib/desc@ef9e3a4)       
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  Github (ropensci/fulltext@6015f8c)
#>  CRAN (R 3.4.4)                    
#>  Github (tidyverse/glue@f356a12)   
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  local                             
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  Github (r-lib/usethis@bfc636c)    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#>  CRAN (R 3.4.4)                    
#> 
#> [1] /home/maelle/R/x86_64-pc-linux-gnu-library/3.4
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library

hmm, I found a little bug, just fixed #203 , so install again - Also, reprex doens't show the curl vebose output - can you paste in that output manually or maybe ther'es a reprex setting to show the curl outupt

Here's what I get

-> GET /entrez/eutils/esearch.fcgi?db=pubmed&term=10.1016%2Fj.celrep.2017.05.019%5Bdoi%5D%20OR%2010.3791%2F58664%5Bdoi%5D%20OR%2010.1038%2Fs41380-018-0231-1%5Bdoi%5D%20OR%2010.1038%2Fs41380-018-0247-6%5Bdoi%5D%20OR%20NA%5Bdoi%5D&retmode=xml&usehistory=n&email=david.winter%40gmail.com&tool=rentrez HTTP/2
-> Host: eutils.ncbi.nlm.nih.gov
-> User-Agent: libcurl/7.58.0 r-curl/3.3 httr/1.4.0
-> Accept-Encoding: gzip, deflate
-> Cookie: ncbi_sid=3A71884A51D5C153_D4D9SID
-> Accept: application/json, text/xml, application/xml, */*
-> 
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Error in the HTTP2 framing layer

can you try ft_links(res1, config = c(httr::verbose(), httr::config(http_version=0L)))

-> GET /entrez/eutils/esearch.fcgi?db=pubmed&term=10.1016%2Fj.celrep.2017.05.019%5Bdoi%5D%20OR%2010.3791%2F58664%5Bdoi%5D%20OR%2010.1038%2Fs41380-018-0231-1%5Bdoi%5D%20OR%2010.1038%2Fs41380-018-0247-6%5Bdoi%5D%20OR%20NA%5Bdoi%5D&retmode=xml&usehistory=n&email=david.winter%40gmail.com&tool=rentrez HTTP/2
-> Host: eutils.ncbi.nlm.nih.gov
-> User-Agent: libcurl/7.58.0 r-curl/3.3 httr/1.4.0
-> Accept-Encoding: gzip, deflate
-> Cookie: ncbi_sid=51453EFDBC3A648D_4EB6SID
-> Accept: application/json, text/xml, application/xml, */*
-> 
<- HTTP/2 200 
<- date: Fri, 22 Mar 2019 17:52:46 GMT
<- server: Finatra
<- strict-transport-security: max-age=31536000; includeSubDomains; preload
<- content-security-policy: upgrade-insecure-requests
<- x-ratelimit-remaining: 1
<- ncbi-phid: 322C1335D2DEB7E5000021FA4DBA6593.1.1.m_2
<- cache-control: private
<- l5d-success-class: 1.0
<- ncbi-sid: 51453EFDBC3A648D_4EB6SID
<- content-encoding: gzip
<- x-ratelimit-limit: 3
<- access-control-allow-origin: *
<- content-type: text/xml; charset=UTF-8
<- set-cookie: ncbi_sid=51453EFDBC3A648D_4EB6SID; domain=.nih.gov; path=/; expires=Sun, 22 Mar 2020 17:52:46 GMT
<- x-ua-compatible: IE=Edge
<- x-xss-protection: 1; mode=block
<- 
-> GET /entrez/eutils/elink.fcgi?db=&dbfrom=pubmed&cmd=llinks&id=30663642%2C30242229%2C30242228%2C28564607&email=david.winter%40gmail.com&tool=rentrez HTTP/2
-> Host: eutils.ncbi.nlm.nih.gov
-> User-Agent: libcurl/7.58.0 r-curl/3.3 httr/1.4.0
-> Accept-Encoding: gzip, deflate
-> Cookie: ncbi_sid=51453EFDBC3A648D_4EB6SID
-> Accept: application/json, text/xml, application/xml, */*
-> 
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Error in the HTTP2 framing layer

still can't replicate this, closing for now