gawel / irc3

plugable irc client library based on python's asyncio with DCC and SASL support
https://irc3.readthedocs.io/
MIT License
206 stars 47 forks source link

getaddrinfo for res in _socket.getaddrinfo error #175

Open SalamanderSandwich opened 5 years ago

SalamanderSandwich commented 5 years ago

Using dcc_send_and_get.py in examples with python 3.7.2 I get the following error. Works fine in 3.6.0.

INFO irc3d      Started
INFO irc3.receiver sender is offering dcc_send_and_getb.py
ERROR asyncio    Exception in callback DCCManager.created(<DCCGet with ...rc3@127.0.0.1>)(<Task finishe...info failed')>)
handle: <Handle DCCManager.created(<DCCGet with ...rc3@127.0.0.1>)(<Task finishe...info failed')>)>
Traceback (most recent call last):
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\site-packages\irc3\dcc\manager.py", line 58, in created
    transport, protocol = future.result()
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 910, in create_connection
    type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self)
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 1279, in _ensure_resolved
    proto=proto, flags=flags)
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 789, in getaddrinfo
    None, getaddr_func, host, port, family, type, proto, flags)
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\SalamanderSandwich\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
gawel commented 5 years ago

Not sure it's really related to irc3. Looks like it raise deep in asyncio.

And btw, are you sure you don't have a firewall or something ?

gawel commented 5 years ago

Also tests pass with 3.7 https://travis-ci.org/gawel/irc3/jobs/499987669 And, like other modules, the dcc part is well covered

Weird issue

gawel commented 5 years ago

Also tested locally:

$ .tox/py37/bin/python -V                          
Python 3.7.2+
$ .tox/py37/bin/python examples/dcc_send_and_get.py
INFO irc3d      Started
INFO irc3.receiver sender is offering dcc_send_and_get.py
INFO irc3.sender file sent to receiver
INFO irc3.receiver file received from sender
kitten77 commented 4 years ago

Could this relate to ipv6?

gawel commented 4 years ago

Maybe. But the current traceback to show some 127.0.0.1

kitten77 commented 4 years ago

Hmm pusseling, I know there is an issue if you try using dcc if you have connected with ipv6 to an ircd server.

gawel commented 4 years ago

Maybe it's possible to reproduce with irc3d (never tried to run it with ipv6)