linux-cli-community icon indicating copy to clipboard operation
linux-cli-community copied to clipboard

[BUG] Protonvpn-cli 2.2.4 doesn't work with ([!] There was an error connecting to the ProtonVPN API) ERROR

Open farzinh opened this issue 3 years ago • 24 comments

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

farzinh avatar Sep 20 '20 10:09 farzinh

Check this link: https://github.com/ProtonVPN/linux-cli/issues/97

ghonchesefidi avatar Sep 21 '20 09:09 ghonchesefidi

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

aliazani avatar Sep 26 '20 15:09 aliazani

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

Rafficer avatar Sep 26 '20 15:09 Rafficer

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

aliazani avatar Sep 26 '20 16:09 aliazani

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

Rafficer avatar Sep 26 '20 16:09 Rafficer

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

aliazani avatar Sep 26 '20 16:09 aliazani

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?

iiriix avatar Sep 26 '20 17:09 iiriix

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

Rafficer avatar Sep 26 '20 17:09 Rafficer

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

iiriix avatar Sep 26 '20 17:09 iiriix

@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.

molaeiali avatar Sep 27 '20 20:09 molaeiali

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

Rafficer avatar Sep 27 '20 20:09 Rafficer

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. :)

iiriix avatar Sep 28 '20 06:09 iiriix

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 avatar Nov 19 '20 08:11 jdbancal

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)

jdbancal avatar Dec 07 '20 16:12 jdbancal

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

farzinh avatar Feb 28 '21 19:02 farzinh

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.

JRDetwiler avatar Apr 08 '21 16:04 JRDetwiler

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

kopach avatar Mar 04 '22 10:03 kopach

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/

JRDetwiler avatar Mar 04 '22 20:03 JRDetwiler

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)

kopach avatar Mar 23 '22 14:03 kopach

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/

JRDetwiler avatar Mar 23 '22 15:03 JRDetwiler

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.

em20nn avatar Jun 01 '22 09:06 em20nn

Same issue

Alireza17224 avatar Oct 14 '22 09:10 Alireza17224

Same issue on NIX OS with the CLI and GUI

jh-devv avatar Nov 25 '23 12:11 jh-devv

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

PAVAN1698 avatar Apr 01 '24 07:04 PAVAN1698