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

Uncaught exception, closing connection. #136

Closed
tonygil opened this issue Jul 6, 2018 · 7 comments
Closed

Uncaught exception, closing connection. #136

tonygil opened this issue Jul 6, 2018 · 7 comments

Comments

@tonygil
Copy link

tonygil commented Jul 6, 2018

Hi Have this error , not sure what is causing it..............................
*** IMPORTANT! ***
** AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process.
** ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network.
This server should automatically be allocated the IP address: 192.168.4.2.
If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.
.....Uncaught exception, closing connection.
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
Exception in callback None()
handle:
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\platform\asyncio.py", line 117, in _handle_events
handler_func(fileobj, events)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
.....Uncaught exception, closing connection.
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
Exception in callback None()
handle:
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\platform\asyncio.py", line 117, in _handle_events
handler_func(fileobj, events)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
...............Uncaught exception, closing connection.
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
Exception in callback None()
handle:
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\platform\asyncio.py", line 117, in _handle_events
handler_func(fileobj, events)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 657, in _handle_events
self._handle_read()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1514, in _handle_read
self._do_ssl_handshake()
File "C:\Users\Tony\AppData\Roaming\Python\Python37\site-packages\tornado\iostream.py", line 1434, in _do_ssl_handshake
self.socket.do_handshake()
File "C:\Users\Tony\AppData\Local\Programs\Python\Python37\lib\ssl.py", line 1108, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
..Uncaught exception, closing connection.

@sillyfrog
Copy link
Collaborator

As you are on Windows, please use Python 3.5, there is also the option of the prebuilt binary you can use.

There is some issue with 3.7 that I have not had time to look at.

@ghost
Copy link

ghost commented Dec 11, 2018

Hello, having a similar issue with Ubuntu 18.04, I've got a venv with python 3.6 installed.

debug_1544498543.log

Can you take a look? I'm unsure of how to check the firmware, but I'm wondering if I'm running into that issue.

@dison4linux
Copy link

Getting same on Ubuntu 18.10 with either O.S. packaged Python 3.6 or manually installed Python 3.5

`
Exception in callback None()
handle:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/asyncio/events.py", line 127, in _run
self._callback(*self._args)
File "/home/jon/.local/lib/python3.5/site-packages/tornado/platform/asyncio.py", line 122, in _handle_events
handler_func(fileobj, events)
File "/home/jon/.local/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/jon/.local/lib/python3.5/site-packages/tornado/iostream.py", line 709, in _handle_events
self._handle_read()
File "/home/jon/.local/lib/python3.5/site-packages/tornado/iostream.py", line 1581, in _handle_read
self._do_ssl_handshake()
File "/home/jon/.local/lib/python3.5/site-packages/tornado/iostream.py", line 1501, in _do_ssl_handshake
self.socket.do_handshake()
File "/usr/local/lib/python3.5/ssl.py", line 996, in do_handshake
self._sslobj.do_handshake()
File "/usr/local/lib/python3.5/ssl.py", line 641, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error

`

@brunetton
Copy link

brunetton commented Dec 19, 2018

Exactly the same error here, in a virtualenv using Python 3.5.6 on Ubuntu 18.04:

Package       Version
------------- -------
httplib2      0.12.0 
netifaces     0.10.7 
pip           18.1   
pkg-resources 0.0.0  
setuptools    40.6.3 
tornado       4.5.1  
wheel         0.32.3 

Also tried with the last tornado version: 5.1.1

  File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
OSError: [Errno 0] Error
....
*** IMPORTANT! ***
** AFTER the first download is COMPLETE, with in a minute or so you should connect to the new SSID "FinalStage" to finish the process.
** ONLY disconnect when the new "FinalStage" SSID is visible as an available WiFi network.
This server should automatically be allocated the IP address: 192.168.4.2.
If you have successfully connected to "FinalStage" and this is not the IP Address you were allocated, please ensure no other device has connected, and reboot your Sonoff.
.............Uncaught exception, closing connection.
Traceback (most recent call last):
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 709, in _handle_events
    self._handle_read()
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 1581, in _handle_read
    self._do_ssl_handshake()
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 1501, in _do_ssl_handshake
    self.socket.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
OSError: [Errno 0] Error
Exception in callback None()
handle: <Handle cancelled>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/events.py", line 127, in _run
    self._callback(*self._args)
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/platform/asyncio.py", line 122, in _handle_events
    handler_func(fileobj, events)
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/stack_context.py", line 300, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 709, in _handle_events
    self._handle_read()
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 1581, in _handle_read
    self._do_ssl_handshake()
  File "/home/bruno/tmp/virtualenv/lib/python3.5/site-packages/tornado/iostream.py", line 1501, in _do_ssl_handshake
    self.socket.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
OSError: [Errno 0] Error

@sillyfrog
Copy link
Collaborator

In all these cases I suspect it's also running newer firmware that does not work with SonOTA (as per the README.md), and Python does not like the way the Sonoff drops the connection.

@brunetton
Copy link

I think #57 is the same issue as this one (this one is probably a duplicate)

@brunetton
Copy link

In all these cases I suspect it's also running newer firmware that does not work with SonOTA (as per the README.md), and Python does not like the way the Sonoff drops the connection.

Yes, totally probable (this is a Sonoff basic with firmware v1.8.1)

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

No branches or pull requests

4 participants