Is firewall blocking shiny websockets (wss)



Some of our client's corporate networks seem to be tightly locked down and although they can log in to our shiny apps they are getting grayed out screens after logging into the app.

The javascript console shows an error "Websocket connection to 'wss.//....' Unexpected response code: 400

Since this only happens to a very small few of our clients I'm assuming it is a firewall and websockets issue on their end.

My questions are these:
Is this url with the "wss" something that Shiny is doing? Because we are not explicitly using websockets ourselves.

If so, what would be an appropriate firewall rule to allow websockets from Shiny?


Yes, it's something that Shiny is doing--wss just uses port 443 like normal HTTPS, so if it's failing it's probably due to an HTTP proxy that doesn't understand websockets. You can work around this by including the directive disable_websockets; in your shiny-server.conf, and Shiny Server will replace the websocket traffic with more conventional-looking HTTP requests.


Thanks Joe. I'll try this out today.


Hi Joe

Thanks, I had a similar issue (users on specific corporate network couldnt connect to app) and it got resolved by disabling the websockets in the shiny-server config file.

My app is basically a whole lot of input fields that when captured gets saved to a database, unfortunately I cant give it as an example. Its an application to share results on fraud investigations in healthcare insurance.

The problem I have now is that the app runs extremely slow now. Only the initial load of the html, thereafter it is back to normal speed.

I assume its all the 'conditional' content. A lot of the input fields are hidden with observeEvents and only gets displayed if certain specific inputs are given. I deployed a second app on the same server without these observe functions and it loaded with the same speed irrespective of whether websockets are disabled or not.

Is there anything specific that could be slowing my app down that you could think of? I thought it could be my nginx config, but then the other apps should also be slow, right?

Please let me know what info I can give you to help you help me.