Shiny Server not showing plots - need help problem solving

2,660 views
Skip to first unread message

Tim Beveridge

unread,
May 18, 2014, 9:17:20 PM5/18/14
to shiny-...@googlegroups.com
Hi Guys - First of all AMAZING product. Really. Congrats.

Second thing, I've developed a reasonable sized application and as I've been developing it I've been deploying it to an instance of shiny server and testing it. All seemed fine. The latest deployment however was a fairly large one and parts of it seem to have stopped working on the server. Everything works fine in the dev environment but one particular part doesn't work on the server. Thing is, there are no error messages (the logs are all clear), just that the plots (created as part of some dynamic tabs), don't show. Blank. All other parts of the application seem to be solid.

So, rather than posting a whole bunch of code for you guys to review, I thought I'd ask how I could possibly go about tracking down the cause. It's possible that the server it's sitting on is too old and dusty and I need an upgrade but would like to confirm before I do that. Hosting on Ubuntu.

Cheers,

Tim


Jeff Allen

unread,
May 19, 2014, 12:36:13 AM5/19/14
to shiny-...@googlegroups.com
Which logs are you looking at? Relevant ones would include:

1. The main server log in /var/log/shiny-server.log
2. The application logs stored in /var/log/shiny-server/* . This dir would contain a separate file for each R process that exited unexpectedly.
3. The console of the web browser that's not showing the plots.

Hopefully you'll be able to find some info in one of those; let us know.

Jeff

Tim Beveridge

unread,
May 20, 2014, 8:02:53 PM5/20/14
to shiny-...@googlegroups.com
Hey Jeff. Thanks for getting back to me. Sorry it's taken me a bit to get back to you.

I've checked all logs (server and application) and neither of them are showing anything at all. Everything in them is very normal. No signs of anything awry.

As for the console, it's showing nothing either. No errors or warnings.

Is there any kind of extended debug mode I can enable for the server?

The part of the code that is failing is a little bit more complicated than most. I'm dynamically generating a series of tabs (one for each category in the data I'm using), as part of that I dynamically generate a series of functions which actually display the plots in those tabs using something similar to the tip from Winston Chan here 

Cheers,

Tim

Tim Beveridge

unread,
May 20, 2014, 8:23:41 PM5/20/14
to shiny-...@googlegroups.com
So I've just done some cross-browser testing on the problem and it seems that in all cases, everywhere I've used a tabset, the first tab displays as it should and the subsequent tabs are empty. Not all tabs are using the more complex approach described previously, some are just displaying some pretty straight-forward plots.

Tim Beveridge

unread,
May 20, 2014, 11:00:07 PM5/20/14
to shiny-...@googlegroups.com
Last update for the day. After coming across this post - I did some testing and here's what I found.

- If I set the selected value for the tab to something other than the first tab, the selected tab displays correctly and none of the other tabs work
- If I follow the directions and ideas in the above post and set width and height, then the widths and heights of the area to present the plot change as expected, but no plot actually appears.
- If I set width and height to 100% the plot are reduces to 0 indicating that no plot image is being produced.

Could this be a bug in Shiny-Server? Seems that the functions that generate the plot are not called for anything other than the first tab in a tabset.

I've also created a brand new app with some simple tabs and charts and can't replicate the problem. Leaving me to wonder if it's something to do with the complexity of the application.

Happy to send through data and the app files if needed.

Cheers,

Tim

Thomas Siegmund

unread,
May 21, 2014, 6:10:19 AM5/21/14
to shiny-...@googlegroups.com
Hi Tim,

I've seen something similar recently when I run an app on an outdated shiny server. Maybe you are running shiny server 0.4 on one of your systems?

Best

Thomas

Tim Beveridge

unread,
May 21, 2014, 6:36:23 AM5/21/14
to shiny-...@googlegroups.com
Hey Thomas - thanks for the idea.

I wondered that too - so I checked it out and indeed I was running some older versions. I updated R, Shiny, and Shiny Server, and the error still persists, and still no errors being reported by either of the shiny logs or the JS console.

Tim Beveridge

unread,
May 26, 2014, 7:59:47 PM5/26/14
to shiny-...@googlegroups.com
Finally solved it. Silly error. I was embedding my app in some other bootstrap code for display and including the bootstrap js which was conflicting with the bootstrap js within shiny. Deleted the line and all is fine :-)

Thanks for your help.

acik...@sabanciuniv.edu

unread,
Apr 12, 2019, 9:26:40 AM4/12/19
to Shiny - Web Framework for R
Hi Tim, I have the same problem. My shiny app is working well in my computer. Also when I deploy my app, there is no problem with my datatables. However, my plots are not seen because of an error on deployed version of my app. So what can be the problem of it? Thanks.

Natalie Kasana

unread,
Jul 31, 2019, 2:37:57 PM7/31/19
to Shiny - Web Framework for R
Hi,
I cam across this post when I was searching for a solution to this problem myself. All my plots disappeared, but everything else (side panel with inputs, etc) was working fine. And no error messages. And it was working fine before I made a series of changes. 

The solution ended up being that I had used the same Input ID or Output ID twice in two different tabs. I learned that one can only call an Input ID or Output ID once, and if you want to use the same one, create a new copy with a slightly different name. Once I did that (and that was only on 1 panel), the entire thing started working again. Hope that helps someone else - make sure all your Input IDs and Output IDs are only used once.

Megan Hepner

unread,
Jul 31, 2019, 3:22:42 PM7/31/19
to Natalie Kasana, Shiny - Web Framework for R
Thanks! 

Apparently, my problem was that I did not list one of the libraries I was unknowingly using. Once I added the library(DT) to my app.R code it worked perfectly. 

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/3a466efc-c42b-42fe-bf48-a60fe45a441e%40googlegroups.com.


--

Megan Hepner
Program Coordinator, SCCOOS 
Southern California Coastal Ocean Observing System 

Scripps Institution of Oceanography
8880 Biological Grade, 155 MESOM
La Jolla, CA 92093-0206
Office: 858-534-9808
Cell: 301-642-6611

Reply all
Reply to author
Forward
0 new messages