Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using occ_download() #333

Closed
damianooldoni opened this issue Dec 3, 2018 · 7 comments
Closed

Error while using occ_download() #333

damianooldoni opened this issue Dec 3, 2018 · 7 comments
Labels
Milestone

Comments

@damianooldoni
Copy link
Collaborator

While attempting to download occurrence data, I get today this error message Error in x$http_status() : attempt to apply non-function. Below all message:

* Connection 1 seems to be dead!
* Closing connection 1
* schannel: shutting down SSL/TLS connection with api.gbif.org port 443
* schannel: clear security context handle
*   Trying 130.225.43.2...
* TCP_NODELAY set
* Connected to api.gbif.org (130.225.43.2) port 443 (#2)
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 1/3)
* schannel: disabled server certificate revocation checks
* schannel: sending initial handshake data: sending 176 bytes...
* schannel: sent initial handshake data: sent 176 bytes
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 2/3)
* schannel: encrypted data got 4096
* schannel: encrypted data buffer: offset 4096 length 4096
* schannel: encrypted data length: 3998
* schannel: encrypted data buffer: offset 3998 length 4096
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 2/3)
* schannel: encrypted data got 1024
* schannel: encrypted data buffer: offset 5022 length 5022
* schannel: encrypted data length: 313
* schannel: encrypted data buffer: offset 313 length 5022
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 2/3)
* schannel: encrypted data got 34
* schannel: encrypted data buffer: offset 347 length 5022
* schannel: sending next handshake data: sending 166 bytes...
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 2/3)
* schannel: encrypted data got 91
* schannel: encrypted data buffer: offset 91 length 5022
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with api.gbif.org port 443 (step 3/3)
* schannel: stored credential handle in session cache
* Server auth using Basic with user 'damiano.oldoni'
> POST /v1/occurrence/download/request HTTP/1.1
Host: api.gbif.org
Authorization: Basic ZGFtaWFuby5vbGRvbmk6dmViZWxvdHRv
Accept-Encoding: gzip, deflate
User-Agent: r-curl/3.2 crul/0.6.0 rOpenSci(rgbif/1.1.0)
X-USER-AGENT: r-curl/3.2 crul/0.6.0 rOpenSci(rgbif/1.1.0)
Content-Type: application/json
Accept: application/json
Content-Length: 1124

* upload completely sent off: 1124 out of 1124 bytes
* schannel: client wants to read 16384 bytes
* schannel: encdata_buffer resized 17408
* schannel: encrypted data buffer: offset 0 length 17408
* schannel: encrypted data got 469
* schannel: encrypted data buffer: offset 469 length 17408
* schannel: decrypted data length: 400
* schannel: decrypted data added: 400
* schannel: decrypted data cached: offset 400 length 16384
* schannel: encrypted data buffer: offset 0 length 17408
* schannel: decrypted data buffer: offset 400 length 16384
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 400
* schannel: decrypted data buffer: offset 0 length 16384
< HTTP/1.1 406 Not Acceptable
< Date: Mon, 03 Dec 2018 14:27:12 GMT
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: HEAD, GET, POST, DELETE, PUT, OPTIONS
< Content-Length: 0
< Server: Jetty(9.3.z-SNAPSHOT)
< X-API-URL: /v1/occurrence/download/request
< Cache-Control: no-cache, no-store, must-revalidate
< X-Varnish: 44696595
< Age: 0
< Via: 1.1 varnish (VError in x$http_status() : attempt to apply non-function
arnish/5.2)
< Connection: keep-alive
< 
* Connection #2 to host api.gbif.org left intact

I asked to a colleague to install (for the first time ever) and load rgbif package on his Windows laptop. I used my credentials on his laptop for triggering the download. He gets the same error message. Does somebody have an idea about the reason of this problem?
Thanks!

Session Info
> devtools::session_info()
Session info -----------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, mingw32             
 ui       RStudio (1.1.453)           
 language (EN)                        
 collate  English_United States.1252  
 tz       Europe/Paris                
 date     2018-12-03                  

Packages ---------------------------------------------------------------------
 package    * version     date       source                          
 assertthat   0.2.0       2017-04-11 CRAN (R 3.5.1)                  
 backports    1.1.2       2017-12-13 CRAN (R 3.5.0)                  
 base       * 3.5.1       2018-07-02 local                           
 colorspace   1.3-2       2016-12-14 CRAN (R 3.5.1)                  
 compiler     3.5.1       2018-07-02 local                           
 crayon       1.3.4       2017-09-16 CRAN (R 3.5.1)                  
 crul         0.6.0       2018-07-10 CRAN (R 3.5.1)                  
 curl         3.2         2018-03-28 CRAN (R 3.5.1)                  
 data.table   1.11.8      2018-09-30 CRAN (R 3.5.1)                  
 datasets   * 3.5.1       2018-07-02 local                           
 devtools     1.13.6      2018-06-27 CRAN (R 3.5.1)                  
 digest       0.6.16      2018-08-22 CRAN (R 3.5.1)                  
 dplyr        0.7.99.9000 2018-11-26 Github (tidyverse/dplyr@22d6a33)
 evaluate     0.11        2018-07-17 CRAN (R 3.5.1)                  
 geoaxe       0.1.0       2016-02-19 CRAN (R 3.5.1)                  
 ggplot2      3.1.0       2018-10-25 CRAN (R 3.5.1)                  
 glue         1.3.0       2018-07-17 CRAN (R 3.5.1)                  
 graphics   * 3.5.1       2018-07-02 local                           
 grDevices  * 3.5.1       2018-07-02 local                           
 grid         3.5.1       2018-07-02 local                           
 gtable       0.2.0       2016-02-26 CRAN (R 3.5.1)                  
 htmltools    0.3.6       2017-04-28 CRAN (R 3.5.1)                  
 httpcode     0.2.0       2016-11-14 CRAN (R 3.5.0)                  
 httr         1.3.1       2017-08-20 CRAN (R 3.5.1)                  
 jsonlite     1.5         2017-06-01 CRAN (R 3.5.1)                  
 knitr        1.20        2018-02-20 CRAN (R 3.5.1)                  
 lattice      0.20-35     2017-03-25 CRAN (R 3.5.1)                  
 lazyeval     0.2.1       2017-10-29 CRAN (R 3.5.1)                  
 magrittr     1.5         2014-11-22 CRAN (R 3.5.1)                  
 memoise      1.1.0       2017-04-21 CRAN (R 3.5.1)                  
 methods    * 3.5.1       2018-07-02 local                           
 munsell      0.5.0       2018-06-12 CRAN (R 3.5.1)                  
 oai          0.2.2       2016-11-24 CRAN (R 3.5.1)                  
 pillar       1.3.0.9001  2018-11-06 Github (r-lib/pillar@c5bf622)   
 pkgconfig    2.0.2       2018-08-16 CRAN (R 3.5.1)                  
 plyr         1.8.4       2016-06-08 CRAN (R 3.5.1)                  
 purrr        0.2.5       2018-05-29 CRAN (R 3.5.1)                  
 R6           2.3.0       2018-10-04 CRAN (R 3.5.1)                  
 Rcpp         1.0.0.1     2018-12-03 Github (RcppCore/Rcpp@0664c1a)  
 rgbif      * 1.1.0       2018-10-19 CRAN (R 3.5.1)                  
 rgeos        0.3-28      2018-06-08 CRAN (R 3.5.1)                  
 rlang        0.3.0.9000  2018-12-03 Github (r-lib/rlang@035d279)    
 rmarkdown    1.10        2018-06-11 CRAN (R 3.5.1)                  
 rprojroot    1.3-2       2018-01-03 CRAN (R 3.5.1)                  
 rstudioapi   0.7         2017-09-07 CRAN (R 3.5.1)                  
 scales       1.0.0       2018-08-09 CRAN (R 3.5.1)                  
 sp           1.3-1       2018-06-05 CRAN (R 3.5.1)                  
 stats      * 3.5.1       2018-07-02 local                           
 stringi      1.1.7       2018-03-12 CRAN (R 3.5.0)                  
 stringr      1.3.1       2018-05-10 CRAN (R 3.5.1)                  
 tibble       1.4.2       2018-01-22 CRAN (R 3.5.1)                  
 tidyselect   0.2.5       2018-10-11 CRAN (R 3.5.1)                  
 tools        3.5.1       2018-07-02 local                           
 triebeard    0.3.0       2016-08-04 CRAN (R 3.5.1)                  
 urltools     1.7.0       2018-01-20 CRAN (R 3.5.1)                  
 utils      * 3.5.1       2018-07-02 local                           
 whisker      0.3-2       2013-04-28 CRAN (R 3.5.1)                  
 withr        2.1.2       2018-03-15 CRAN (R 3.5.1)                  
 xml2         1.2.0       2018-01-24 CRAN (R 3.5.1)                  
 yaml         2.2.0       2018-07-25 CRAN (R 3.5.1) 
@sckott sckott added the Bug label Dec 3, 2018
@sckott
Copy link
Contributor

sckott commented Dec 3, 2018

thanks for the report @damianooldoni will have a look

sckott added a commit that referenced this issue Dec 3, 2018
was accidentally using httr function, swapped to use crul equivalent R6 method
bump dev version
@sckott
Copy link
Contributor

sckott commented Dec 3, 2018

@damianooldoni reinstall from here and try again. However, you should still get an HTTP request error from GBIF - not sure why we're suddenly getting 406 HTTP errors.

@sckott
Copy link
Contributor

sckott commented Dec 3, 2018

emailed the GBIF mailing list, hopefully will get this sorted soon

@damianooldoni
Copy link
Collaborator Author

Yes, I hope so. Many thanks!

@sckott
Copy link
Contributor

sckott commented Dec 4, 2018

It seems to be working again now - they must have fixed something. Can you test again?

@damianooldoni
Copy link
Collaborator Author

Thanks Scott. Yes, it works fine now. Issue can be closed for what I can see.

@sckott
Copy link
Contributor

sckott commented Dec 5, 2018

great, glad it works now

@sckott sckott closed this as completed Dec 5, 2018
@sckott sckott added this to the v1.2 milestone Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants