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

curl error on windows #19

Closed
gaborcsardi opened this Issue Sep 27, 2016 · 34 comments

Comments

Projects
None yet
3 participants
@gaborcsardi
Member

gaborcsardi commented Sep 27, 2016

─  Uploading package
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Stream error in the HTTP/2 framing layer

@gaborcsardi gaborcsardi added this to the CRAN submission milestone Sep 27, 2016

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

@jeroenooms Have you seen this before?

Member

gaborcsardi commented Sep 27, 2016

@jeroenooms Have you seen this before?

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

Yikes, no. Do you have a repro example?

Member

jeroen commented Sep 27, 2016

Yikes, no. Do you have a repro example?

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

I did auto enable HTTP2 in the most recent windows release to see what would happen :)

Member

jeroen commented Sep 27, 2016

I did auto enable HTTP2 in the most recent windows release to see what would happen :)

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

Kinda. Not minimal. Take this package, clone it to windows. Install it, and start checking it on itself. So sg like:

devtools::install()
library(rhub)
validate_email(email = "...", token = "...")
check()
Member

gaborcsardi commented Sep 27, 2016

Kinda. Not minimal. Take this package, clone it to windows. Install it, and start checking it on itself. So sg like:

devtools::install()
library(rhub)
validate_email(email = "...", token = "...")
check()
@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

You can always opt out of http2 like this. In this case 2 means CURL_HTTP_VERSION_1_1.

h <- new_handle(http_version = 2)
Member

jeroen commented Sep 27, 2016

You can always opt out of http2 like this. In this case 2 means CURL_HTTP_VERSION_1_1.

h <- new_handle(http_version = 2)
@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

What server are you using for http2?

Member

jeroen commented Sep 27, 2016

What server are you using for http2?

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

I was not aware of using http2.....

Not sure what you mean for server, express.js, behind nginx. That's what
you mean?

On Wed, Sep 28, 2016 at 12:06 AM, Jeroen Ooms notifications@github.com
wrote:

What server are you using for http2?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQISyRrbs58sFuGqugHnPGcdPY-04ks5quaFpgaJpZM4KIPxi
.

Member

gaborcsardi commented Sep 27, 2016

I was not aware of using http2.....

Not sure what you mean for server, express.js, behind nginx. That's what
you mean?

On Wed, Sep 28, 2016 at 12:06 AM, Jeroen Ooms notifications@github.com
wrote:

What server are you using for http2?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQISyRrbs58sFuGqugHnPGcdPY-04ks5quaFpgaJpZM4KIPxi
.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

Yeah I guess nginx has http/2 then? Either that or it's a bug in libcurl...

Member

jeroen commented Sep 27, 2016

Yeah I guess nginx has http/2 then? Either that or it's a bug in libcurl...

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

Yeah, it seems that http2 is turned on in my nginx config.

How do I specify the handle option for httr::POST (and GET, etc.) ?

(Need to go to sleep now, sorry.)

On Wed, Sep 28, 2016 at 12:10 AM, Jeroen Ooms notifications@github.com
wrote:

Yeah I guess nginx has http/2 then? Either that or it's a bug in libcurl...


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQCvXTNCgjVzbd4GhRIaVLh4YXa80ks5quaJWgaJpZM4KIPxi
.

Member

gaborcsardi commented Sep 27, 2016

Yeah, it seems that http2 is turned on in my nginx config.

How do I specify the handle option for httr::POST (and GET, etc.) ?

(Need to go to sleep now, sorry.)

On Wed, Sep 28, 2016 at 12:10 AM, Jeroen Ooms notifications@github.com
wrote:

Yeah I guess nginx has http/2 then? Either that or it's a bug in libcurl...


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQCvXTNCgjVzbd4GhRIaVLh4YXa80ks5quaJWgaJpZM4KIPxi
.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

Yeah I can repro this on osx when I enable http2. Looks like a bug in libcurl... I have to go to sleep too, will look tomorrow :)

Member

jeroen commented Sep 27, 2016

Yeah I can repro this on osx when I enable http2. Looks like a bug in libcurl... I have to go to sleep too, will look tomorrow :)

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

Thanks much!

Member

gaborcsardi commented Sep 27, 2016

Thanks much!

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 27, 2016

Member

You can pass httr::config(http_version = 2) to the POST() or GET() to request. But I'd like to know if this is a server problem or a bug in libcurl. Because if it is the latter I should probably not automatically enable http2 when it is available.

Member

jeroen commented Sep 27, 2016

You can pass httr::config(http_version = 2) to the POST() or GET() to request. But I'd like to know if this is a server problem or a bug in libcurl. Because if it is the latter I should probably not automatically enable http2 when it is available.

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

Btw. it also fails on Linux, the same way, as you probably expected....

Member

gaborcsardi commented Sep 27, 2016

Btw. it also fails on Linux, the same way, as you probably expected....

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 27, 2016

Member

Also, there is no sign of the connection in the nginx logs.

Member

gaborcsardi commented Sep 27, 2016

Also, there is no sign of the connection in the nginx logs.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

I'll look into it, one sec.

Member

jeroen commented Sep 28, 2016

I'll look into it, one sec.

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

No worries, no rush, your workaround is fine for me now. :)

Member

gaborcsardi commented Sep 28, 2016

No worries, no rush, your workaround is fine for me now. :)

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

I want to know what is the problem, to rule out that I messed up the curl bindings.

Member

jeroen commented Sep 28, 2016

I want to know what is the problem, to rule out that I messed up the curl bindings.

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

Sure. Let me know if I can help, e.g. you want the nginx config or sg.

Member

gaborcsardi commented Sep 28, 2016

Sure. Let me know if I can help, e.g. you want the nginx config or sg.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

So to install curl with http2 support on mac you do

brew install curl --with-nghttp2
brew link --force curl

And then you can reproduce it like this:

curl -v https://builder.r-hub.io/api/check/validate_email \
  -H 'Content-Type: application/json' \
  -d '{"email":"jeroenooms@gmail.com"}'

Can you give me an example of another simple API that uses POST?

Member

jeroen commented Sep 28, 2016

So to install curl with http2 support on mac you do

brew install curl --with-nghttp2
brew link --force curl

And then you can reproduce it like this:

curl -v https://builder.r-hub.io/api/check/validate_email \
  -H 'Content-Type: application/json' \
  -d '{"email":"jeroenooms@gmail.com"}'

Can you give me an example of another simple API that uses POST?

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi
Member

gaborcsardi commented Sep 28, 2016

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

The fact that it fails for GET means that the web app does not even get the request, the nginx-libcurl communication fails already.

Member

gaborcsardi commented Sep 28, 2016

The fact that it fails for GET means that the web app does not even get the request, the nginx-libcurl communication fails already.

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

And it probably fails very early, because there is no sign of it in the nginx logs.....

Member

gaborcsardi commented Sep 28, 2016

And it probably fails very early, because there is no sign of it in the nginx logs.....

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

Yes the example above is post (the -d flag posts a payload)

Member

jeroen commented Sep 28, 2016

Yes the example above is post (the -d flag posts a payload)

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

It seems OK for GET requests.

Member

jeroen commented Sep 28, 2016

It seems OK for GET requests.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

Can I ask this on the curl mailing list? I'll include the reproducible example. Or do you plan to take down the server?

Member

jeroen commented Sep 28, 2016

Can I ask this on the curl mailing list? I'll include the reproducible example. Or do you plan to take down the server?

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

Sure, no problem. The server will be up. G.

On Wed, Sep 28, 2016 at 10:30 AM, Jeroen Ooms notifications@github.com
wrote:

Can I ask this on the curl mailing list? I'll include the reproducible
example. Or do you plan to take down the server?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQAXC2bzEjWe3wWaEyHj6HhYIR2DLks5qujPSgaJpZM4KIPxi
.

Member

gaborcsardi commented Sep 28, 2016

Sure, no problem. The server will be up. G.

On Wed, Sep 28, 2016 at 10:30 AM, Jeroen Ooms notifications@github.com
wrote:

Can I ask this on the curl mailing list? I'll include the reproducible
example. Or do you plan to take down the server?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQAXC2bzEjWe3wWaEyHj6HhYIR2DLks5qujPSgaJpZM4KIPxi
.

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

The only thing is, if the request succeeds, then it will send out an email
to the specified address. So make sure that you include some dummy address,
or an invalid one in the example. :)

On Wed, Sep 28, 2016 at 10:58 AM, Gábor Csárdi csardi.gabor@gmail.com
wrote:

Sure, no problem. The server will be up. G.

On Wed, Sep 28, 2016 at 10:30 AM, Jeroen Ooms notifications@github.com
wrote:

Can I ask this on the curl mailing list? I'll include the reproducible
example. Or do you plan to take down the server?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQAXC2bzEjWe3wWaEyHj6HhYIR2DLks5qujPSgaJpZM4KIPxi
.

Member

gaborcsardi commented Sep 28, 2016

The only thing is, if the request succeeds, then it will send out an email
to the specified address. So make sure that you include some dummy address,
or an invalid one in the example. :)

On Wed, Sep 28, 2016 at 10:58 AM, Gábor Csárdi csardi.gabor@gmail.com
wrote:

Sure, no problem. The server will be up. G.

On Wed, Sep 28, 2016 at 10:30 AM, Jeroen Ooms notifications@github.com
wrote:

Can I ask this on the curl mailing list? I'll include the reproducible
example. Or do you plan to take down the server?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoTQAXC2bzEjWe3wWaEyHj6HhYIR2DLks5qujPSgaJpZM4KIPxi
.

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

OK I posted it on the mailing list. I think this might be related: https://trac.nginx.org/nginx/ticket/915

Member

jeroen commented Sep 28, 2016

OK I posted it on the mailing list. I think this might be related: https://trac.nginx.org/nginx/ticket/915

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

Thanks much!

Member

gaborcsardi commented Sep 28, 2016

Thanks much!

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

Can you chime in re: nginx on curl/curl#1040 ?

Member

jeroen commented Sep 28, 2016

Can you chime in re: nginx on curl/curl#1040 ?

@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Sep 28, 2016

Member

Fixed now, see curl/curl#1040 (comment)

Thanks @jeroenooms and sorry for the false alarm!

Member

gaborcsardi commented Sep 28, 2016

Fixed now, see curl/curl#1040 (comment)

Thanks @jeroenooms and sorry for the false alarm!

@jeroen

This comment has been minimized.

Show comment
Hide comment
@jeroen

jeroen Sep 28, 2016

Member

Good to know that there are no problems in R or libcurl itself.

Member

jeroen commented Sep 28, 2016

Good to know that there are no problems in R or libcurl itself.

@helske

This comment has been minimized.

Show comment
Hide comment
@helske

helske Oct 5, 2016

Based on above I can't understand what should an end-user on Windows to do in order to get rid of this error? I installed the newest versions of rhub and curl from github and still got this error:


> library(rhub)
> check()
‘jouni.helske@jyu.fi’ is not validated, validating now.
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Stream error in the HTTP/2 framing layer
>
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Finnish_Finland.1252  LC_CTYPE=Finnish_Finland.1252    LC_MONETARY=Finnish_Finland.1252
[4] LC_NUMERIC=C                     LC_TIME=Finnish_Finland.1252    

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

other attached packages:
[1] rhub_1.0.0

loaded via a namespace (and not attached):
 [1] httr_1.2.1.9000  R6_2.1.3         clisymbols_1.0.0 tools_3.3.1      withr_1.0.2      rappdirs_0.3.1   curl_2.1.9000   
 [8] crayon_1.3.2     rcmdcheck_1.2.1  desc_1.0.1       callr_1.0.0      digest_0.6.10    jsonlite_1.1     rematch_1.0.1   
[15] whoami_1.1.1 

helske commented Oct 5, 2016

Based on above I can't understand what should an end-user on Windows to do in order to get rid of this error? I installed the newest versions of rhub and curl from github and still got this error:


> library(rhub)
> check()
‘jouni.helske@jyu.fi’ is not validated, validating now.
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Stream error in the HTTP/2 framing layer
>
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Finnish_Finland.1252  LC_CTYPE=Finnish_Finland.1252    LC_MONETARY=Finnish_Finland.1252
[4] LC_NUMERIC=C                     LC_TIME=Finnish_Finland.1252    

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

other attached packages:
[1] rhub_1.0.0

loaded via a namespace (and not attached):
 [1] httr_1.2.1.9000  R6_2.1.3         clisymbols_1.0.0 tools_3.3.1      withr_1.0.2      rappdirs_0.3.1   curl_2.1.9000   
 [8] crayon_1.3.2     rcmdcheck_1.2.1  desc_1.0.1       callr_1.0.0      digest_0.6.10    jsonlite_1.1     rematch_1.0.1   
[15] whoami_1.1.1 
@gaborcsardi

This comment has been minimized.

Show comment
Hide comment
@gaborcsardi

gaborcsardi Oct 5, 2016

Member

@helske it should be ok now.

Member

gaborcsardi commented Oct 5, 2016

@helske it should be ok now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment