Hi Eduardo, I am not 100% I understand what's going on, but it sounds a lot like the issue (in a different product) that somebody describes here:
* hessu <https://github.com/hessu> * commented > <https://github.com/home-assistant/home-assistant/issues/6184#issuecomment-282216255> > > Hi, it appears that some browsers do not pass over the authentication > information from plain HTTP requests session to the WebSocket requests. The > 401 response is coming from nginx, not hass. > > To support those browsers with WebSocket API, the auth_pam directives > would need to be excluded for /api/websocket URL as described in #5954 > <https://github.com/home-assistant/home-assistant/issues/5954>, comment > by #5954 (comment) > <https://github.com/home-assistant/home-assistant/issues/5954#issuecomment-279949890> > – the example of adding a separate "location /api/websocket" block without > auth_* directives works, although the description around it does not > describe why it's needed. > https://github.com/home-assistant/home-assistant/issues/6184#issuecomment-282216255 If that is indeed the case, your solution might lie in a variant of this answer: <https://github.com/home-assistant/home-assistant/issues/5954#issuecomment-279949890> > > For nginx, have you tried creating a seperate location for the > /api/websocket ? See http://nginx.org/en/docs/http/websocket.html for > more info. > > For example: > > # add this to your server {}location /api/websocket { > proxy_pass http://[change-me-to-hass-location]/api/websocket; > proxy_http_version 1.1; > proxy_set_header Upgrade $http_upgrade; > proxy_set_header Connection $connection_upgrade; > } > > Haven't tested this yet because I don't use a reverse proxy, but could be > a logical explanation. > > Strangely enough the web app on iOS (bookmark added to the home screen, > webview launches in separate process) continues to work, however I cannot > establish a connection using Safari or, (a freshly installed) Chrome > instance on the same device. > > The chances are that your "pinned" webapp in iOS is still an old version > of the web ui, using the EventStream instead of websocket. > https://github.com/home-assistant/home-assistant/issues/5954 I hope that is helpful! -Darian On Thu, Aug 8, 2019 at 2:25 PM Eduardo De Castro < [email protected]> wrote: > Hi, > > > > I have deployed a JupyterLab instance with a nginx with SSL enabled using > a self-signed certificate. It’s working on Firefox and Chrome over HTTPS, > but on Safari 12.1.2 (MacOs), the web console indicates that is not > possible to establish the WebSocket (WSS) connection: > > > > WebSocket connection to 'wss://……' failed: Unexpected response code: 401 > > > > Does someone have a workaround for this issue? > > > > Best Regards, > > Eduardo > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/BDBA5F39-96A6-47E5-9DDC-7E6ABEC7434A%40qualtera.com > <https://groups.google.com/d/msgid/jupyter/BDBA5F39-96A6-47E5-9DDC-7E6ABEC7434A%40qualtera.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAJ%2BUHtcgON7j-y29qXe5wCzL3K%3Da2dn3yzkcTqagz1Z%2Bawx8_Q%40mail.gmail.com.
