Not able to publish flexdashboard file to shinyapps.io: getting prompt for RStudio Connect server

Hi Experts here. Earlier I was able to publish R markdown file similar to R shiny file(Click on Publish button). But today I got this message and i am trying to connect but it is not.I am getting below pop up to connect to R studio connect. Below are the steps i follow to publish

Step 1 (Post clicking publish button)
image

Step 2 (Post clicking "Publish just this document)
image

I am getting stuck at step 2. Earlier I never used to get this pop up. Please guide

This pop up means your RStudio is no more connected to RStudio Connect.
You need to provide in the popup the url of your RStudio Connect Server. Do you have it ?

This will then ask you to authenticate using your RStudio Connect account. After that, you RStudio IDE will know how to connect with your account to the publishing server and it will all be good!

You can follow the documentation
https://docs.rstudio.com/connect/user/connecting.html#connecting-your-account

Are you working from local RStudio IDE or from a RStudio Server ?

1 Like

Hi,

I am working from local RStudio IDE.

How do I find url to RStudio Connect Server.?

Also I referred the document that you suggested. It is telling to use http://rstudioconnect.server.org but not able to connect

I also connectedusing my shinyapps.io (Please refer below)

I may have missed something... :thinking:

Where do you usually publish document ?

I guess you use shinyapps.io for shiny apps, but did you already publish a document somewhere ?
RStudio Connect is pro product, and I assumed you had one. But you may not...

Yes I use shinyapps.io to publish. I have published other RMD file earlier. But this file I am not able to publish

Shinyapps.io is only to publish shiny applications I think. You can't publish static Rmd file.
I guess you could have published Rmd with runtime: shiny as this is a shiny apps build using Rmarkdown container. But this is different than static html document.

I guess you could use Rpubs service for that
https://rpubs.com/about/getting-started

Do you have a url from one of your former Rmd already published ?

Actually I have published RMD file earlier. Below is the link for that

https://vinayapps.shinyapps.io/ABCIncorporation/

And Yes, In my Flexdashboard/Mardown, I have used runtime shiny

Yes this document is a Rmd files, for a flexdashboard, this is a shiny apps.

There is runtime: shiny in the yaml header and some selectInput in the code.
https://rmarkdown.rstudio.com/flexdashboard/shiny.html

You can't publish non shiny Rmd document (static files) in shinyapps.io.

You may have this new pop up because your are trying to publish such document

But I have also included runtime: shiny in my present file. It should get published right? Not sure what wrong I am doing here

Can you share the yaml header of your new file ?
Are you sure the yaml is correct ? It is very sensitive to indentation.
Also runtime: shiny must be put at the first level of the yaml.
You can compare with the published example you shared

---
title: "ABC INC"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: scroll
    source_code: embed
    theme: cosmo
---
2 Likes

FWIW I can reproduce this issue, I'm not longer able to publish runtime: shiny Rmd documents to shinyapps.io, since this was working before on the same RStudio version, I suppose it has to do with a package update

2 Likes

@andresrcs Do you have the same popup ?

@andresrcs I manage to publish right now
https://cderv.shinyapps.io/test-flex-shiny/

This is with rsconnect 0.8.15

Perfect, Now I am able to see after adding runtime: shiny at the top. Earlier it was at the bottom so that was the issue. But now while publishing I get this error

Line 34 paths should be to files within the project directory

My Line 34 is and I have also included readxl package

df <- read_excel("D:/Analytics/New folder/df.xlsx")

But my earlier file where I was able to publish RMD file . There df was like below

df <- read_excel("df.xlsx","Monthly",range = "A1:K2188")

May I know how is it making difference?

You can't publish a document that has a file path that is one you personal drive, on your computer.
Everything must be published and accessible from the document on the serveur.

2 Likes

This is weird, I was trying to publish the same sample Rmd file I had published before for previous vinayprakash808's topics, I don't understand why it was working before but I suppose it's not important now.

Perfect thanks a lot. It helped

1 Like

Glad it work!
Yaml header can be tricky!

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

Done thanks..............

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.