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

Allow custom message prefixes; simplify message type registration #744

Conversation

andrewwhitehead
Copy link
Contributor

No description provided.

sklump
sklump previously approved these changes Oct 6, 2020
Copy link
Contributor

@ianco ianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I built a local aca-py image and tried starting up aries-vcr and I get the following:

vcr-agent_1 | 2020-10-06 22:40:38,387 aries_cloudagent.core.conductor ERROR Exception in message handler:
vcr-agent_1 | Traceback (most recent call last):
vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/core/dispatcher.py", line 139, in handle_message
vcr-agent_1 | message = await self.make_message(inbound_message.payload)
vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/core/dispatcher.py", line 223, in make_message
vcr-agent_1 | instance = message_cls.deserialize(parsed_msg)
vcr-agent_1 | AttributeError: 'tuple' object has no attribute 'deserialize'
vcr-agent_1 | 2020-10-06 22:40:38,388 aries_cloudagent.core.conductor ERROR DON'T shutdown on AttributeError 'tuple' object has no attribute 'deserialize'
vcr-agent_1 | 2020-10-06 22:40:38,389 aries_cloudagent.core.dispatcher ERROR Handler error: Dispatcher.handle_message
vcr-agent_1 | Traceback (most recent call last):
vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/core/dispatcher.py", line 139, in handle_message
vcr-agent_1 | message = await self.make_message(inbound_message.payload)
vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/core/dispatcher.py", line 223, in make_message
vcr-agent_1 | instance = message_cls.deserialize(parsed_msg)
vcr-agent_1 | AttributeError: 'tuple' object has no attribute 'deserialize'

@ianco
Copy link
Contributor

ianco commented Oct 6, 2020

I think it's getting a connection error and not interpreting it properly

@ianco
Copy link
Contributor

ianco commented Oct 6, 2020

... also breaks the BC Reg issuer registration:

bcreg-controller_1 | Traceback (most recent call last):
bcreg-controller_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/threading.py", line 916, in _bootstrap_inner
bcreg-controller_1 | self.run()
bcreg-controller_1 | File "/home/indy/src/issuer.py", line 325, in run
bcreg-controller_1 | response.raise_for_status()
bcreg-controller_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status
bcreg-controller_1 | raise HTTPError(http_error_msg, response=self)
bcreg-controller_1 | requests.exceptions.HTTPError: 418 Client Error: for url: http://bcreg-agent:8034/issuer_registration/send

@sklump sklump self-requested a review October 7, 2020 10:49
@sklump
Copy link
Contributor

sklump commented Oct 7, 2020

I can't guess what the update has to do with this error. Tuple??

@ianco
Copy link
Contributor

ianco commented Oct 7, 2020

I can't guess what the update has to do with this error. Tuple??

Working back from the stack trace, this line:

https://github.com/andrewwhitehead/aries-cloudagent-python/blob/feat/custom-prefix/aries_cloudagent/core/dispatcher.py#L215

... is returning a tuple:

message_cls: ('aries_cloudagent.protocols.connections.v1_0.messages.connection_request.ConnectionRequest',)

... and the exception is getting thrown when you try to call deserialize()

Signed-off-by: Andrew Whitehead <[email protected]>
@andrewwhitehead
Copy link
Contributor Author

@ianco Should be fixed now

@codecov-io
Copy link

Codecov Report

Merging #744 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #744   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files         256      256           
  Lines       13956    13967   +11     
=======================================
+ Hits        13819    13830   +11     
  Misses        137      137           

Copy link
Contributor

@ianco ianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, all working now

@andrewwhitehead andrewwhitehead merged commit c402a60 into openwallet-foundation:master Oct 7, 2020
@andrewwhitehead andrewwhitehead deleted the feat/custom-prefix branch October 7, 2020 18:19
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

Successfully merging this pull request may close these issues.

4 participants