jarun / googler

:mag: Google from the terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERROR] Failed to connect to www.google.com: EOF occurred in violation of protocol (_ssl.c:1123)

brandong954 opened this issue · comments

Googler stopped working due to this error:

/usr/src/app # googler hello
[ERROR] Failed to connect to www.google.com: EOF occurred in violation of protocol (_ssl.c:1123).
/usr/src/app # googler -d
[DEBUG] googler version 4.3.2
[DEBUG] Python version 3.9.1
[DEBUG] Platform: Linux-5.10.25-linuxkit-x86_64-with
[DEBUG] Connecting to new host www.google.com
[DEBUG] Opened socket to 142.251.33.100:443
Traceback (most recent call last):
  File "/usr/local/bin/googler", line 2159, in new_connection
    self._conn.connect(self._notweak)
  File "/usr/local/bin/googler", line 1622, in connect
    self.sock = ssl_context.wrap_socket(sock)
  File "/usr/local/lib/python3.9/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.9/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.9/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/googler", line 3819, in <module>
    main()
  File "/usr/local/bin/googler", line 3792, in main
    repl = GooglerCmd(opts)
  File "/usr/local/bin/googler", line 2792, in __init__
    self._conn = GoogleConnection(self._google_url.hostname,
  File "/usr/local/bin/googler", line 2099, in __init__
    self.new_connection(host, port=port, timeout=timeout)
  File "/usr/local/bin/googler", line 1569, in wrapped
    ret = func(*args, **kwargs)
  File "/usr/local/bin/googler", line 2162, in new_connection
    raise GoogleConnectionError(msg)
__main__.GoogleConnectionError: Failed to connect to www.google.com: EOF occurred in violation of protocol (_ssl.c:1123).
/usr/src/app # python --version
Python 3.9.1
/usr/src/app # uname -a
Linux 671732eadb60 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 Linux
commented

Not a googler issue. Please see #224.

Thank you sir, using --notweak made it work.