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

Republishing to RPubs, Error: HTTP/2 stream 1 was reset #976

Closed
zhengxiaoUVic opened this issue Aug 24, 2023 · 7 comments · Fixed by #1016
Closed

Republishing to RPubs, Error: HTTP/2 stream 1 was reset #976

zhengxiaoUVic opened this issue Aug 24, 2023 · 7 comments · Fixed by #1016

Comments

@zhengxiaoUVic
Copy link

zhengxiaoUVic commented Aug 24, 2023

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 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.

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

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.

@jcheng5
Copy link
Member

jcheng5 commented Oct 12, 2023

I think there's a bad call to deploymentRecord in rpubs.R. Here's the function signature in deployments.R:

deploymentRecord <- function(name,
                             title,
                             username,
                             account,
                             server,
                             envVars = NULL,
                             hostUrl = NULL,
                             appId = NULL,
                             bundleId = NULL,
                             url = NULL,
                             version = deploymentRecordVersion,
                             metadata = list()) {

Here's the call site in rpubs.R:

    rpubsRec <- deploymentRecord(recordName, "", "", "rpubs", "rpubs.com", "rpubs.com", id, id,
                                 url, as.numeric(Sys.time()))

So here's how the parameters match up to the arguments:

name=recordName
title=""
username=""
account="rpubs"
server="rpubs.com"
envVars="rpubs.com"
hostUrl=id
appId=id
bundleId=url
url=as.numeric(Sys.time())
metadata=(omitted)

envVars="rpubs.com" seems wrong, and everything after that seems off by one. I suspect envVars was added later, and the call from rpubs.R was never updated.

@jgutman
Copy link
Contributor

jgutman commented Oct 12, 2023

I believe the change to envVars happened here: ee06339
in April of this year, likely rsconnect >= 1.0.0

@aronatkins
Copy link
Contributor

Additional changes to deploymentRecord occurred in #702...

@hadley
Copy link
Member

hadley commented Oct 12, 2023

It's probably my fault 😭

@aronatkins
Copy link
Contributor

Argument removal (when and last-sync) in 8f19a2a

@aronatkins
Copy link
Contributor

It's probably my our fault 😭

The collective!

image

aronatkins added a commit that referenced this issue Oct 12, 2023
* Fix #976: Republishing to RPubs is broken from RStudio

* Satisfy linter

* lint and news

* the timestamp is not id but an obsolete when

---------

Co-authored-by: Aron Atkins <aron@gweep.net>
@JBell39
Copy link

JBell39 commented Oct 25, 2023

I don't know what I am doing wrong. Here is my updated dcf:

name: Document
title:
username:
account: rpubs
server: rpubs.com
hostUrl: rpubs.com
appId: https://api.rpubs.com/api/v1/document/1099849/f24f13c92bd4430a8e6d83d25154f1fc
bundleId: http://rpubs.com/publish/claim/1099849/37d672b76e4748539e6d5983395371e5
url:  https://rpubs.com/bellj39/1099849
version: 1

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

Successfully merging a pull request may close this issue.

6 participants