shiny server v1.5.1.0 fails

212 views
Skip to first unread message

Norman Packard

unread,
Nov 8, 2016, 9:29:50 PM11/8/16
to Shiny - Web Framework for R

A problem with R session not restarting on page reload prompted me to update to the most recent version of shiny:

$ shiny-server --version

Shiny Server v1.  5.  1.0

Node.js v6.9.1


The installation went without a hitch, as it usually does.

But now the client disconnects from the server right away.  On the server console I see an error:

[2016-11-08 17:51:06.504] [ERROR] shiny-server - Error getting worker: TypeError: driver.validateOptions is not a function


The server log file barely manages to log its initial message:


(which I have to grab before the log file is erased...)  Below is a transcript of the shiny console output, with SHINY_LOG_LEVEL=TRACE.  The output covers two attempts to connect to the server, resulting in two copies of the error above.

Seems strange.  I have had various previous versions of the shiny server running on this machine for quite some time.

Any help appreciated.
shinyconsole.rtf

Joe Cheng

unread,
Nov 8, 2016, 9:37:33 PM11/8/16
to Norman Packard, Shiny - Web Framework for R
That's very strange. It looks like you're not using one of our binary builds; can you confirm that you're building from source?

Can you cd into the shiny-server directory (in our binary builds it's /opt/shiny-server) and run "bin/npm ls faye-websocket", and show me the output?

--
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/9acb98df-44f8-479b-ac7f-a472d0aa13ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Norman Packard

unread,
Nov 8, 2016, 9:42:51 PM11/8/16
to Shiny - Web Framework for R, nhpa...@gmail.com
Hi Joe,

Thanks for your prompt attention!

Yes:  building from source.  Your desired output is:

$ bin/npm ls faye-websocket

shiny-...@1.5.1 /Users/n/Projects/shiny-server

├── faye-we...@0.11.0 

└─┬ soc...@0.3.18

  └── faye-we...@0.10.0 



and I see faye stuff in the distribution:


$ find . -name "*faye*" -print

./node_modules/faye-websocket

./node_modules/faye-websocket/lib/faye

./node_modules/sockjs/node_modules/faye-websocket

./node_modules/sockjs/node_modules/faye-websocket/lib/faye

Norman Packard

unread,
Nov 8, 2016, 9:46:50 PM11/8/16
to Shiny - Web Framework for R, nhpa...@gmail.com
Not sure how relevant it is, but maybe worth noting that before the page disconnects from the server, it does load the shiny widgets specified in my ui.R.  Then the window turns grey and I get the "Disconnected from server" message.

Joe Cheng

unread,
Nov 8, 2016, 10:07:18 PM11/8/16
to Norman Packard, Shiny - Web Framework for R
Very strange.

When you built from source, did you simply update a previous git repo that you were already running shiny-server out of? Or did you start from a fully "clean" directory?

What does "python --version" give you?

What Linux distro are you using?

On Tue, Nov 8, 2016 at 6:47 PM Norman Packard <nhpa...@gmail.com> wrote:
Not sure how relevant it is, but maybe worth noting that before the page disconnects from the server, it does load the shiny widgets specified in my ui.R.  Then the window turns grey and I get the "Disconnected from server" message.

--
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.

Norman Packard

unread,
Nov 8, 2016, 11:32:26 PM11/8/16
to Shiny - Web Framework for R, nhpa...@gmail.com

Fresh build.
python is v. 2.7.5
OS is Mac OS X 10.9.5.  
I know this is not officially supported, but I have run many previous versions of shiny server for ages on this OS, with the well-known patch in launcher.cc.
Perhaps Mac OS X is now problematic for other reasons?
If you really think so, let's close the thread, and I'll switch the machine to boot linux.

Joe Cheng

unread,
Nov 9, 2016, 1:33:02 AM11/9/16
to Norman Packard, Shiny - Web Framework for R
Hmmm, it works for me on OS X 10.12.5 (well, I had to set an "R" environment variable to tell Shiny Server to look in /usr/local/bin, but other than that it works).

It's also strange to me that you're getting those weird tabs between "1.5.1.0" in the version number.

I'd try deleting node_modules, and run "bin/npm install" again.

Norman Packard

unread,
Nov 9, 2016, 11:16:59 PM11/9/16
to Shiny - Web Framework for R, nhpa...@gmail.com


I deleted node_modules and ran "bin/npm install"  Ran fine. No change.  I wasn't sure if the installed shiny-server would see that change, so I went down to tmp/ and did a "make install" just in case.  No joy.


I have also done a completely clean reinstall scrutinizing it for errors along the way.  Found none.  A few compiler warnings (as usual), of the sort 


../deps/icu-small/source/i18n/calendar.cpp:72:14: warning: unused function 'calendar_cleanup' [-Wunused-function]

static UBool calendar_cleanup(void) {


and


../deps/icu-small/source/i18n/coll.cpp:64:31: warning: unused variable 'gService' [-Wunused-variable]

static icu::ICULocaleService* gService = NULL;


I see that the "driver.validateOptions is not a function" error  comes from driver object from a call like the following.


var Stream      = require('stream').Stream,

    util        = require('util'),

    driver      = require('websocket-driver'),

    EventTarget = require('./api/event_target'),

    Event       = require('./api/event');


So maybe I don't have websocket-driver, as needed?

Norman Packard

unread,
Nov 10, 2016, 11:22:56 PM11/10/16
to Shiny - Web Framework for R, nhpa...@gmail.com

I started fresh on a completely different machine, still running Mac OS X 10.9.5.

On several starts of the server, while getting errors for packages I needed to install, shiny-server was starting up properly, with messages like:

[2016-11-10 18:37:48.472] [INFO] shiny-server - Shiny Server v1.5.1.0 (Node.js v6.9.1)


Note the pleasantly correct string "Shiny Server v1.5.1.0"

Then I got this weird error:

power:n shiny1$ shinystart 

/private/etc/shiny-server/shiny1.conf:1

(function (exports, require, module, __filename, __dirname) { # Instruct Shiny Server to run applications as the user "shiny"

                                                              ^

SyntaxError: Invalid or unexpected token

    at Object.exports.runInThisContext (vm.js:76:16)

    at Module._compile (module.js:542:28)

    at Object.Module._extensions..js (module.js:579:10)

    at Module.load (module.js:487:32)

    at tryModuleLoad (module.js:446:12)

    at Function.Module._load (module.js:438:3)

    at Module.runMain (module.js:604:10)

    at run (bootstrap_node.js:394:7)

    at startup (bootstrap_node.js:149:9)

    at bootstrap_node.js:509:3


I very carefully made sure that shiny1.conf had no weird characters in it, but could not eliminate the error.
Then after logging out and logging in a couple of times, this error disappeared.  But alas, I am  back to the old error:

power:~ shiny1$ shinystart 

[2016-11-10 20:11:06.830] [INFO] shiny-server - Shiny Server v1.  5.  1.0 (Node.js v6.9.1)

[2016-11-10 20:11:06.835] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny1.conf"

[2016-11-10 20:11:06.889] [INFO] shiny-server - Starting listener on 0.0.0.0:3841

[2016-11-10 20:11:28.579] [ERROR] shiny-server - Error getting worker: TypeError: driver.validateOptions is not a function


And note: the displeasingly incorrect string "Shiny Server v1.  5.  1.0".
Something really weird is going on.


Norman Packard

unread,
Nov 14, 2016, 3:58:45 AM11/14/16
to Shiny - Web Framework for R, nhpa...@gmail.com

Just thought I would post another report:

I tried shiny-server v.1.5.1.0 on my Mac 10.12.1, had the same problem (Error getting worker: TypeError: driver.validateOptions is not a function).

I finally found that backing up to shiny-server v.1.4.2.0 got rid of the problem for me.

I still have my original problem, regarding the R session not re-starting on page reload.

dakmatt fairuz

unread,
Nov 21, 2016, 3:01:37 AM11/21/16
to Shiny - Web Framework for R, nhpa...@gmail.com
Dear All,

I also faced the same problem. When I run the Apps, the log says:

"

Attaching package: ‘shinydashboard’

The following object is masked from ‘package:graphics’:

    box

Loading required package: rJava

"

My shiny version is, 

$shiny-server --version
Shiny Server v1.5.2.0
Node.js v6.9.1

I'm currently just recently upgrade from UBUNTU 14 to UBUNTU 16

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

I suspect because I upgrade my UBUNTU,hence there triggered problem because shiny server works fine before I upgrade .

Kindly help.

Fairuz, 

CEAM Meteorología

unread,
Dec 9, 2016, 4:35:34 AM12/9/16
to Shiny - Web Framework for R, nhpa...@gmail.com
Hi Norman

I'm facing the same problem. So, your solution was to install version 1.4.2.0? Did you install from source?

Thanks

Norman Packard

unread,
Jan 8, 2017, 1:56:16 AM1/8/17
to Shiny - Web Framework for R, nhpa...@gmail.com
Hi all,
Sorry I've been neglecting this thread.
Yes: my solution was to install version 1.4.2.0 from source.
My OS is Mac OS X 10.9.5.
(note you have to change launcher.cc, see below, but then install all works)

N

inertia:src n$ diff launcher.cc.mac launcher.cc.org

25,27d24

< #ifdef __APPLE__

<   #include <libproc.h>

< #endif

78,85d74

< #ifdef __APPLE__

<   char execPath[PROC_PIDPATHINFO_MAXSIZE];

<   if (!proc_pidpath(getpid(), execPath, sizeof(execPath))) {

<     perror("proc_pidpath");

<     // unexpected error

<     return 2;

<   }

< #else // assuming Linux

121c110

< #endif

---

Reply all
Reply to author
Forward
0 new messages