Error after upgrade to v0.7.4: WebSocket closes, response code 500

#1

When using Autobahn with Python 2.7.4 on Ubuntu 13.04 64bit, after updating from v0.6.5 to v0.7.4 and changing from autobahn.websocket import WebSocketServerProtocol to from autobahn.twisted.websocket import WebSocketServerProtocol, when opening a WebSocket from the Chrome console, the WebSocket closes (onOpen and onConnect are not called at all), onClose is called with the following parameters:

wasClean: False, code: 1006, reason: connection was closed uncleanly (None)

The browser console shows the following error message:

WebSocket connection to ‘ws://localhost:9000/’ failed: Unexpected response code: 500

Everything was working properly before the update and works after downgrading to v0.6.5: What am I missing?

Thanks!

0 Likes

#2

I managed to have v0.7.4 work properly: here are the issues:

Works in 0.6.5 but not in 0.7.4:

def onConnect(self, connectionRequest):

self.peer = connectionRequest.peerstr

Works in 0.7.4:

def onConnect(self, connectionRequest):

self.peer = str(connectionRequest.peer)

Works in 0.6.5 but not in 0.7.4:

sendMessage(msg, binary=False)

Works in 0.7.4:

sendMessage(msg, isBinary=False)

···

On Saturday, January 18, 2014 2:51:50 AM UTC+1, Alessandro wrote:

When using Autobahn with Python 2.7.4 on Ubuntu 13.04 64bit, after updating from v0.6.5 to v0.7.4 and changing from autobahn.websocket import WebSocketServerProtocol to from autobahn.twisted.websocket import WebSocketServerProtocol, when opening a WebSocket from the Chrome console, the WebSocket closes (onOpen and onConnect are not called at all), onClose is called with the following parameters:

wasClean: False, code: 1006, reason: connection was closed uncleanly (None)

The browser console shows the following error message:

WebSocket connection to ‘ws://localhost:9000/’ failed: Unexpected response code: 500

Everything was working properly before the update and works after downgrading to v0.6.5: What am I missing?

Thanks!

0 Likes

#3

Yes, there were some small changes .. I've improved the "upgrade docs":

https://github.com/tavendo/AutobahnPython#upgrading-from-autobahn--070

Sorry for inconvenience!

/Tobias

···

Am 18.01.2014 04:42, schrieb Alessandro:

I managed to have v0.7.4 work properly: here are the issues:

0 Likes