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

Issue when connecting two agents with WS protocol. #1440

Closed
kkamyczek opened this issue Oct 13, 2021 · 4 comments
Closed

Issue when connecting two agents with WS protocol. #1440

kkamyczek opened this issue Oct 13, 2021 · 4 comments

Comments

@kkamyczek
Copy link

I have run two agents:

PORTS="8030:8030 8031:8031" ./scripts/run_docker start
--endpoint ws://192.168.0.104:8030
--label alice.agent
--inbound-transport ws 0.0.0.0 8030
--outbound-transport ws
--admin 0.0.0.0 8031
--admin-insecure-mode
--wallet-type indy
--wallet-name alice.agent420695
--wallet-key alice.agent420695
--preserve-exchange-records
--wallet-local-did
--auto-provision
--genesis-url http://dev.greenlight.bcovrin.vonx.io/genesis
--trace-target log
--trace-tag acapy.events
--trace-label alice.agent.trace
--auto-ping-connection
--log-level DEBUG
--trace-target log
--trace-tag acapy.events
--trace-label alice.agent.trace
--recreate-wallet
--auto-accept-invites
--auto-accept-requests
--auto-store-credential

PORTS="8020:8020 8021:8021" ./scripts/run_docker start
--endpoint ws://192.168.0.104:8020
--label faber.agent
--inbound-transport ws 0.0.0.0 8020
--outbound-transport ws
--admin 0.0.0.0 8021
--admin-insecure-mode
--wallet-type indy
--wallet-name faber.agent916333
--wallet-key faber.agent916333
--preserve-exchange-records
--wallet-local-did
--auto-provision
--genesis-url http://dev.greenlight.bcovrin.vonx.io/genesis
--trace-target log
--trace-tag faber.events
--trace-label faber.agent.trace
--auto-ping-connection
--log-level DEBUG
--trace-target log
--trace-tag faber.events
--trace-label faber.agent.trace
--recreate-wallet
--auto-accept-invites
--auto-accept-requests
--auto-store-credential

I have created an invitation (/connections/create-invitation)
in one agent and tried to receive it (/connections/receive-invitation).

I got such issue:
2021-10-13 08:25:19,871 aries_cloudagent.transport.outbound.manager ERROR Exception in outbound queue processing:
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/transport/outbound/manager.py", line 366, in _process_loop
self.deliver_queued_message(queued)
File "/home/indy/aries_cloudagent/transport/outbound/manager.py", line 456, in deliver_queued_message
queued.api_key,
TypeError: handle_message() takes from 4 to 5 positional arguments but 6 were given

It's related to this code:
def deliver_queued_message(self, queued: QueuedOutboundMessage) -> asyncio.Task:
"""Kick off delivery of a queued message."""
transport = self.get_transport_instance(queued.transport_id)
queued.task = self.task_queue.run(
transport.handle_message(
queued.profile,
queued.payload,
queued.endpoint,
queued.metadata,
queued.api_key,
),

Could you please tell me if it's possible to use it with WebSockets?

@swcurran
Copy link
Contributor

@ianco perhaps you can look at this?

@ianco
Copy link
Contributor

ianco commented Oct 13, 2021

Looks like an extra parameter was added to the http protocol but not the ws protocol:

api_key: str = None,

I think we can add this parameter to the ws protocol and then just ignore it (it adds an http header on the http protocol but this is not applicable to the ws protocol).

I'll take a look today.

@ianco
Copy link
Contributor

ianco commented Oct 13, 2021

See PR #1442

@kkamyczek
Copy link
Author

works, on my side.
Thanks!

@ianco ianco closed this as completed Oct 14, 2021
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

3 participants