openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
415 stars 514 forks source link

HTTPMethodNotAllowed exception when Alice's agent tries to accept the invitation #1572

Closed jwnicholas99 closed 2 years ago

jwnicholas99 commented 2 years ago

While following the steps in the Aries OpenAPI Demo, I get the following error at the "Tell Alice's Agent to Accept the Invitation" step when running the demo in Docker:

Faber      | Traceback (most recent call last):
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 163, in ready_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 200, in debug_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 22, in validation_middleware
Faber      |     return await handler(request)
Faber      |   File "/home/indy/aries_cloudagent/admin/server.py", line 383, in setup_context
Faber      |     return await task
Faber      |   File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 927, in _handle
Faber      |     raise self._http_exception
Faber      | aiohttp.web_exceptions.HTTPMethodNotAllowed: Method Not Allowed
Faber      | 2021-12-21 20:23:19,831 aries_cloudagent.admin.server ERROR Handler error with exception: Method Not Allowed

I do not get this error when running in a browser. What results in this error?

Reproduction Steps:

  1. Start the Faber Agent by running
    
    git clone https://github.com/hyperledger/aries-cloudagent-python
    cd aries-cloudagent-python/demo
    LEDGER_URL=http://dev.greenlight.bcovrin.vonx.io ./run_demo faber --events --no-auto --bg

``

  1. Start the Alice agent by running
    
    LEDGER_URL=http://dev.greenlight.bcovrin.vonx.io ./run_demo alice --events --no-auto --bg
    ``
  2. Follow steps in the Aries OpenAI demo
salmaSof commented 1 year ago

Hello, I see it is closed but with any response, I have the same issue.

Vishwas1 commented 2 months ago

Facing the same issue. Someone please help resolve it ? is it because of version ?

Faber      | 2024-08-20 06:08:12,393 aries_cloudagent.admin.server ERROR Handler error with exception: Method Not Allowed
Faber      |
Faber      | =================
Faber      | Traceback (most recent call last):
Faber      |   File "/home/aries/aries_cloudagent/admin/server.py", line 141, in ready_middleware
Faber      |     return await handler(request)
Faber      |            ^^^^^^^^^^^^^^^^^^^^^^
Faber      |   File "/home/aries/aries_cloudagent/admin/server.py", line 212, in debug_middleware
Faber      |     return await handler(request)
Faber      |            ^^^^^^^^^^^^^^^^^^^^^^
Faber      |   File "/home/aries/aries_cloudagent/admin/server.py", line 357, in setup_context
Faber      |     return await task
Faber      |            ^^^^^^^^^^
Faber      |   File "/usr/local/lib/python3.12/asyncio/futures.py", line 287, in __await__
Faber      |     yield self  # This tells Task to wait for completion.
Faber      |     ^^^^^^^^^^
Faber      |   File "/usr/local/lib/python3.12/asyncio/tasks.py", line 385, in __wakeup
Faber      |     future.result()
Faber      |   File "/usr/local/lib/python3.12/asyncio/futures.py", line 203, in result
Faber      |     raise self._exception.with_traceback(self._exception_tb)
Faber      |   File "/usr/local/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
Faber      |     result = coro.send(None)
Faber      |              ^^^^^^^^^^^^^^^
Faber      |   File "/home/aries/aries_cloudagent/admin/server.py", line 199, in upgrade_middleware
Faber      |     return await handler(request)
Faber      |            ^^^^^^^^^^^^^^^^^^^^^^
Faber      |   File "/home/aries/.local/lib/python3.12/site-packages/aiohttp_apispec/middlewares.py", line 22, in validation_middleware
Faber      |     return await handler(request)
Faber      |            ^^^^^^^^^^^^^^^^^^^^^^
Faber      |   File "/home/aries/.local/lib/python3.12/site-packages/aiohttp/web_urldispatcher.py", line 956, in _handle
Faber      |     raise self._http_exception
Faber      | aiohttp.web_exceptions.HTTPMethodNotAllowed: Method Not Allowed
swcurran commented 2 months ago

Where in the process does it happen. I was able to start alice fine using the command above.