Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Not fetching server list #374

Open
autogris opened this issue Sep 27, 2024 · 4 comments
Open

[BUG] Not fetching server list #374

autogris opened this issue Sep 27, 2024 · 4 comments

Comments

@autogris
Copy link

autogris commented Sep 27, 2024

Describe the bug
Program stopped connecting today without any changes, throwing the following error:

[!] No Server in country NL found
[!] Please choose a valid country

Same happens with other country codes
May be related to this:
#342

To Reproduce
Steps to reproduce the behavior:

  1. Open terminal
  2. Invoke the program with protonvpn c --cc nl -p udp, or any other country
  3. Program says won't find server in country

Expected behavior
Program should connect to the vpn

Error Messages/Program Output/Log Messages (~/.pvpn-cli/pvpn-cli.log)
pvpn-cli.log:

2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:89 — ###########################
2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:90 — ### NEW PROCESS STARTED ###
2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:91 — ###########################
2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:92 — ['/usr/bin/protonvpn', 'c', '--cc', 'nl', '-p', 'tcp']
2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:93 — USER: user
2024-09-27 12:44:23,784 — protonvpn-cli — DEBUG — cli:94 — CONFIG_DIR: /home/[redacted]/.pvpn-cli
2024-09-27 12:44:23,786 — protonvpn-cli — DEBUG — cli:97 — Arguments
{'--cc': 'nl', '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': 'tcp', '<servername>': None, 'c': True, 'configure': False, 'connect': False, 'd': False, 'disconnect': False, 'examples': False, 'init': False, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False}
2024-09-27 12:44:23,793 — protonvpn-cli — DEBUG — country_f:186 — Starting fastest country connect
2024-09-27 12:44:23,793 — protonvpn-cli — DEBUG — disconnect:323 — Initiating disconnect
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — is_connected:202 — Checking connection Status. OpenVPN processes: 0
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_dns:624 — Restoring DNS
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_dns:641 — No Backupfile found
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_ipv6:704 — Restoring ip6tables
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_ipv6:719 — No Backupfile found
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_killswitch:794 — Restoring iptables
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — manage_killswitch:803 — No Backupfile found
2024-09-27 12:44:23,821 — protonvpn-cli — DEBUG — disconnect:363 — No connection found
2024-09-27 12:44:23,827 — protonvpn-cli — DEBUG — call_api:38 — Initiating API Call: https://api.protonvpn.ch/vpn/logicals
2024-09-27 12:44:27,858 — protonvpn-cli — DEBUG — call_api:72 — Successful json response
2024-09-27 12:44:28,132 — protonvpn-cli — DEBUG — pull_server_data:94 — SERVER_INFO_FILE written
2024-09-27 12:44:28,144 — protonvpn-cli — DEBUG — pull_server_data:101 — last_api_call updated
2024-09-27 12:44:28,148 — protonvpn-cli — DEBUG — get_servers:108 — Reading servers from file
2024-09-27 12:44:28,207 — protonvpn-cli — DEBUG — country_f:212 — No server in country NL

By running protonvpn connect -f I get the following:

Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 33, in <module>
    sys.exit(load_entry_point('protonvpn-cli', 'console_scripts', 'protonvpn')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/protonvpn-cli-community/protonvpn_cli/cli.py", line 72, in main
    cli()
  File "/opt/protonvpn-cli-community/protonvpn_cli/cli.py", line 121, in cli
    connection.fastest(protocol)
  File "/opt/protonvpn-cli-community/protonvpn_cli/connection.py", line 180, in fastest
    fastest_server = get_fastest_server(server_pool)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/protonvpn-cli-community/protonvpn_cli/utils.py", line 180, in get_fastest_server
    fastest_server = random.choice(fastest_pool[:pool_size])["Name"]
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/random.py", line 373, in choice
    raise IndexError('Cannot choose from an empty sequence')
IndexError: Cannot choose from an empty sequence

Desktop (please complete the following information):

  • OS: Slackware-current rolling version
  • Python Version: 3.11.10
  • ProtonVPN-CLI Version: 2.2.12

Additional context

@mara004
Copy link

mara004 commented Sep 27, 2024

Same issue on Fedora 37.
protonvpn connect -f produces the above IndexError.
And when invoking just protonvpn connect, I get the DialogError as in #342.

Note, upstream has abandoned F37, so I'm not able to use the official client.
Trying to use the legacy https://repo.protonvpn.com/fedora-37-stable/ repo led to GPG issues.

@autogris
Copy link
Author

I also can't use official client because it requires systemd, which my distro don't use.

@goodevilgenius
Copy link

Just discovered this issue when I restarted protonvpn for the first time in a long while. I'm using a headless system, which the official client doesn't support, so I'm kind of stuck without a VPN right now.
Any progress on this issue?

@lsli8888
Copy link

I just started getting this error yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants