hyperledger / aries-cloudagent-python

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
403 stars 508 forks source link

Cannot queue message for delivery, no supported transport #1454

Closed chheunpheara closed 2 years ago

chheunpheara commented 2 years ago

I know I have asked same questions on the chat room. But I still can't get it to work. Now, I post the issue here and hope I could get some helps.

My purpose was to interconnect bifold to aca-py mediator and connect to other invites of other aca-py. So I'll have the following:

  1. Bifold agent
  2. An aca-py Mediator
  3. A Demo aca-py agent

So on startup the bifold can make successful connection to the Mediator. Then bifold has to connect to other invites of Demo. The connection is also made successful.

However, when the Demo tried to issue credential, the state is only changed to 'offer_sent' and the error message came up as Cannot queue message for delivery, no supported transport.

I have been told to enable --enable-undelivered-queue on the Mediator. But there was nothing changed after enabling the option. The same error persisted.

I tried this option on the Demo too and I got the same issue. So I feel like it's not necessary to enable the option on the Mediator.

Mediator:

--label Mediator \
--endpoint http://http-endpoint:8500 \
--endpoint ws://socket-endpoint:9002 \
--admin 127.0.0.1 8400 \
--wallet-name mediator \
--wallet-key mediatorkey \
--wallet-type indy \
--seed mediator000000000000000000000000 \
--auto-provision \
--inbound-transport http http-endpoint 8500 \
--inbound-transport http 0.0.0.0 8510 \
--inbound-transport ws 0.0.0.0 9002 \
--outbound-transport http \
--outbound-transport ws \
--public-invites \
--no-ledger \
--webhook-url http://webhook:8900 \
--admin-insecure-mode \
--log-file aries_log.log \
--log-level debug \
--debug-connection \
--auto-accept-invites \
--auto-accept-requests \
--auto-ping-connection \
--open-mediation \
--enable-undelivered-queue \
--emit-new-didcomm-prefix \
--invite-multi-use \
--replace-public-did

Demo

--label Demo \
--endpoint http://http-endpoint:8720 \
--admin 127.0.0.1 8710 \
--wallet-name demo1 \
--wallet-key demo1 \
--wallet-type indy \
--seed demo1000000000000000000000000000 \
--auto-provision \
--inbound-transport http http-endpoint 8720 \
--inbound-transport http 0.0.0.0 8720 \
--outbound-transport http \
--public-invites \
--genesis-url http://genesis-url/genesis \
--webhook-url http://webhook:8900 \
--log-file aries_demo_log \
--log-level info \
--debug-connection \
--auto-accept-invites \
--auto-accept-requests \
--auto-ping-connection \
--auto-respond-messages \
--preserve-exchange-records \
--auto-respond-credential-proposal \
--auto-respond-credential-request \
--auto-respond-credential-offer \
--auto-store-credential \
--auto-respond-presentation-request \
--auto-verify-presentation \
--admin-insecure-mode \
--tails-server-base-url http://tail-server:8750/tail \
--emit-new-didcomm-prefix \
--replace-public-did \

Some info:

...
 src/services/pool/pool.rs:765 | Drop finished
        src/commands/pool.rs:75 | OpenAck handle 81, pool_id 81, result Ok(())
  {"msg_id": "N/A", "thread_id": "1eb28b38-b10e-452f-9fcc-bd93c5f64934", "traced_type": "dict:Exchange", "timestamp": 1634810379.7987754, "str_time": "2021-10-21 09:59:39.798775", "handler": "Demo", "ellapsed_milli": 0, "outcome": "OutboundTransportManager.DELIVER.START.http://webhook:8900/topic/issue_credential/"}
  {"msg_id": "N/A", "thread_id": "1eb28b38-b10e-452f-9fcc-bd93c5f64934", "traced_type": "dict:Exchange", "timestamp": 1634810379.7990572, "str_time": "2021-10-21 09:59:39.799057", "handler": "Demo", "ellapsed_milli": 0, "outcome": "OutboundTransportManager.DELIVER.END.http://webhook:8900/topic/issue_credential/"}
Cannot queue message for delivery, no supported transport
  {"msg_id": "1eb28b38-b10e-452f-9fcc-bd93c5f64934", "thread_id": "1eb28b38-b10e-452f-9fcc-bd93c5f64934", "traced_type": "https://didcomm.org/issue-credential/1.0/offer-credential", "timestamp": 1634810379.8003352, "str_time": "2021-10-21 09:59:39.800335", "handler": "Demo", "ellapsed_milli": 108, "outcome": "credential_exchange_send_free_offer.END"}
127.0.0.1 [21/Oct/2021:09:59:39 +0000] "POST /issue-credential/send-offer HTTP/1.0" 200 14261 "-" "python-httpx/0.19.0"
        src/services/pool/pool.rs:754 | Drop started
        src/services/pool/pool.rs:762 | Drop wait worker
        src/services/pool/pool.rs:765 | Drop finished

I am using AIP 10 to issue credential. Any help is appreciated. Thank you

swcurran commented 2 years ago

Were you able to solve this or have you given up? Sorry you didn't get a response on this.

sheraliinamdar commented 2 years ago

Hi @swcurran how to resolve above issue ? we are facing same issue. some time messages are not getting delivered. Thank you!

Regards Sherali

sheraliinamdar commented 2 years ago

It resolved our problem, after we restart mediator service with option --enable-undelivered-queue

alberto-instnt commented 1 year ago

@chheunpheara Where you able to solve the issue? I tried setting --enable-undelivered-queue and still get the log message at random moments. Any updates on this? @sheraliinamdar

darapich92 commented 1 year ago

Hi, currently, i am also facing this problem.

dinbtechit commented 1 year ago

Checkout the solution posted in -> https://github.com/hyperledger/aries-cloudagent-python/issues/1708#issuecomment-1586349233

swcurran commented 1 year ago

That sounds to me like a bug in ACA-Py, right? AFAIK from the spec, multiple items are permitted in preferred order, but if one fails, the I think the behaviour should be to check the next one, right? Sounds like ACA-Py is grabbing the first entry and if it fails, bailing out.

dinbtechit commented 1 year ago

@swcurran yes! That does seem like a bug to me. I just captured my observation based on the logs. But the underlying root cause may be something else too.