You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[01/10/2025 08:51:23][mattermostautodriver.websocket][ERROR] Failed to establish websocket connection: <class 'aiohttp.client_exceptions.ClientConnectorDNSError'> thrown
Traceback (most recent call last):
File "/home/fabian/.cache/pypoetry/virtualenvs/rapid-xKExur4M-py3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 1351, in _create_direct_connection
hosts = await self._resolve_host(host, port, traces=traces)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fabian/.cache/pypoetry/virtualenvs/rapid-xKExur4M-py3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 995, in _resolve_host
return await asyncio.shield(resolved_host_task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fabian/.cache/pypoetry/virtualenvs/rapid-xKExur4M-py3.12/lib/python3.12/site-packages/aiohttp/connector.py", line 1026, in _resolve_host_with_throttle
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fabian/.cache/pypoetry/virtualenvs/rapid-xKExur4M-py3.12/lib/python3.12/site-packages/aiohttp/resolver.py", line 36, in resolve
infos = await self._loop.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 901, in getaddrinfo
return await self.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 963, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution
If I add the following before the bot.run() call, then everything works fine:
bot.driver.options["proxy"] ="http://...."
Expected behavior
mmpy_bot should read the proxy from the environment variables and pass it to the Mattermost driver
Or even better: Offer to configure the proxy manually via the Settings
Operating Environment (please complete the following information):
Describe the bug
Settings
mattermostautodriver.websocket
usesaiohttp
, which seems to ignore a proxy set through the environment variablesHow To Reproduce
Bot initializes correctly, uses HTTP proxy set in ENV variables:
Then call:
Which causes:
If I add the following before the
bot.run()
call, then everything works fine:Expected behavior
Settings
Operating Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: