rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Not able to write a pin - Error in rsc_check_status(req): Not Found (HTTP 404). #581

Closed laurejo1 closed 2 years ago

laurejo1 commented 2 years ago

Hello!

Please could you help to run a basic pin example on Rsconnect? The issue might come from the Rsconnect version: RSC 1.8.0.4-21 compared to the README.md example: RSC 1.9.0.1

Please find below the reprex example.

Cheers, Johann

# Info about session ----
library(reprex)
#> Warning: package 'reprex' was built under R version 4.0.5
packageVersion("reprex")
#> [1] '2.0.1'
library(pins)
#> Warning: package 'pins' was built under R version 4.0.5
packageVersion("pins")
#> [1] '1.0.1'
library(rsconnect)
#> Warning: package 'rsconnect' was built under R version 4.0.5
packageVersion("rsconnect")
#> [1] '0.8.25'
library(rstudioapi)
#> Warning: package 'rstudioapi' was built under R version 4.0.5
packageVersion("rstudioapi")
#> [1] '0.13'

rsconnect::servers()$name
#> [1] "rstudio.mycompany.com" "shinyapps.io"
rstudioapi::versionInfo()$version
#> "1.4.1103"
rstudioapi::versionInfo()$mode
#> "desktop"
sessionInfo()$R.version$version.string
#> [1] "R version 4.0.3 (2020-10-10)"
sessionInfo()$platform
#> [1] "x86_64-w64-mingw32/x64 (64-bit)"
sessionInfo()$running
#> [1] "Windows 10 x64 (build 19042)"

# Connect to board ----
# by default connecting well, but similar issue whether or not the API key is provided
board2 <- pins::board_rsconnect()
#> Connecting to RSC 1.8.0.4-21 at <https://rstudio.mycompany.com>
board2
#> Pin board <pins_board_rsconnect>
#> Cache size: 0
#> Pins [1]: '/'

board <- pins::board_rsconnect(key = Sys.getenv("CONNECT_API_KEY"),
                               server = Sys.getenv("CONNECT_SERVER"))
#> Connecting to RSC 1.8.0.4-21 at <https://rstudio.mycompany.com>
board
#> Pin board <pins_board_rsconnect>
#> Cache size: 0
#> Pins [1]: '/'
# Write a pin ----
pins::pin_write(mtcars, name = "mtcars", board = board, type = "rds")
#> Error in rsc_check_status(req): Not Found (HTTP 404).
# Search a published pin ----
pins::pin_find("mtcars", board = board)
#> # A tibble: 0 x 3
#> # ... with 3 variables: name <chr>, description <chr>, board <chr>
# Info about a published pin ----
pins::pin_info("mtcars", board = board)
#> Error: Pin 'mtcars' was not found.
# Retrieve a pin ----
pins::pin_read("mtcars", board = board)
#> Error in rsc_check_status(req): Not Found (HTTP 404).
j-andrews7 commented 2 years ago

See #539, likely a firewall issue.

laurejo1 commented 2 years ago

Thanks @j-andrews7 , indeed likely a firewall issue. Thanks again.

laurejo1 commented 2 years ago

An update for those who got the error: We have upgraded R Studio Connect to the version 2021.09.0. And Now it is working fine with the code above. The issue was due to the R Studio Connect version RSC 1.8.0.4-21. Thanks again @j-andrews7

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.