Popup window not appearing in R Shiny app - r

I am trying to deploy a Shiny app via https://www.shinyapps.io, but am experiencing difficulty. Note: things work fine locally on my machine.
Specifically, my app calls one of my R packages and runs said package under the hood. The package prompts a user to input a FASTA file via base::file.choose().
My problem is similar to the one outlined here
Error when using file.choose() in Shiny Web App (deployed online)
Is there a simple way to solve this without having to use shiny::fileInput()? I don't want to have to change any of my package code.
My app is here: https://hacsim.shinyapps.io/hacsim-rshiny-app/
To reproduce the error I get, click "RUN SIMULATION", then navigate to "Sub interface" and click "Run". A pop-up window should appear. Instead the error
character(0)
Error: An error has occurred. Check your logs or contact the app author for clarification.
appears in the Result panel.
Any help is welcomed and greatly appreciated.

Related

How to run a shiny app in IntelliJ (PyCharm)

I have a basic shiny app (ui.r and server.r) that I am able to run in RStudio.
But seems like I can't run it in IntelliJ.
I have installed the R language support plug-in and I can run r scripts.
But when I try to run ui.r, the only thing I get is html output in the console.
Does anyone recognise this? I probably forgot to configure something?
I do have experience running java (web) apps with IntelliJ. With tomcat setup e.g.
In the run configurations, I didn't see anything specific for a shiny server or something R related. So I guess that is not where I should search ...
Any idea? Is more information needed?
Thx in adavance.
edit:
The answer is here: https://youtrack.jetbrains.com/issue/R-895
To run a shiny App (R framework) on PyCharm you must enable R first and indicate where is the R interpreter located:
R options appears on the bar status. One of them is R Console. Click on it. Write getwd() command to see if you are in the root directory of the project. If not, set it with setwd() command:
Next, write runApp() and DO NOT press enter yet. You must press alt+enter and then click on load Shiny:

runExample() shows listening to server, but does not open any apps

I am trying to learn Shiny in RStudio. Yesterday, I was going through some tutorials on the Shiny website and I could access all the example applications in the package and run them on RStudio locally. Today, when I go into RStudio and try and run the examples in Shiny, it shows Listening on http....(ip here) in the console but nothing opens. I can't find the answer anywhere.
The code is as follows:
library(shiny)
runExample("01_hello")

ERROR: An error has occurred. Check your logs or contact the app author for clarification

while publishing app on web getting error called: check your log or contact the app auther.please find above image links
ERROR: An error has occurred. Check your logs or contact the app author for clarification.
if anyone can help me to resolve this error I'd be grateful.
There are multiple reasons for this error. Rstudio has provided multiple reasons (link below) but most common are:
Environment variables not the same in shiny web vs. local (make sure working directory is set to ~/, start a new rsession and run only the ui.R, server.R or app.R and see if you can preview in local before publishing.)
Update libraries to latest versions and hopefully you are not using the libraries that are not yet available in CRAN.
https://support.rstudio.com/hc/en-us/articles/229848967-Why-does-my-app-work-locally-but-not-on-shinyapps-io-

Fatal error when deploying a shiny app with Rstudio

I have a shiny app (divided into ui.R, server.R and helpers.R) which works on my local machine. The app does not load any libraries besides library(shiny). I am unable to deploy it to shinyapps.io. That is what I do
I log myself into shinyapps.io (via the website www.shinyapps.io)
I run library(rsconnect) on the R console.
I copy the Tokens code (rsconnect::setAccountInfo...) from the www.shinyapps.io page into the R console and run it.
I run the app in Rstudio (1 warning: Warning in body(fun) : argument is not a function). The app runs as expected.
I use the "publish" button in the app window and get a new window saying: "R session aborted. R encountered a fatal error. The session was terminated"
Sorry, I have no idea about where to look for the error. Can you give me a hint what causes the problem? Which additional information would you need to help me?
Thanks a lot!
update: I just saw that there is a second "publish"-button in Rstudio if you have one of the app-files in the editor (without running it). When I use this one, I get the same crash, but with some more information: unexpected exception: boost::filesystem::unique_path: key is not valid in specified status (sorry, that is my own translation from German).
One way of deploying an app to the shinyapps.io server is not to use the button in RStudio, but to do it via the console. Here the steps that are working for me now (RStudio 1.0.143):
Log in on shinyapps.io (via the website www.shinyapps.io)
Run library(rsconnect) on the R console.
Copy the Tokens code (rsconnect::setAccountInfo...) from the www.shinyapps.io page into the R console and run it.
Run rsconnect::deployApp('path to your app') on the R console.
Pushing the publish button in RStudio still results in a crash of R.

Shiny (Rstudio) apps not working

I am working on the Shiny tutorial for RStudio. I updated my RStudio, as indicated in the tutorial. The current version I have is 0.98.945. When I run the supplied examples like runExample("01_hello"), it opens my web browser and shows all the HTML content, but does not seem to be processing the R code.
When I proceed further in the tutorial for creating my own app runApp("App-1"), I get an error message on the web page: ERROR: could not find function "fluidPage". After some sleuthing, I found a posting on another site indicating that I need to download the developer version of shiny from GitHub, found here. I ran the code snippet for that installation -- and still no luck. Any suggestions would be greatly appreciated!
After updating Rstudio to the newest version redo the install.packages("shiny") and library("shiny"). Once you do this it should eliminate the need to manually do the runApp code and a button should appear were the run button usually is that says run app. before you can click run app though you have to set your working directory to the location were you have saved your server.R and ui.R by going to session -> set working directory -> choose directory. chose the folder location then click run app.
Edit: there should be no need for you to run that code from GitHub
I had the same problem. After installing shiny, I had to restart Rstuido for the "Run App" button to appear.
I had also some wired troubles when starting using shiny. Finally I got all fixed by removing all my previous libraries and installations and re-install only the latest versions

Resources