Bavarder / Bavarder

Chit-chat with an AI

Home Page:https://bavarder.codeberg.page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashes on opening setting.

Anikmoujegy opened this issue · comments

Describe the bug
I am using "flatpak" version. So when try to open setting window got stacked and not responding popup rises and then app got crashed.
To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Hamburger menu'
  2. Click on 'Settings'

Hmm, I can't reproduce

Having the same issue on pop os, tried installing from the store and flatpack both give the same issue, except the app does not crash, it just hangs for about 5 seconds and preferences does not open at all.
How can I get you any logs to be able to identify the problem?

Running from the terminal and trying to open the Preferences window, the app doesn't crash but the window never opens

Looks like its giving an error when it tries to connect to stablehorde.net, when I try to access manually Firefox also gives an error due to a self-signed certificate

❯ flatpak run io.github.Bavarder.Bavarder
Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
    conn.connect()
  File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 642, in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/connection.py", line 783, in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
               ^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 469, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 513, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1104, in _create
    self.do_handshake()
  File "/usr/lib/python3.11/ssl.py", line 1382, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 790, in urlopen
    response = self._make_request(
               ^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/connectionpool.py", line 844, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='stablehorde.net', port=443): Max retries exceeded with url: /api/v2/status/models?type=text (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/share/bavarder/bavarder/main.py", line 221, in on_preferences_action
    self.preferences_window = PreferencesWindow(self.win)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/bavarder/bavarder/views/preferences_window.py", line 32, in __init__
    self.setup()
  File "/app/share/bavarder/bavarder/views/preferences_window.py", line 36, in setup
    self.load_providers()
  File "/app/share/bavarder/bavarder/views/preferences_window.py", line 47, in load_providers
    p = Provider(self.app, self, provider)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/bavarder/bavarder/providers/provider_item.py", line 22, in __init__
    self.setup()
  File "/app/share/bavarder/bavarder/providers/provider_item.py", line 29, in setup
    if self.provider.get_settings_rows():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/bavarder/bavarder/providers/aihorde.py", line 72, in get_settings_rows
    r = requests.get("https://stablehorde.net/api/v2/status/models?type=text")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/requests/adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='stablehorde.net', port=443): Max retries exceeded with url: /api/v2/status/models?type=text (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1006)')))
^C⏎