Naveen Mathew
Naveen Mathew

Reputation: 372

Shiny application on EC2 - Error: rgl.open() failed

I'm currently building a Shiny application. I'm using plot3d function from rgl package. I faced a series of issues while running it on EC2 (OS: Ubuntu 14.04, R version: 3.2.0)

1) I used plotOutput - renderPlot combination in ui.R and server.R respectively. I got the error message while running on EC2: Error: rgl.open() failed

2) I changed to webGLOutput - renderWebGL combination from shinyRGL package, but it showed "You must enable Javascript to view this page properly" in my local machine. I did not deploy it on EC2

3) I tried steps 1 and 2 after reverting to an older version of rgl. Next I tried steps 1 and 2 after updating to a newer version of rgl from R-Forge. The same set of errors popped up

4) I tried steps 1, 2 and 3 with options(rgl.useNULL=TRUE) in server.R and without it. There was no error when it was set to TRUE, but there was no output as well

Can someone suggest a way to get plot3d working on EC2?

Upvotes: 3

Views: 285

Answers (1)

zerweck
zerweck

Reputation: 726

The current Version of rgl and shinyRGL are not compatible, see this thread: https://groups.google.com/forum/#!topic/shiny-discuss/GJQ6tJNU7jU

There is also a temporary fix posted in the thread.

Install a working RGL version clone from his github via devtools:

library(devtools)    
install_github("rgl", "trestletech", "js-class") 

(Make sure you do this in a fresh R session with rgl unloaded or even better, already removed from your library)

Upvotes: 1

Related Questions