Skip to content

pin_write error while publishing #939

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

Closed
stahengik opened this issue Jul 31, 2023 · 8 comments
Closed

pin_write error while publishing #939

stahengik opened this issue Jul 31, 2023 · 8 comments
Labels
reprex needs a minimal reproducible example

Comments

@stahengik
Copy link

stahengik commented Jul 31, 2023

We have recently upgrade our posit connect server to 2023.03.0 and we have issues with pin_write when we publish the content on posit connect.

In my rmd that I am trying to publish, I have this code chunk,

> board %>% pin_write(x = data_to_pin,
> name = "name for pin data",
> type = 'rds',
> title = "title for pin data",
> force_identical_write = TRUE)
> 

> Quitting from lines 105-122 [unnamed-chunk-8] (Fetch-and-Pin-GVL-H2-Comp-Data.Rmd)
> Error in `curl::curl_fetch_memory()`:
> ! necessary data rewind wasn't possible
> Backtrace:
> 1. board %>% ...
> 2. pins::pin_write(...)
> 4. pins:::pin_store.pins_board_connect(...)
> 9. pins:::rsc_content_update(board, guid, metadata, access_type = access_type)
> 10. pins:::rsc_PATCH(board, rsc_v1("content", guid), body = body)
> 11. pins:::rsc_POST(...)
> 12. httr::VERB(...)
> 13. httr:::request_perform(req, hu$handle$handle)
> 15. httr:::request_fetch.write_memory(req$output, req$url, handle)
> 16. curl::curl_fetch_memory(url, handle = handle)

I am using "force_identical_write " argument because, it kept warning that the hash did not change so it did now write the pin and I though that might have been the issue.

The code chunks run fine and are able to write the pins when running on local Rstudio IDE but it fails while publishing.

We have installed and updated curl on the server but it does not help:

> [q9q-extra@mss6300 bin]$ sudo yum install curl
> Updating Subscription Management repositories.
> Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                         40 kB/s | 4.5 kB     00:00
> Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                            37 kB/s | 4.1 kB     00:00
> Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)                         41 kB/s | 4.5 kB     00:00
> Package curl-7.61.1-12.el8_2.4.x86_64 is already installed.
> Dependencies resolved.
> Nothing to do.
> Complete!
> [q9q-extra@mss6300 bin]$ sudo yum update curl
> Updating Subscription Management repositories.
> Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                         50 kB/s | 4.5 kB     00:00
> Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                            46 kB/s | 4.1 kB     00:00
> Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)                         49 kB/s | 4.5 kB     00:00
> Dependencies resolved.
> Nothing to do.
> Complete!
@hadley
Copy link
Member

hadley commented Aug 8, 2023

Is there some chance the server you used in board_connect() now redirects?

@stahengik
Copy link
Author

stahengik commented Aug 8, 2023

I can not say that I understand the question. but following are the details that may help answer.

Lets say my server name is Http://xyz9818, when I type this in my browser, the address becomes
http://xyz9818/connect/#/content/listing?filter=min_role:viewer&filter=content_type:all&view_type=compact

Does this means its redirecting ?

Also, When I provided server and key in the board_connect, it does not work. board <- board_connect( auth = 'auto', server = 'SERVER', key = 'KEY') does not work.

It at least work on my machine when I am using board <- board_connect() without any arguments and it picks the server on it own from config/settings. I am not sure why it does not work when I do provide the server name and key!

Also, Please checkout some additional information here:
Posit support ticket for curl
Posit support ticket for board_connect()

@stahengik
Copy link
Author

The older Rstudio Connect server does not redirects. The new server is on a new machine not connected to the old one in any way. I have removed the old connection from my machine.

@hadley
Copy link
Member

hadley commented Aug 10, 2023

Looking at the information sent to @kmasiello via support ticket, this looks more like an issue with your proxy.

@stahengik
Copy link
Author

Thanks for your support so far. I am trying options suggested by Katie.

@hadley
Copy link
Member

hadley commented Oct 26, 2023

@stahengik are you still seeing this problem with the latest httr2 from CRAN?

@hadley hadley added the reprex needs a minimal reproducible example label Oct 26, 2023
@stahengik
Copy link
Author

stahengik commented Oct 27, 2023 via email

@hadley
Copy link
Member

hadley commented Oct 27, 2023

Yay!

@hadley hadley closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex needs a minimal reproducible example
Projects
None yet
Development

No branches or pull requests

2 participants