Skip to content

Keria crashes after resolving a non-existent schema OOBI #413

@aydarng

Description

@aydarng

Version

0.2.0-rc2

Environment

Ubuntu 22.04, Keria is running in docker

Expected behavior

When SignifyClient.oobis().resolve(oobi, alias)(sends POST to /oobis endpoint of Keria) is called with a schema OOBI that does not exist, Keria should:

Return a clear error response to the client (e.g., “schema not found”, “invalid response”, HTTP 404/400, etc.)

Mark the OOBI resolution as failed

Continue running (no process crash)

Actual behavior

After attempting to resolve a non-existent schema OOBI via SignifyTS and Keria, Keria crashes and exits. It must be restarted manually.

Traceback(Keria):

The Agency is loaded and waiting for requests...
Agent: EJYCH5QgHgevQA9GdQX8wOJy3FgyV3pClT-Hku7o7NkA Controller: EAfwo-X6atqyZLuBGiOm8BMOAKTKfGDae_PRdKAF1tvs
Agent: ELDJKPriT2vOLbz0WodDPohn83Xvs-XNJAZXtqOVwdgK Controller: EMkamoEx_luVoWS27WQDdUINAMQwosCDKKWyWzbdkUZ0
Traceback (most recent call last):
File "/keria/venv/bin/keria", line 8, in
sys.exit(main())
^^^^^^
File "/keria/src/keria/app/cli/keria.py", line 31, in main
raise ex
File "/keria/src/keria/app/cli/keria.py", line 25, in main
doers = args.handler(args)
^^^^^^^^^^^^^^^^^^
File "/keria/src/keria/app/cli/commands/start.py", line 20, in
parser.set_defaults(handler=lambda args: launch(args))
^^^^^^^^^^^^
File "/keria/src/keria/app/cli/commands/start.py", line 80, in launch
runAgent(name=args.name,
File "/keria/src/keria/app/cli/commands/start.py", line 113, in runAgent
directing.runController(doers=doers, expire=expire)
File "/keria/venv/lib/python3.12/site-packages/keri/app/directing.py", line 665, in runController
doist.do(doers=doers)
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 156, in do
self.recur()
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 275, in recur
tock = dog.send(self.tyme)
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 922, in do
self.done = self.recur(tyme=tyme)
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 1026, in recur
tock = dog.send(tyme)
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 922, in do
self.done = self.recur(tyme=tyme)
File "/keria/venv/lib/python3.12/site-packages/hio/base/doing.py", line 1026, in recur
tock = dog.send(tyme)
File "/keria/venv/lib/python3.12/site-packages/keri/app/oobiing.py", line 406, in scoobiDo
self.processFlows()
File "/keria/venv/lib/python3.12/site-packages/keri/app/oobiing.py", line 415, in processFlows
self.processClients()
File "/keria/venv/lib/python3.12/site-packages/keri/app/oobiing.py", line 548, in processClients
serder = serdering.SerderKERI(raw=bytearray(response["body"]))
File "/keria/venv/lib/python3.12/site-packages/keri/core/serdering.py", line 648, in init
raise InvalidValueError("Improper initialization need raw or sad "
keri.kering.InvalidValueError: Improper initialization need raw or sad or makify.

Steps to reproduce

  1. Start Keria in docker.

  2. Create a SignifyClient object

  3. Using the SignifyClient object:

    • Create an AID: call client.identifiers().create()
    • Attempt to resolve a schema OOBI that does not exist: call client.oobis().resolve()
  4. Observe that shortly after the resolve attempt, Keria throws InvalidValueError from SerderKERI(raw=...) and the Keria process exits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions