which claims to be the fix and checked our code and it is in fact the correct code, yet we continue getting the error:
This is the error seen when trying to connect:
python3 caller2.py
2020-02-08T11:48:01 Traceback (most recent call last):
File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/websocket.py", line 88, in onMessage
for msg in self._serializer.unserialize(payload, isBinary):
File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/serializer.py", line 131, in unserialize
msg = Klass.parse(raw_msg)
File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/message.py", line 848, in parse
raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role))
autobahn.wamp.exception.ProtocolError: invalid role 'subscriber' in 'roles' in 'details' in WELCOME
Ths is the output of the php SimpleWsRouter.php:
2020-02-08T12:01:05.3900190 debug [Thruway\Transport\RatchetTransportProvider 1820] RatchetTransportProvider::onOpen
2020-02-08T12:01:05.3914110 debug [Thruway\Transport\RatchetTransportProvider 1820] onMessage: ([1,"realm-001",{"roles":{"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true,"payload_transparency":true,"payload_encryption_cryptobox":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"payload_transparency":true,"x_acknowledged_event_delivery":true,"payload_encryption_cryptobox":true}},"caller":{"features":{"caller_identification":true,"progressive_call_results":true,"payload_transparency":true,"payload_encryption_cryptobox":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true,"payload_transparency":true,"payload_encryption_cryptobox":true}}}}])
2020-02-08T12:01:05.3915170 info [Thruway\RealmManager 1820] Got prehello...
2020-02-08T12:01:05.3970560 debug [Thruway\Realm 1820] Leaving realm realm-001
2020-02-08T12:01:05.3971090 info [Thruway\Transport\RatchetTransportProvider 1820] Ratchet has closed
This is the calling program (caller2.py):
import asyncio
from os import environ
from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
class Component(ApplicationSession):
"""
An application component that publishes an event every second.
"""
We saw this:
https://github.com/voryx/Thruway/pull/281/commits/3e49d6aa5b25cc7b650c65f6607b597f9a7a7646
which claims to be the fix and checked our code and it is in fact the correct code, yet we continue getting the error:
This is the error seen when trying to connect:
python3 caller2.py 2020-02-08T11:48:01 Traceback (most recent call last): File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/websocket.py", line 88, in onMessage for msg in self._serializer.unserialize(payload, isBinary): File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/serializer.py", line 131, in unserialize msg = Klass.parse(raw_msg) File "/home/gary/.local/lib/python3.6/site-packages/autobahn/wamp/message.py", line 848, in parse raise ProtocolError("invalid role '{0}' in 'roles' in 'details' in WELCOME".format(role)) autobahn.wamp.exception.ProtocolError: invalid role 'subscriber' in 'roles' in 'details' in WELCOME
this is also described here: https://github.com/crossbario/autobahn-python/issues/943
Ths is the output of the php SimpleWsRouter.php: 2020-02-08T12:01:05.3900190 debug [Thruway\Transport\RatchetTransportProvider 1820] RatchetTransportProvider::onOpen 2020-02-08T12:01:05.3914110 debug [Thruway\Transport\RatchetTransportProvider 1820] onMessage: ([1,"realm-001",{"roles":{"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true,"payload_transparency":true,"payload_encryption_cryptobox":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"payload_transparency":true,"x_acknowledged_event_delivery":true,"payload_encryption_cryptobox":true}},"caller":{"features":{"caller_identification":true,"progressive_call_results":true,"payload_transparency":true,"payload_encryption_cryptobox":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true,"payload_transparency":true,"payload_encryption_cryptobox":true}}}}]) 2020-02-08T12:01:05.3915170 info [Thruway\RealmManager 1820] Got prehello... 2020-02-08T12:01:05.3970560 debug [Thruway\Realm 1820] Leaving realm realm-001 2020-02-08T12:01:05.3971090 info [Thruway\Transport\RatchetTransportProvider 1820] Ratchet has closed
This is the calling program (caller2.py): import asyncio from os import environ from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
class Component(ApplicationSession): """ An application component that publishes an event every second. """
if name == 'main': url = environ.get("AUTOBAHN_DEMO_ROUTER", "ws://127.0.0.1:9090/ws") realm = "realm-001" runner = ApplicationRunner(url, realm) runner.run(Component)