OpenVoiceOS / ovos-PHAL-plugin-homeassistant

HomeAssistant PHAL Plugin for OpenVoice OS
Apache License 2.0
10 stars 3 forks source link

Exception raised on oauth setup completion #19

Open NeonDaniel opened 1 year ago

NeonDaniel commented 1 year ago

Upon completing oauth via QR code, the following exception is raised; the QR code is dismissed from the GUI and the default screen with a "Connect Instance" button is displayed

2023-05-11 09:06:11.145 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:_connect:63 - ERROR - sent 1000 (OK); then received 1000 (OK)
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 57, in _connect
    await self.authenticate()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 38, in authenticate
    await self.listen()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 74, in listen
    message = await self.websocket.recv()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
    await self.ensure_open()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2023-05-11 09:06:11.153 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:run:245 - INFO - self.loop.is_running=False
2023-05-11 09:06:11.499 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:_connect:63 - ERROR - sent 1000 (OK); then received 1000 (OK)
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 57, in _connect
    await self.authenticate()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 38, in authenticate
    await self.listen()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 74, in listen
    message = await self.websocket.recv()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
    await self.ensure_open()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2023-05-11 09:06:11.502 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:run:245 - INFO - self.loop.is_running=False
2023-05-11 09:07:17.272 - enclosure - ovos_bus_client.session:reset_default_session:171 - INFO - New Default Session Start: 176da049-2301-4807-80cb-4e7dc3d727c6
2023-05-11 09:07:17.594 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:_connect:63 - ERROR - sent 1000 (OK); then received 1000 (OK)
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 57, in _connect
    await self.authenticate()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 38, in authenticate
    await self.listen()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 74, in listen
    message = await self.websocket.recv()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
    await self.ensure_open()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 953, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2023-05-11 09:07:17.596 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:run:245 - INFO - self.loop.is_running=False
2023-05-11 09:07:17.935 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:_connect:63 - ERROR - sent 1000 (OK); then received 1000 (OK)
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 57, in _connect
    await self.authenticate()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 38, in authenticate
    await self.listen()
  File "/home/neon/venv/lib/python3.7/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 74, in listen
    message = await self.websocket.recv()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 568, in recv
    await self.ensure_open()
  File "/home/neon/venv/lib/python3.7/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: sent 1000 (OK); then received 1000 (OK)
2023-05-11 09:07:17.939 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:run:245 - INFO - self.loop.is_running=False
NeonDaniel commented 1 year ago

Noticed this again but waited and the dashboard did eventually render (no additional logs). After selecting Scenes, that dashboard did eventually come up too.

mikejgray commented 1 year ago

We got another user report of this issue, which I created #46 for before realizing they were the same. Not exactly sure what the problem is but it's definitely related to oauth setup.