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

Client authentication occasionally causes exception in thread #975

Closed
anwu opened this issue Apr 30, 2020 · 0 comments · Fixed by #977
Closed

Client authentication occasionally causes exception in thread #975

anwu opened this issue Apr 30, 2020 · 0 comments · Fixed by #977
Assignees

Comments

@anwu
Copy link
Contributor

anwu commented Apr 30, 2020

There are occasional exceptions thrown in threads when trying to connect/authenticate to a device.

Exception in thread Thread-4:
Traceback (most recent call last):
  File "C:\Users\AndrewWu\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_cmd.py", line 49, in run
    res = getattr(self, cmd)(*args)
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_cmd.py", line 272, in _authenticate_async
    success, data = manager.authenticate(device_uuid, supported_auth, self, conn_handle, services)
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_auth.py", line 166, in authenticate
    self._send_client_verify(self._session_key, auth_type, command_processor, *command_processor_args)
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_auth.py", line 74, in _send_client_verify
    err, granted_permissions, server_verify = struct.unpack("BBxx16s", server_verify)
TypeError: a bytes-like object is required, not 'NoneType'

and

Exception in thread Thread-6:
Traceback (most recent call last):
  File "C:\Users\AndrewWu\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_cmd.py", line 49, in run
    res = getattr(self, cmd)(*args)
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_cmd.py", line 272, in _authenticate_async
    success, data = manager.authenticate(device_uuid, supported_auth, self, conn_handle, services)
  File "c:\arch\coretools\transport_plugins\bled112\iotile_transport_bled112\bled112_auth.py", line 151, in authenticate
    struct.unpack("HBB16s", self._server_hello)
TypeError: a bytes-like object is required, not 'NoneType'

I see these errors quite a bit when I run the pod_controller/acceptance_tests/test_BLE_authentication.py

@DimaWittmann DimaWittmann linked a pull request May 7, 2020 that will close this issue
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 a pull request may close this issue.

2 participants