Autobahn client-component cannot connect with Voting demo at wss://demo.crossbar.io/ws

#1

Combining

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/pubsub/basic/frontend.py

and

https://github.com/crossbario/crossbardemo/blob/master/crossbardemo/crossbardemo/web/demo/vote/web/js/frontend.js

I am trying to create an AutobahnPython component that can interact with the Vote demo run by Tavendo at

https://demo.crossbar.io/demo/vote/web/index.html

But even my first tries are unsuccessful… When I try to run this code:

https://gist.github.com/rogererens/c4d93006d2f1a483fed4

all I get is a line with ‘disconnected’, so apparently my session join fails.

I’d be grateful if someone could point out my mistake(s) in this code?

I’m on autobahn 0.10.2.

Bonus question: how can the .crossbar/config.json say that the realm is ‘realm1’ and the web/js/frontend.js use realm ‘crossbardemo’?

Best regards,

Roger

0 Likes

#2

I found that, using the autobahn 0.10.1 library, my code can connect to the router at wss://demo.crossbar.io/ws, but not when using autobahn 0.10.2.

So this is either a regression in the autobahn library,

or the crossbar router at demo.crossbar.io should be upgraded to reflect the current state of the downloadable files of the project.

I filed an issue for this: https://github.com/crossbario/crossbardemo/issues/25

The answer to the bonus question seems to me that the deployed configuration uses a different config file (i.e. realm=‘crossbardemo’ i.s.o. ‘realm1’) than which is stored in the repo

https://github.com/crossbario/crossbardemo/blob/master/crossbardemo/crossbardemo/web/demo/vote/.crossbar/config.json

Cheers,

Roger

0 Likes