qiita-spots / qiita

Qiita - A multi-omics databasing effort
https://qiita.ucsd.edu/
BSD 3-Clause "New" or "Revised" License
120 stars 80 forks source link

WebSockets will not work over HTTPS #993

Closed ElDeveloper closed 8 years ago

ElDeveloper commented 9 years ago

If the server is being accessed through HTTPS, anything that relies on WebSockets will fail silently and only show an error on the JavaScript command line. The most important feature that's unavailable when this happens is being able to submit jobs.

[blocked] The page at 'https://qiita.ibdmdb.org/analysis/wait/1' was loaded over HTTPS, but ran insecure content from 'ws://qiita.ibdmdb.org/moi-ws/': this content should also be loaded over HTTPS. moi.js:77
Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

For more information, see this issue in moi and this StackOverflow question.

squirrelo commented 9 years ago

The fix seems to just be to use wss:// but we need to know when to use that vs the standard.

ElDeveloper commented 9 years ago

I tried by changing moi.js and compute_waiting.html to use wss but no luck either.

On (Mar-17-15|21:07), Joshua Shorenstein wrote:

The fix seems to just be to use wss:// but we need to know when to use that vs the standard.


Reply to this email directly or view it on GitHub: https://github.com/biocore/qiita/issues/993#issuecomment-82730321

wasade commented 9 years ago

Some info if you google "tornado was". Are the certs etc setup in webserver.py? On Mar 18, 2015 7:05 AM, "Yoshiki Vázquez Baeza" notifications@github.com wrote:

I tried by changing moi.js and compute_waiting.html to use wss but no luck either.

On (Mar-17-15|21:07), Joshua Shorenstein wrote:

The fix seems to just be to use wss:// but we need to know when to use that vs the standard.


Reply to this email directly or view it on GitHub: https://github.com/biocore/qiita/issues/993#issuecomment-82730321

— Reply to this email directly or view it on GitHub https://github.com/biocore/qiita/issues/993#issuecomment-82766021.

ElDeveloper commented 9 years ago

I tried this out, but it didn't work either.

On (Mar-18-15| 0:19), Daniel McDonald wrote:

Some info if you google "tornado was". Are the certs etc setup in webserver.py? On Mar 18, 2015 7:05 AM, "Yoshiki Vázquez Baeza" notifications@github.com wrote:

I tried by changing moi.js and compute_waiting.html to use wss but no luck either.

On (Mar-17-15|21:07), Joshua Shorenstein wrote:

The fix seems to just be to use wss:// but we need to know when to use that vs the standard.


Reply to this email directly or view it on GitHub: https://github.com/biocore/qiita/issues/993#issuecomment-82730321

— Reply to this email directly or view it on GitHub https://github.com/biocore/qiita/issues/993#issuecomment-82766021.


Reply to this email directly or view it on GitHub: https://github.com/biocore/qiita/issues/993#issuecomment-82789170

ElDeveloper commented 9 years ago

I was able to verify that the websockets in fact work using Safari 8.xxxx. It seems that the problem is arising from the fact that the interface is not being properly updated and gives a misleading impression of nothing happening. My guess is that the creation of the HTML elements is not working.

squirrelo commented 9 years ago

Needs to be verified, but may have been solved by #1058

ElDeveloper commented 9 years ago

How can that be? I don't recall any changes to the webserver's configuration to take in a certificate.

squirrelo commented 9 years ago

Oh, I thought you had the certs up and it was just a ws:// vs wss:// issue. My bad.

ElDeveloper commented 9 years ago

Np, it's really both things. We should add a parameter to the config file such that you can set what the certificates, etc you want to use are.

On (Apr-28-15|12:37), Joshua Shorenstein wrote:

Oh, I thought you had the certs up and it was just a ws:// vs wss:// issue. My bad.


Reply to this email directly or view it on GitHub: https://github.com/biocore/qiita/issues/993#issuecomment-97180065

antgonza commented 8 years ago

Now we are using https and we don't have this issue, @ElDeveloper can we close?

ElDeveloper commented 8 years ago

Yes, I believe this is the case, since we now have the system work with HTTPS.

Allan-Nava commented 4 years ago

with heroku how can I fix SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.?