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 in curl::curl_fetch_memory(url, handle = handle): HTTP/2 stream 0 was not closed cleanly: #186

Open
josemanuelgis opened this issue Sep 18, 2023 · 6 comments

Comments

@josemanuelgis
Copy link

I am uploading some raster files with the gcs_upload() function, and for some reason some files generate the following error:

Auto-refreshing stale OAuth token.
Error in curl::curl_fetch_memory(url, handle = handle): HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Request failed [ERROR]. Retrying in 1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle): HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Request failed [ERROR]. Retrying in 2.1 seconds...
Error in curl::curl_fetch_memory(url, handle = handle) :
HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
In addition: There were 30 warnings (use warnings() to see them)
Error in value[3L] :
Request failed before finding status code: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

Thank you very much in advance

@jeroen
Copy link

jeroen commented Sep 18, 2023

One thing you can try is disabling http2:

set_config(http_version = 2L, override = TRUE)

And see if that fixes anything, or changes the error.

@josemanuelgis
Copy link
Author

Thank you very much for your answer

at the moment it doesn't work

@jeroen
Copy link

jeroen commented Sep 19, 2023

Can you show the error message you get with that set, and also which platform you use?

@mmoisse
Copy link

mmoisse commented Oct 25, 2023

I experience similar reproducible issues. For me it was mainly linked with smaller files and I resolved it by forcing googleCloudStorageR to use the resumable upload for all files options(googleCloudStorageR.upload_limit = 0L)

@josemanuelgis
Copy link
Author

Brilliant. Works. Thank you very much mmoisse and jeroen, for your help.

@dsaada
Copy link

dsaada commented Mar 14, 2024

I use the following code:

for (i in 1:10000){ gcs_upload(file=name_1, name = path_cs_1, predefinedAcl="bucketOwnerFullControl") }

Then I get an error:

Error in curl::curl_fetch_memory(url, handle = handle): Error in the HTTP2 framing layer

I saw some info, but not working for me:

httr::set_config(httr::config(http_version = 1))

I use the lastest version of CURL Package.

Could you help me please?

Thanks

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

No branches or pull requests

4 participants