Republishing to RPubs, Error in curl::curl_fetch_memory(url, handle = handle)

AN ERROR OCCURS when I knit an Rmd into HTML and republish (update existing) it to RPubs. There is no problem with the initial upload or republishing (updating existing) long ago Rmd.

Error in curl::curl_fetch_memory(url, handle = handle) : HTTP/2 stream 1 was reset Calls: <Anonymous> -> http -> <Anonymous> Execution halted

I have tried the simplest HTML document. So, the error is not due to the file size.

title: "Republishing"
output: html_document
date: "2023-08-08"

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

## R Markdown

> curl::curl_version()
[1] "8.1.2"

[1] "(SecureTransport) LibreSSL/3.3.6"

[1] "1.2.11"

[1] NA

[1] NA

[1] "x86_64-apple-darwin22.0"

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

[1] TRUE

[1] TRUE


R version 4.3.1
RStudio version 2023.09.0+463
macOS Ventura 13.5.2
MacBook Air M2

Thanks for any comments.

UPDATE: developers started to fix the issue: Republishing to RPubs, Error: HTTP/2 stream 1 was reset · Issue #976 · rstudio/rsconnect · GitHub

I fixed the republishing issue by downgrading the "rsconnect" R package.

remove.packages("rsconnect") #Remove Installed Packages
remotes::install_version("rsconnect", version = "0.8.29") #Installing a Specific Version of a Package

Any higher versions of rsconnect (e.g., 1.0.0, 1.0.1, 1.0.2, 1.1.0 and latest 1.1.1) will cause the error regarding "HTTP/2 stream 1 was reset". After downgrading "rsconnect", RMD files with failed republishing will still not be republished. You need to upload a fresh one.

I have exactly the same issue. For me, downgrading to rsconnect 0.8.29 does not solve the error, it just changes the curl_fetch error to

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failure when receiving data from the peer
Calls: <Anonymous> ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Timing stopped at: 0.03 0.14 2.03
Execution halted

Curiously, the problem was solved after updating a bunch of other packages ("DT", "labeling", "markdown", "mvtnorm", "pan", "plyr", "pROC", "prodlim", "Rcpp", "RcppArmadillo", "recipes") -- sorry I did not have time to do this systematically to pin down the culprit, it's certainly not pROC :grinning:

1 Like

I updated my R version, R Studio version, and installed new versions of all the associated packages for R Markdown and Rpubs when prompted. The initial document rendered and published fine. I added the line "Minor change for testing purposes" on page 1 and attempted to republish. The error remains. Since downgrading isn't an option and everything down to the last package is fully up to date, I'm calling this an RPubs error.

FWIW I have no issue publishing to RPubs right now. The service seems up and running.
You should probably open a new thread in the community with your specific information (log message, content, etc...) so that the support team can try to help when they can.

Also you should maybe consider Publishing on Posit Cloud - this is a new feature, and you can publish from Posit Cloud environment, or from external environments:
Also look at Publishing updates in

Hope it helps

I just tried "Update Existing" and it still reports an error.

See the screenshot here

rsconnect version 0.8.29 seems to be the only fix for now.

As with OP, I have no problem publishing. It is only attempting to publish updates that is an issue. Are you able to do that?

FWIW, I have tried from two computers, one running Windows 11 and one running Kubuntu 22. Both are fully up to date versions of R, R Studio, and all packages. Think I should provide both sets of logs?

Thanks for the additional information. Indeed it seems updating from the IDE is not working. I don't get the same error message as you though. No message at all.

Can you try using rsconnect::rpubsUpload() function to publish and update ?
This is from: Upload a file to RPubs — rpubsUpload • rsconnect

First publishing will result in an id which is an API URL. You can reuse this id to republish.
This seems to work this way. So I would tend to think this is an IDE issue.

I would open an issue in GitHub - rstudio/rstudio: RStudio is an integrated development environment (IDE) for R directly with demo showing that publishing the Rmd template, modifying and republishing does not work.


1 Like

Thank you for your help. Before trying the manual method you suggest, I tried again on a third brand new system using the "Publish" and "Republish" buttons. It didn't work either. The manual method did on the first try.

I will try to submit a bug report, though I haven't had a lot of luck even getting to the stage of submitting one of those before. I wouldn't even bother, but I'm a huge fan of R Studio and Posit so take any snark in my test posts as just trying to have fun instead of being annoyed.

For anyone interested, here is my test using only R Studio (which will stay up until I'm able to update with the button.) and my successful test using the manual method.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.