fbradyirl / webex_bot

Python package for a Webex Bot based on websockets.
MIT License
68 stars 44 forks source link

Websockets.exceptions.ConnectionClosedError #31

Open KernelGM opened 2 years ago

KernelGM commented 2 years ago

Description

If I run the code with one fresh bot, all work fine. But after 2 days I try again and the error comes.

What I Did

[INFO]  [webex_bot.webex_bot.webex_bot.__init__]:49 Registering bot with Webex cloud

[INFO]  [restsession.webexteamssdk.restsession.user_agent]:167 User-Agent: webexteamssdk/0+unknown {"implementation": {"name": "CPython", 
"version": "3.10.4"}, "system": {"name": "Windows", "release": "10"}, "cpu": "AMD64"}

[INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:161 WebSocket Opened.

[INFO]  [_common.backoff._log_backoff]:105 Backing off _connect_and_listen(...) for 69.6s (websockets.exceptions.ConnectionClosedError: received 1011 (unexpected error); then sent 1011 (unexpected error))
gconklin commented 2 years ago

This looks like it's happening in the websockets package. I'd say make sure websockets is up to date (v10.3) and that there isn't some connectivity issue to https://wdm-a.wbx2.com and https://api.ciscospark.com

dredinger commented 2 years ago

Getting the same error, I upgraded to websockets 10.3 from 10.2 (got a warning stating webex_bot dependency requires websockets==10.2, but this still took the upgrade), verified able to access both of those sites, and still getting the same error as above.

2022-05-31 08:06:55  [INFO]  [webex_bot.webex_bot.webex_bot.__init__]:46 Registering bot with Webex cloud
2022-05-31 08:06:55  [INFO]  [restsession.webexteamssdk.restsession.user_agent]:167 User-Agent: webexteamssdk/0+unknown {"implementation": {"name": "CPython", "version": "3.10.4"}, "system": {"name": "Windows", "release": "10"}, "cpu": "AMD64"}
2022-05-31 08:06:56  [INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:158 Opening websocket connection to wss://mercury-connection-partition0-a.wbx2.com/v1/apps/wx2/registrations/2b5a0a4c-449c-4027-9657-8fb131c3bd90/messages
2022-05-31 08:06:56  [INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:161 WebSocket Opened.
2022-05-31 08:06:57  [INFO]  [_common.backoff._log_backoff]:104 Backing off _connect_and_listen(...) for 0.0s (websockets.exceptions.ConnectionClosedError: received 1011 (unexpected error); then sent 1011 (unexpected error))
2022-05-31 08:06:57  [INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:158 Opening websocket connection to wss://mercury-connection-partition0-a.wbx2.com/v1/apps/wx2/registrations/2b5a0a4c-449c-4027-9657-8fb131c3bd90/messages
2022-05-31 08:06:57  [INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:161 WebSocket Opened.
2022-05-31 08:06:57  [INFO]  [_common.backoff._log_backoff]:104 Backing off _connect_and_listen(...) for 0.6s (websockets.exceptions.ConnectionClosedError: received 1011 (unexpected error); then sent 1011 (unexpected error))
2022-05-31 08:06:57  [INFO]  [webex_websocket_client.webex_bot.websockets.webex_websocket_client._connect_and_listen]:158 Opening websocket connection to wss://mercury-connection-partition0-a.wbx2.com/v1/apps/wx2/registrations/2b5a0a4c-449c-4027-9657-8fb131c3bd90/messages
KernelGM commented 2 years ago

Same error here. /: