core: Gogle Calendar ssl.SSLError: [SSL] internal error

The problem

Since I upgraded to Ubuntu Focal, the Google Calendar integration stopped working with a ssl.SSLError: [SSL] internal error.

Environment

  • Home Assistant Core release with the issue: 0.110.0
  • Last working Home Assistant Core release (if known): 0.107.0 (I think)
  • Operating environment (Home Assistant/Supervised/Docker/venv): Docker based on Ubuntu Focal 20.04 (Python 3.8)
  • Integration causing this issue: Google Calendar in the OAuth2 library cannot establish the SSL connection to Google servers
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/calendar.google/

Problem-relevant configuration.yaml


Traceback/Error logs

`020-05-20 20:31:15 ERROR (MainThread) [homeassistant.setup] Error during setup of component google
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 174, in _async_setup_component
    result = await hass.async_add_executor_job(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/google/__init__.py", line 212, in setup
    do_authentication(hass, config, conf)
  File "/usr/src/app/homeassistant/components/google/__init__.py", line 144, in do_authentication
    dev_flow = oauth.step1_get_device_and_user_codes()
  File "/usr/local/lib/python3.8/dist-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/oauth2client/client.py", line 1961, in step1_get_device_and_user_codes
    resp, content = transport.request(
  File "/usr/local/lib/python3.8/dist-packages/oauth2client/transport.py", line 280, in request
    return http_callable(uri, method=method, body=body, headers=headers,
  File "/usr/local/lib/python3.8/dist-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.8/dist-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.8/dist-packages/httplib2/__init__.py", line 995, in _conn_request
    conn.connect()
  File "/usr/lib/python3.8/http/client.py", line 1409, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL] internal error (_ssl.c:1108)

Additional information

Google Calendar Events cannot be replaced simply, so it is very annoying.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I came across this issue trying to get info for a lazylibrarian issue with the same ssl error. The lazylibrarian fix is to downgrade openssl and libssl1.1 to the versions shipped with ubuntu 19.10. You can download from https://packages.ubuntu.com/eoan/openssl and https://packages.ubuntu.com/eoan/libssl1.1 Not sure exactly what’s going on but something is broken in their library.

Same thing happened on Debian after openssl-1.1.1h-1 update. The following configuration can fix in in the meantime: https://bugs.python.org/msg376705