linux-app
linux-app copied to clipboard
Error loading servers
We are happy to answer your questions about the code or discuss technical ideas.
Please complete the following checklist (by adding [x]):
- [ X] I have searched open and closed issues for duplicates
- [ X] This isn't a feature request
- [ X] This is not a report about my app not working as expected
The latest update breaks while fetching the server list:

Platform:
Linux parrot 5.10.0-8parrot1-amd64 #1 SMP Debian 5.10.46-8parrot1 (2021-07-21) x86_64 GNU/Linux
Logs:
2021-08-09 05:18:58,620 — main.py — INFO —do_startup:66 —
-------------------------------------------------
----------- Initialized protonvpn -----------
-------------------------------------------------
2021-08-09 05:18:58,634 — main.py — INFO —do_startup:78 — ProtonVPN v1.1.1 (protonvpn-nm-lib v3.3.2; proton-client v0.5.1)
2021-08-09 05:18:58,665 — main.py — INFO —do_startup:100 — Startup successful
2021-08-09 05:18:59,249 — dashboard.py — INFO —setup_icons_images:397 — Setting up dashboard images and icons
2021-08-09 05:18:59,272 — dashboard.py — INFO —setup_css:469 — Setting up css
2021-08-09 05:18:59,289 — dashboard.py — INFO —setup_actions:496 — Setting up actions
2021-08-09 05:18:59,305 — main.py — INFO —do_activate:251 — Window to display <dashboard.DashboardView object at 0x7fd2b457a240 (DashboardView at 0x182a2a0)>
2021-08-09 05:18:59,316 — dashboard.py — ERROR —__on_startup:218 — Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/protonvpn_gui/view_model/dashboard.py", line 216, in __on_startup
self.__server_list_vm.on_load_servers()
File "/usr/lib/python3/dist-packages/protonvpn_gui/view_model/dashboard.py", line 671, in on_load_servers
self.__generate_server_list()
File "/usr/lib/python3/dist-packages/protonvpn_gui/view_model/dashboard.py", line 682, in __generate_server_list
self.server_list.generate_list(
File "/usr/lib/python3/dist-packages/protonvpn_gui/model/server_list.py", line 119, in generate_list
server_list = protonvpn.get_session().servers
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/session/session.py", line 480, in servers
self.__vpn_logicals.json_loads(f.read())
File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/servers/list.py", line 245, in json_loads
self.__data = json.loads(data)
File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2021-08-09 05:19:07,198 — main.py — INFO —on_quit:104 — Quit app
2021-08-12 13:13:50,946 — main.py — INFO —do_startup:66 —
@calexandru2018 this looks easily fixable. Can someone have a look?
I am facing exactly the same issue on 5.14.5-arch1-1 from sometime now.
Both gui and cli versions are throwing the same error so the app is completely unusable.
Yeah seems to be not a priority issue here. I asked my school to switch over to other alternatives. I don't have much experience with python but still the contributor guidelines have nothing related to development setup, etc which makes are very difficult for others to contribute as well if the core members are too busy
Hey @parrotx-proton
Sorry for taking time in answering, being a solo developer it’s been hard on managing 4 GitHub repoes + plus the coding and bug fixing.
So this basically seems to me to be a caching issue, as it maybe attempts to cache but for some reason the JSON is corrupted.
I got this today, without updating the app. Something caused the cached server file to be emptied, and unfortunately I couldn't figure out a way to recover from this any other way than deleting the killswitch connection, deleting ~/.cache/protonvpn, and reopening the app to let it regenerate everything.
It's not ideal, but the error needs to be caught in some way at the very least, so the UI can at least finish loading and you can turn off killswitch without having to resort to command line.
Hey @parrotx-proton
Sorry for taking time in answering, being a solo developer it’s been hard on managing 4 GitHub repoes + plus the coding and bug fixing.
So this basically seems to me to be a caching issue, as it maybe attempts to cache but for some reason the JSON is corrupted.
That is fine, well understood and we really appreciate your efforts. May be over time if the contributor guidelines improve, other can chip in as well. Thanks for dropping in the clue and @Ammako 's solution works perfectly.
Got this error too on a computer with no more disk space left. After freeing space, the app would still not open, giving the same error. Will do the workaround.