Thanks so much for the reply Cole.
It doesn't seem to be related to board_register(). Here's a reprex with the board_register part included.
library(pins)
rsconnect::servers()$name
#> [1] "rstudio-prod.northeurope.cloudapp.azure.com"
#> [2] "shinyapps.io"
board_register_rsconnect(name = "rsconnect",
server = "rstudio-prod.northeurope.cloudapp.azure.com",
account = "hlynur.hallgrimsson")
#Note that pinning actually works, despite the error being shown
pin(mtcars, name = "mtcars", board = "rsconnect")
#> Error in pin_download_one(p, ...): Client error: (404) Not Found. Failed to download remote file: https://rstudio-prod.northeurope.cloudapp.azure.com/connectrstudio-prod.northeurope.cloudapp.azure.com:443/connect/content/5/data.txt
# I can see the pin.
pin_find("mtcars", board = "rsconnect")
#> # A tibble: 1 x 4
#> name description board type
#> <chr> <chr> <chr> <chr>
#> 1 hlynur.hallgrimsson/mtcars "" rsconnect ""
# It's only in the GET request that the url gets mangled
pin_get(name = "hlynur.hallgrimsson/mtcars", board = "rsconnect")
#> Error in pin_download_one(p, ...): Client error: (404) Not Found. Failed to download remote file: https://rstudio-prod.northeurope.cloudapp.azure.com/connectrstudio-prod.northeurope.cloudapp.azure.com:443/connect/content/5/data.txt
Created on 2021-02-10 by the reprex package (v0.3.0)
Here's the same code with the addition of outputs from running it in httr::with_verbose()
library(pins)
rsconnect::servers()$name
#> [1] "rstudio-prod.northeurope.cloudapp.azure.com"
#> [2] "shinyapps.io"
board_register_rsconnect(name = "rsconnect",
server = "rstudio-prod.northeurope.cloudapp.azure.com",
account = "hlynur.hallgrimsson")
#Note that pinning actually works, despite the error being shown
pin(mtcars, name = "mtcars", board = "rsconnect")
#> Error in pin_download_one(p, ...): Client error: (404) Not Found. Failed to download remote file: https://rstudio-prod.northeurope.cloudapp.azure.com/connectrstudio-prod.northeurope.cloudapp.azure.com:443/connect/content/5/data.txt
# I can see the pin.
pin_find("mtcars", board = "rsconnect")
#> # A tibble: 1 x 4
#> name description board type
#> <chr> <chr> <chr> <chr>
#> 1 hlynur.hallgrimsson/mtcars "" rsconnect ""
# It's only in the GET request that the url gets mangled
httr::with_verbose(pin_get(name = "hlynur.hallgrimsson/mtcars", board = "rsconnect"))
#> -> GET /connect/__api__/applications/?count=10000&filter=content_type:pin&search=mtcars HTTP/1.1
#> -> Host: rstudio-prod.northeurope.cloudapp.azure.com
#> -> User-Agent: libcurl/7.64.1 r-curl/4.3 httr/1.4.2
#> -> Accept-Encoding: deflate, gzip
#> -> Cookie: rscid-legacy=**I have removed the cookie info**
#> -> Accept: application/json, text/xml, application/xml, */*
#> -> Date: Wed, 10 Feb 2021 02:24:32 GMT
#> -> X-Auth-Token: **I have removed this info**
#> -> X-Auth-Signature: **I have removed this info**
#> -> X-Content-Checksum: **I have removed this info**
#> -> Content-Type: application/json
#> ->
#> <- HTTP/1.1 200 OK
#> <- Server: nginx/1.19.6
#> <- Date: Wed, 10 Feb 2021 02:24:32 GMT
#> <- Content-Type: application/json; charset=utf-8
#> <- Content-Length: 1023
#> <- Connection: keep-alive
#> <- Cache-Control: no-cache, no-store, must-revalidate
#> <- Expires: 0
#> <- Pragma: no-cache
#> <- X-Content-Type-Options: nosniff
#> <- X-Frame-Options: DENY
#> <-
#> -> GET /connectrstudio-prod.northeurope.cloudapp.azure.com:443/connect/content/5/data.txt HTTP/1.1
#> -> Host: rstudio-prod.northeurope.cloudapp.azure.com
#> -> User-Agent: libcurl/7.64.1 r-curl/4.3 httr/1.4.2
#> -> Accept-Encoding: deflate, gzip
#> -> Cookie: rscid-legacy=**I have removed this info**
#> -> Accept: application/json, text/xml, application/xml, */*
#> -> Date: Wed, 10 Feb 2021 02:24:32 GMT
#> -> X-Auth-Token: **I have removed this info**
#> -> X-Auth-Signature: **I have removed this info**
#> -> X-Content-Checksum: **I have removed this info**
#> -> Content-Type: application/json
#> ->
#> <- HTTP/1.1 404 Not Found
#> <- Server: nginx/1.19.6
#> <- Date: Wed, 10 Feb 2021 02:24:32 GMT
#> <- Content-Type: text/html
#> <- Content-Length: 1781
#> <- Connection: keep-alive
#> <- X-Content-Type-Options: nosniff
#> <-
#> Error in pin_download_one(p, ...) :
#> Client error: (404) Not Found. Failed to download remote file: https://rstudio-prod.northeurope.cloudapp.azure.com/connectrstudio-prod.northeurope.cloudapp.azure.com:443/connect/content/5/data.txt
As mentioned above the URL gets mangled. The actual url gets a "/connect" added in front of it.
I have opened a ticket with RStudio support, but as posting a reprex is much nicer here than in the email support, I'm just going to refer to this most recent post.
Thanks again for responding Cole.