Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid role 'subscriber' in 'roles' in 'details' in WELCOME (after #280 and # 281) #337

Closed
garykuipers opened this issue Feb 8, 2020 · 0 comments
Assignees

Comments

@garykuipers
Copy link

We saw this:

3e49d6a

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: crossbario/autobahn-python#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.
"""

async def onJoin(self, details):
    counter = 0
    while True:
        print("publish: scrmsg.main", counter)
        self.publish('scrmsg.main', counter)
        counter += 1
        await asyncio.sleep(1000)

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)

@mbonneau mbonneau self-assigned this Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants