最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Websockets not working in Chrome (wss): “handshake was canceled” - Stack Overflow

programmeradmin0浏览0评论

I am currently developing a Websocket application on Docker Cloud. When redeploying my application and now I am always getting this error message:

WebSocket connection failed: WebSocket opening handshake was canceled

When looking into the data frame i see a single frame with this data:

(Opcode -1)

When researching the issue, it seems that is related to SSL / Certificates etc. Some solutions include adding self signed certificates. The confusing thing is that the same certificates seem to work for https but not for wss:

Also while testing with other browsers, I see that Safari is working fine. So I am sure that the server is actually running with the correct certificate on the correct port. Only chrome seems to have issues with it.

I know some solutions on stack overflow sugesst to add the certificate manually, but since it works on Safari and it is not a self signed certificate, I would assume it should just work.

I am currently developing a Websocket application on Docker Cloud. When redeploying my application and now I am always getting this error message:

WebSocket connection failed: WebSocket opening handshake was canceled

When looking into the data frame i see a single frame with this data:

(Opcode -1)

When researching the issue, it seems that is related to SSL / Certificates etc. Some solutions include adding self signed certificates. The confusing thing is that the same certificates seem to work for https but not for wss:

Also while testing with other browsers, I see that Safari is working fine. So I am sure that the server is actually running with the correct certificate on the correct port. Only chrome seems to have issues with it.

I know some solutions on stack overflow sugesst to add the certificate manually, but since it works on Safari and it is not a self signed certificate, I would assume it should just work.

Share Improve this question asked Oct 31, 2016 at 15:03 m0cm0c 2,19126 silver badges45 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Checking the site against SSLabs shows that the server does not provide all needed parts of the certificate chain but misses a chain certificate:

This server's certificate chain is inplete. Grade capped to B.
...
Chain issues Inplete
...
2 Extra download - Let's Encrypt Authority X3

Once you resolved this issue by properly configuring the server it should work in all browsers. Currently it might work with some browsers only, i.e. if the browser has cached the missing chain certificate from visits to other sites (like Firefox does) or if it works around badly configured servers by downloading missing chain certificates (Chrome).

发布评论

评论列表(0)

  1. 暂无评论