error connecting to rapi ws from chrome dev channel (30)

Bug #1217011 reported by Richard Harding on 2013-08-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Critical
Unassigned
pyjuju
Undecided
Kapil Thangavelu

Bug Description

Error message was: Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch

A link to someone posting about this back in chrome 20 as possible header issues between the server/client?

http://stackoverflow.com/questions/11300694/chrome-20-websocket-handshake

It does work in FF nightly. Needs investigation to see if this is giong to be an upcoming issue for chrome users as the browser update propagates to beta/stable channels.

Richard Harding (rharding) wrote :

I take that back, getting a WS error in firefox nightly, it's working on firefox trunk.

Richard Harding (rharding) wrote :

This is only in Chrome version 30 so far. The Firefox nightly hit was a mistake.

This is verified to be ok on juju-core.

Sample ws request:

Request URL:wss://10.0.3.96/ws
Request Method:GET
Status Code:101 Switching Protocols

Request
Cache-Control:no-cache
Connection:Upgrade
Cookie:__utma=1.898063223.1377539297.1377539297.1377539297.1; __utmb=1.3.9.1377539306979; __utmc=1; __utmz=1.1377539297.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Host:10.0.3.96
Origin:https://10.0.3.96
Pragma:no-cache
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:8p+10Pzf+daA7BbDhAcBCw==
Sec-WebSocket-Protocol:undefined
Sec-WebSocket-Version:13
Upgrade:websocket
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.14 Safari/537.36

Response
Connection:Upgrade
Sec-WebSocket-Accept:7XfoEXkHml6D/OBV5t3/kCu5bLc=
Sec-WebSocket-Protocol:undefined
Upgrade:websocket

It's verified to also throw the same error on pyjuju.

Error: WebSocket connection to 'wss://10.55.32.3/ws' failed: Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch

Request URL:wss://10.55.32.3/ws
Request
Cache-Control:no-cache
Connection:Upgrade
Cookie:__utma=1.1873839766.1377543376.1377543376.1377543376.1; __utmb=1.1.10.1377543376; __utmc=1; __utmz=1.1377543376.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Host:10.55.32.3
Origin:https://10.55.32.3
Pragma:no-cache
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:TPAABgqUlgVj9zSnF804tA==
Sec-WebSocket-Protocol:undefined
Sec-WebSocket-Version:13
Upgrade:websocket
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.14 Safari/537.36

Changed in juju-gui:
importance: High → Critical
Kapil Thangavelu (hazmat) wrote :

i've update the rapi-ws branch to always return chrome's 'undefined' protocol string instead of discarding when upgrading the connection, which seems to resolve the issue in my testing.

Changed in juju:
status: New → Fix Committed
assignee: nobody → Kapil Thangavelu (hazmat)
Gary Poster (gary) wrote :

Thank you very much, Kapil. Will you get this into a pyJuju release as well? Would you like us to try to do so? Is it worth the effort?

Gary Poster (gary) wrote :

Rick reminded me that the change to rapi means that pyJuju is fine, as long as a charm instance is restarted with the upgraded rapi branch. As he said, we'll need to remember this if anyone reports issues in a few weeks with a long-running juju instance. Thanks, Kapil and Rick!

Changed in juju:
status: Fix Committed → Fix Released
Changed in juju-gui:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers