Issue with Firefox and Chrome for an app hosted on shinyapps.io

Hello!

In relation to the app that I described in this recent thread "Killed" error during installation for many packages
I have a version of the project hosted here: https://rstudio.cloud/spaces/11327/project/230765
And deployed here: https://kevinrue.shinyapps.io/isee-shiny-contest/

The issue here is that we're somehow resurrecting an old thread described here: https://groups.google.com/forum/#!topic/shiny-discuss/cGbnVQbutLI

Namely, the app hosted on shinyapps.io works fine with Safari, but Firefox nor Chrome seem unable to display plots.
Note that if I launch the app from the RStudio project in a Firefox [EDIT: or Chrome] browser, it does work, as it does in Firefox and Chrome if launched locally. It seems to be a client-server issue specific hosting the app on shinyapps.io when using Firefox or Chrome.

My expertise of web-consoles is somewhat limited so I don't really know how to track down the issue, despite the broad advice given in the Goole Groups link above.

Thanks in advance!
Kevin

Can you show what it looks like in Safari? I don't have that, and am trying to see what's going on in Chrome:

In Chrome, the Javascript console has:

VM85:7 Error evaluating expression: (input["redDimPlot1_VisualChoices"].includes("Color"))
(anonymous) @ VM85:7
(anonymous) @ utils.js:193
$updateConditionals @ shinyapp.js:420
dispatchMessage @ shinyapp.js:517
c.onmessage @ shinyapp.js:112
_conn.onmessage @ shiny-server-client.js:1622
MultiplexClient._conn.onmessage @ shiny-server-client.js:1463
BaseConnectionDecorator._handleMessage @ shiny-server-client.js:316
BaseConnectionDecorator._handleMessage @ shiny-server-client.js:316
d.dispatchEvent @ sockjs-0.3.min.js:27
y._dispatchMessage @ sockjs-0.3.min.js:27
y._didMessage @ sockjs-0.3.min.js:27
b.onmessage @ sockjs-0.3.min.js:27
d.dispatchEvent @ sockjs-0.3.min.js:27
c.xo.onchunk @ sockjs-0.3.min.js:27
c.xo.onfinish @ sockjs-0.3.min.js:27
f.emit @ sockjs-0.3.min.js:27
g.xhr.onreadystatechange @ sockjs-0.3.min.js:27
VM85:5 Uncaught TypeError: Cannot read property 'includes' of undefined
    at Object.eval (eval at scopeExprToFunc (utils.js:176), <anonymous>:5:55)
    at utils.js:193
    at ShinyApp.$updateConditionals (shinyapp.js:420)
    at ShinyApp.dispatchMessage (shinyapp.js:517)
    at PromisedConnection.c.onmessage (shinyapp.js:112)
    at MultiplexClientChannel._conn.onmessage (shiny-server-client.js:1622)
    at BaseConnectionDecorator.MultiplexClient._conn.onmessage (shiny-server-client.js:1463)
    at BaseConnectionDecorator._handleMessage (shiny-server-client.js:316)
    at BaseConnectionDecorator._handleMessage (shiny-server-client.js:316)
    at y.d.dispatchEvent (sockjs-0.3.min.js:27)

Though I get the same error on Safari:

1 Like

Thanks both for the fast replies.

@josh beat me to the screenshot. Thanks, and sorry for my slow reply, I was just triple-checking things to avoid saying anything wrong. Indeed, Safari also shows the error in the console (for the deployed version 1.2.1) but then somehow ends up re-evaluating successfully when the value is set and showing the plots.

So, for Firefox and Chrome maybe, it is just all about that input[...] error in the end. That said, I'm just puzzled why the issue only occurs specifically on the shinyapps.io-hosted app, but neither on a locally-launched app nor on an app launched interactively from the RStudio Cloud. In those last two cases, the plots do show.

We've pushed a fix to the Bioconductor release branch, but it will take a couple of days to go through their build system before being available to install, deploy and test the new version (1.2.2) on shinyapps.io.

In the meantime, @mara, I assume your screenshot is from the deployed app? Because when I launched the app from the RStudio cloud session in Chrome, it shows me the panels.

This last difference (https://rstudio.cloud vs shinyapps.io) is what truly puzzles me.

1 Like

Correct! Didn't try it from RStudio cloud.

Hi @mara @josh,

I wanted to thank you again for investigating so quickly and indicate that fixing the app code to avoid the JavaScript error resolved the situation for both Firefox and Chrome.
This doesn't says exactly why Safari worked through the error, while Firefox and Chrome didn't (neither does it say what the "right" behaviour should be for any web browser in that case), but at least I hope it will it gives a good precedent for the issue and solution if anyone else runs into a similar issue in the future.

The one-liner fix can be read here: https://github.com/csoneson/iSEE/pull/274/files

I'll be submitting the app for the contest shortly now! :slight_smile:

Best wishes,
Kevin

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.