ProtonVPN / proton-vpn-gtk-app

Official ProtonVPN Linux app
https://protonvpn.com/download-linux
GNU General Public License v3.0
152 stars 20 forks source link

Deleting my .cache folder caused a RuntimeError #25

Closed GloriousWizard closed 5 months ago

GloriousWizard commented 5 months ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


❯ protonvpn-app
2024-01-27T04:49:31.903948 | proton.vpn.connection.vpnconnector:168 | INFO | CONN:STATE_CHANGED | Disconnected (initial state)
2024-01-27T04:49:32.076491 | proton.vpn.session.session:92 | ERROR | Error deserializing VPN session.
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/servers/fetcher.py", line 107, in load_from_cache
    cache = self._cache_file.load()
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/cache.py", line 57, in load
    return CacheFile.from_path(self.file_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/cache.py", line 69, in from_path
    with open(file_path, "r", encoding="utf-8") as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/elmo/.cache/Proton/VPN/serverlist.json'

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

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/session.py", line 89, in __setstate__
    self._server_list = self._fetcher.load_server_list_from_cache()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/fetcher.py", line 96, in load_server_list_from_cache
    return self._server_list_fetcher.load_from_cache()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/session/servers/fetcher.py", line 109, in load_from_cache
    raise ServerListDecodeError("Cached server list was not found") from error
proton.vpn.session.exceptions.ServerListDecodeError: Cached server list was not found
Traceback (most recent call last):
  File "/usr/bin/protonvpn-app", line 33, in <module>
    sys.exit(load_entry_point('proton-vpn-gtk-app==4.1.8', 'console_scripts', 'protonvpn-app')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/__main__.py", line 34, in main
    controller = Controller.get(executor)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 55, in get
    executor.submit(controller.initialize_vpn_connector).result()
  File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 101, in initialize_vpn_connector
    self._reconnector.enable()
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/services/reconnector/reconnector.py", line 91, in enable
    raise RuntimeError("VPN data refresher is not ready.")
RuntimeError: VPN data refresher is not ready.
GloriousWizard commented 5 months ago

Solved with b2a9d4c