Closed zhengxiaoUVic closed 9 months ago
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.
I believe the change to envVars happened here: https://github.com/rstudio/rsconnect/commit/ee063397652c2874e1103b2189139b496830e9c7 in April of this year, likely rsconnect >= 1.0.0
Additional changes to deploymentRecord
occurred in https://github.com/rstudio/rsconnect/pull/702...
It's probably my fault 😭
Argument removal (when and last-sync) in https://github.com/rstudio/rsconnect/commit/8f19a2a6b2e7d857f90f1246d994420eddd686fb
It's probably ~my~ our fault 😭
The collective!
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
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.
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.