Shiny apps fail in Microsoft Edge with status 400

All my self-hosted Shiny apps are failing with 400 status code when accessed by Microsoft Edge browser. There is nothing being reported in /var/logs/shiny-server.log or /var/logs/shiny-server/<app>.log. I'm running the apps on vanilla Shiny Server on Ubuntu 16.04 with Apache2. Grateful for suggestions.

This SO question shows I'm not the only one with this issue - https://stackoverflow.com/questions/46860927/shiny-app-does-not-work-on-microsoft-edge-browser

Worth noting that apps server by shinyapps.io work without a problem in my Edge.

Just two weeks ago we did several full test passes with Edge, including with Shiny Server. What version of Shiny Server are you using, and do even simple apps fail?

Thanks Joe. shiny-server.log reports Shiny Server v1.5.6.875 (Node.js v6.10.3).

Yes even the default Shiny Server homepage fails. When you call it in Edge the app initially loads (the It's Alive histogram), but then greys out as it hits the 400 error status.

If you've fully tested Edge I guess it could possibly be my organisation's sysadmins have implemented restrictive Edge settings. I'll follow up on this. But that still wouldn't explain why shinyapps.io apps do work in Edge.

It's likely something with websockets? Try adding the line disable_websockets; to your /etc/shiny-server/shiny-server.conf, then systemctl restart shiny-server.

Interesting. I still crash, but console no longer reports a 400 code. This is the readout:

Hmmm, very mysterious.

What version of Edge? I'm on Microsoft Edge 41.16299.402.0 and Microsoft EdgeHTML 16.16299 (and it's working fine here).

Can you also try adding preserve_logs true; to your /etc/shiny-server/shiny-server.conf, then systemctl restart shiny-server? That will ensure log files don't get deleted from /var/log/shiny-server/ until you delete them (normally they're deleted if we don't think anything went wrong, but we're currently bad at telling if anything went wrong.)

Another thought--for testing purposes, would it be possible for you to temporarily bypass the Apache2 layer and have your Edge request the app straight from Shiny Server? Whether it succeeds or fails, that would eliminate a huge variable.

Good idea. Calling https://mydomain:3838 fails with "Network Error" ("Hmmm, we can't reach this page."). But this could be because my organisation has blocked ports other than 80/443.

Edge version is 38.xxx. I'll have to look into getting that upgraded. I'll also test your preserve logs idea. Thanks again.

I have the exact same issue on Microsoft Edge 42.17134.1.0. I get the same results as @geotheory after disabling websockets in Shiny Server. Shiny Server is version 1.5.6.875, running on Ubuntu alongside Apache using a proxy. There are no issues on IE 11 or Chrome. Interestingly, Edge has no issues with apps on another Shiny server, but hosted on AWS and without the proxy.

Update: For me, the issue was that the rewrite rules for some reason was outside my <VirtualHost></VirtualHost>. This did not affect Chrome or IE, but Edge gave a 400. The following rules work on Edge on Shiny server 1.5.6.875.

<Proxy *>
   Allow from localhost
</Proxy>

RewriteEngine on
RewriteRule ^/shiny$ /shiny/ [R]
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /shiny/(.*) ws://localhost:3838/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /shiny/(.*) http://localhost:3838/$1 [P,L]

ProxyPreserveHost On
ProxyPass /shiny/ http://localhost:3838/
ProxyPassReverse /shiny/ http://localhost:3838/

Just to report my company just upgraded Edge slightly (still 38.xx) and suddenly my Shiny apps seem to work ok. No idea why.

Hi, is there any fix or lead yet?

Unfortunately we cannot fix this issue by upgrading/downgrading Edge as the app is used by many customers.

What might be the reason? We don't even use Websocket, why is there a websocket that fails?