RStudio Connect Collaborative Publishing - Troubleshooting When Two Shiny App Collaborators Fail to Deploy to the Same Endpoint

I need help to publish on Rstudio Connect. I am a collaborator to an App on Rstudio Connect, the author did make me a collaborator to the App. We use the deployApp function to publish, however when I use deployApp it creates another version of the App that only I can see and does not make changes to the original App.
When I use the deployApp function I want to be able to make the changes to the original and not create another version.
Please help.

Hello @Zuki! Thanks for sharing, and sorry for the trouble!!

https://docs.rstudio.com/connect/user/publishing.html#publishing-collaboration

Did you see this section in the docs before? It might be helpful! Specifically, are you version controlling / sharing the rsconnect folder? That is the magic that lets you automatically deploy to the same endpoint. From those docs:

This rsconnect folder should be added and committed into version control. It does not contain any private or secure information. However, it does contain the URL for the RStudio Connect server and the content URL. This information allows future publications to easily target the same endpoint.

If you do not have the rsconnect folder from the original deployment and want to create it, you should be able to specify the appId in the deployApp function. The value you want to choose is in the URL when you navigate to the content in the browser. For example, if my content URL is:

https://connect.example.com/connect/#/apps/1980/access

Then the value I want for appId is: 1980

Please let us know if that helps or if you have additional questions after trying that approach!

2 Likes

Hello thank you for your response

the author did share the rsconnect folder with me, we both do not understand why I cannot deploy to the same endpoint

Interesting! When you click the "drop down arrow" next to the publish button, do you see the endpoint in question?

image

What happens if you deployApp with the appId as I mentioned above? If you navigate into the rsconnect folder, do you see a .dcf file that describes the endpoint you are trying to use? Can you open it / read it?

2 Likes

It happens sometimes to that the dcf file is put in a folder attached to a username and that even if present in the project directory, it is not seen by RStudio IDE because configured use for connect is different. I already encountered this behavior.
In complement of what @cole is asking, can you share also the path of the dcf files to see if it has been put in such case ?

Usually, publishing on the same server with the id specified in deployApp solves this situation. At least in my experience.

@cole if you are interesting by the behavior I am describing, I can try to make a reproduceable example.

1 Like

Thanks @cderv! I am definitely interested! I think a reproducible example would be helpful to improving this in the rsconnect package for sure!! :smiley:

1 Like

We managed to resolve the issue.

We did two changes to our code, we removed the connect username line code and then used the deployApp with the appId, then used the authors appId from the .dcf file

2 Likes

Glad to know !

Just to help me debug further and try reproduce the issue, would you help me clarifiy some points ?

Which line ? in your code ? in the dcf file itself ?

I am still interested in the path the dcf was put in. Do you have that ?

After publishing with deployApp and appId only, what does this step means ?

Thanks!

This is how our code looks now:

rsconnect::deployApp("public",
appFiles = list.files("public", recursive = T),
appPrimaryDoc = "index.html",
appName = "Example app name",
appTitle = "Example app title",
#account = "Example account number",
server = "Example server path",
appId = 1)

Before we inserted the appId line, we were using the #account (with my account number)

2 Likes

Thank you for the input !