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] Protonvpn-cli 2.2.4 doesn't work with ([!] There was an error connecting to the ProtonVPN API) ERROR #235

Open
farzinh opened this issue Sep 20, 2020 · 24 comments

Comments

@farzinh
Copy link

farzinh commented Sep 20, 2020

Protonvpn-cli version 2.2.4 doesn't work on Linux with this errors:

[!] There was an error connecting to the ProtonVPN API.
[!] Please make sure your connection is working properly!

after searching around I find out error comes from this version 2.2.4, now I just downgrade to 2.1.0 and everything works properly.

I checked out utils.py file in both of versions and It seems like problem comes from API initiation, protonvpn.com is a filtered domain in countries like Iran but in 2.1.0 API comes from protonmail.com and it's working properly.

Desktop (please complete the following information):

  • OS: MX Linux 19.2
  • Python Version: python3.7
  • ProtonVPN-CLI Version: 2.2.4
@ghonchesefidi
Copy link

Check this link:
ProtonVPN/linux-cli#97

@aliazani
Copy link

@Rafficer I have the same problem please check the solution here it make sense I think:
https://github.com/ProtonVPN/linux-cli/pull/237

@Rafficer
Copy link
Owner

No need for a proxy, you can change the api domain in the config file.

@aliazani
Copy link

@Rafficer I changed api_domain to https://api.protonmail.ch/ but still have the same problem

@Rafficer
Copy link
Owner

It's just supposed to be api.protonmail.ch iirc.

@aliazani
Copy link

@Rafficer Thanks I changed it and now it works properly :)

@iiriix
Copy link

iiriix commented Sep 26, 2020

No need for a proxy, you can change the api domain in the config file.

@Rafficer This can be easily blocked again. Isn't it better to add proxy support for the users who need it?

@Rafficer
Copy link
Owner

Brings the issue of "do you trust the proxy". The better solution is to implement alternative routing, which is being worked on.

@iiriix
Copy link

iiriix commented Sep 26, 2020

This can be an optional feature for those who "trust their proxy", and of course, it will be disabled by default. :-/

@molaeiali
Copy link

molaeiali commented Sep 27, 2020

@Rafficer "Proxy" is not necessarily a server which we have no control on, It can be Tor, or a ssh tunnel to our own server, etc. Clearly, the proxy is just an option that can be used by users who live in countries with blocked ProtonVPN domains.

@Rafficer
Copy link
Owner

Definitely, but it also gives users that don't know any better the possibility to reveal information they shouldn't reveal.

@iiriix
Copy link

iiriix commented Sep 28, 2020

With all due respect, it doesn't make sense. It's similar to "Custom DNS", "Kill Switch", or even "Split Tunneling". If you don't know what you're doing, all of them can reveal information you shouldn't reveal. :)

@jdbancal
Copy link

Same problem here, but from France(!). Also, ping api.protonvpn.ch is successful. Nevertheless, the command sudo protonvpn init returns

[!] There was an error connecting to the ProtonVPN API.
[!] Please make sure your connection is working properly!

After changing the api server to api.protonmail.ch in /usr/local/lib/python3.8/dist-packages/protonvpn_cli/utils.py, sudo protonvpn init is successful. However, I still cannot connect, the command sudo protonvpn c ends with the following message:

Connecting to CH#18-TOR via TCP...
[!] Authentication failed. 
[!] Please make sure that your Username and Password is correct.

Using here the password with which I can log onto http://www.protonvpn.com. Hence, I still cannot connect from my PC.

@jdbancal
Copy link

jdbancal commented Dec 7, 2020

All the docs out there may not be consistent at the moment... Maybe this could be linked with using the protonvpn login credentials, instead of the openvpn ones (accessible through the settings menu on the protonvpn website)

@farzinh
Copy link
Author

farzinh commented Feb 28, 2021

I'm using version 2.1.0, and it's working like a charm.

@JRDetwiler
Copy link

OP's original post helped me; I'm on Manjaro currently. I was experiencing the

[!] There was an error connecting to the ProtonVPN API.
[!] Please make sure your connection is working properly!

message from my new house where I had new service (pretty crappy) and a new router. If I ran the status command after connecting, I would find that my previous connection had resumed. However, everything was working whenever I would connect elsewhere, like on campus at my university, making me think it had to be one of those two causing the problem.

I just ran sudo protonvpn init again and that fixed it. Hopefully it'll stay fixed.

@kopach
Copy link

kopach commented Mar 4, 2022

hi there. any updates on this? I'm facing the same issue

@JRDetwiler
Copy link

hi there. any updates on this? I'm facing the same issue

There's a new app altogether now.
https://protonvpn.com/blog/protonvpn-linux-app/

@kopach
Copy link

kopach commented Mar 23, 2022

There's a new app altogether now. protonvpn.com/blog/protonvpn-linux-app

It seems to not support CLI mode and requires GUI (which I do not have on my machine)

@JRDetwiler
Copy link

There's a new app altogether now. protonvpn.com/blog/protonvpn-linux-app

It seems to not support CLI mode and requires GUI (which I do not have on my machine)

You're looking for this then. https://protonvpn.com/support/linux-vpn-tool/

@em20nn
Copy link

em20nn commented Jun 1, 2022

I don't know what caused my error but I could overcome with this line;
sudo protonvpn c -f (for fastest) -p tcp (or udp)
I dont know what the issue is and how to fix, but this line made me connect to the fastest server using tcp protocol.

@Alireza17224
Copy link

Same issue

@jh-devv
Copy link

jh-devv commented Nov 25, 2023

Same issue on NIX OS with the CLI and GUI

@PAVAN1698
Copy link

I am getting the below error while using Proton VPN CLI.
Is this information correct? [Y/n]: Y
Writing configuration to disk...
[!] There was an error with accessing the ProtonVPN API.
[!] Please make sure your connection is working properly!
[!] HTTP Error Code: 422

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

14 participants