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

Erroneous code in exception path #314

Open
chrysn opened this issue Aug 2, 2023 · 0 comments
Open

Erroneous code in exception path #314

chrysn opened this issue Aug 2, 2023 · 0 comments
Assignees
Labels
easy first step An issue that newcomers could easily fix

Comments

@chrysn
Copy link
Owner

chrysn commented Aug 2, 2023

AttributeError when raising AnonymousHost:

$ ./aiocoap-rd --proxy-domain proxy.example.net &
$ ./aiocoap-widgets --register coap+ws://localhost:8683 --anyport
[...]
  File "/home/chrysn/git/aiocoap/aiocoap/transports/rfc8323common.py", line 65, in uri_base
    raise error.AnonymousHost("Client side of %s can not be expressed as a URI" % self._ctx._scheme)
                                                                                  ^^^^^^^^^
AttributeError: 'WSRemote' object has no attribute '_ctx'

(It's not surprising that an error is raised, but it should be silent on the server and take the proper error path).

The proper way to fix this on the application side is to add --registery-proxy to the widget invocation, but the 5.00 doesn't tell that.

@chrysn chrysn added the easy first step An issue that newcomers could easily fix label Aug 2, 2023
@chrysn chrysn self-assigned this Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy first step An issue that newcomers could easily fix
Projects
None yet
Development

No branches or pull requests

1 participant