[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shiny-server in debian



Hi Nilesh,

Thanks for updating it. I tried it out on a fresh install and was
getting the similar error as previously in the console, but instead of
missing sockjs-0.3.4.min.js, it was unable to find sockjs.min.js.
I was able to fix this by adding the following symbolic links:
ln -s /usr/share/javascript/sockjs/*
/usr/lib/shiny-server/node_modules/sockjs-client/dist
ln -s /usr/share/nodejs/shiny-server-client /usr/lib/shiny-server/node_modules

This results in the sample apps that ship with shiny-server to work
properly, although there are still some errors in the Chromium
console, e.g. it complains of missing strftime-min.js and
html5shiv.min.js.

However it doesn't fix the issue with my apps. I think the problem is
that both my apps use shinyjs, and it appears from the console that
many of the javascript files associated with that are unable to be
found (even though shinyjs loads in R and is installed properly via
apt install r-cran-shinyjs). The bigger issue may be that shiny-server
is not able to find .js files from R packages or elsewhere in the
system. Maybe you have some ideas about why this might be? It could
relate to the problems I found below.

I think we probably need to update Debian's node-shiny-server-client
package as well
(https://salsa.debian.org/science-team/node-shiny-server-client). It
is several years old and it looks like there have been some important
changes upstream that are likely causing problems for us now.

I took a closer look at the sockjs dependencies in Debian, which could
be the cause of some of these problems.

There are 2 upstream packages: sockjs-node (v. 0.3.24, Dec 2, 2021,
https://github.com/sockjs/sockjs-node) and sockjs-client (v. 1.6.0,
Feb 27, 2022, https://github.com/sockjs/sockjs-client).

Debian has node-sockjs-client (v. 1.5.2,
https://github.com/sockjs/sockjs-client) which corresponds to upstream
sockjs-client and is basically up to date.

Debian also has libjs-sockjs v 0.3.4
(https://packages.debian.org/bullseye/libjs-sockjs) which actually
corresponds to an extremely old 2012 version of the same upstream
sockjs-client.

Finally, Debian has node-sockjs v. 0.3.24 which corresponds with
upstream sockjs-node.

I think it was assumed that libjs-sockjs corresponded to sockjs-node
but this doesn't appear to be the case. Since it does have an older
version of node-sockjs-client it did seem to help but it should  not
be a dependency and should probably be removed from Debian.

The other issue I noticed is in node-sockjs-client
(https://salsa.debian.org/js-team/node-sockjs-client). The debian
version removes the dist directory, where sockjs.js and sockjs.min.js
are found (https://salsa.debian.org/js-team/node-sockjs-client). This
was done deliberately in a commit, and I presume (maybe wrongly) if it
was because the files are supposed to be built through the debian
building process, but it appears they are not when installed and I
they are needed. I think we should be using sockjs.js/sockjs.min.js
from here, not from libjs-sockjs. Since there is no version from the
up to date node-sockjs-client, the symlink above uses the very very
old sockjs.js file from the outdated libjs-sockjs package, and may be
causing problems.

So in summary, I think we should try, if this sounds sensible:
1. remove libjs-sockjs as a dependency of shiny-server
2. add back the dist directory to node-sockjs-client, and add
node-sockjs-client as a dependency of shiny-server
3. update outdated node-shiny-server-client to latest upstream

Best,
Eric

On Sat, Mar 26, 2022 at 3:02 PM Nilesh Patra <nilesh@debian.org> wrote:
>
> Hi Eric,
>
> On Sat, Mar 26, 2022 at 12:20:59PM -0400, Eric Brown wrote:
> > > I will try to update the package and see. If it's not too much work, I'll push an update.
> >
> > Great thanks, and I'd be happy to test again.
>
> I have updated to the latest version and pushed to my personal repo. I did
> not get the the time to test examples, and hence it'd be great if you
> could test+troubleshoot if something is missing.
>
> @All, I renamed shiny-server to node-shiny-server as source package name, binary
> package name is still shiny-server. This is done to not diverge from JS team
> conventions. The repo can be found at: https://salsa.debian.org/science-team/node-shiny-server/
>
> > I'm also hoping to try to build and test in ARM. I think having
> > shiny-server in ARM, for e.g. hosting on a Raspberry pi, would be
> > hugely valuable, as there is currently no straightforward way for
> > users but for many use cases it could be ideal.
>
> Actually debian supports a bunch of architectures;
> So whenever the package is accepted, it'd also build on both armhf and arm64,
> so hopefully that'd easily make it available to users.
>
> Regards,
> Nilesh



--
Eric Brown MD MSc FRCPC
For encryption, OpenPGP public key available on request.


Reply to: