# Could not login from androind using ovpn file but same works on iOS

**URL:** <https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752>\
**Category:** Pritunl\
**Tags:** pritunl-client\
**Created:** [January 29, 2024, 9:17am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752 "2024-01-29T09:17:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![babu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/9f8e36/32.png) [@babu](https://forum.pritunl.com/u/babu)\
**Post date:** [January 29, 2024, 9:17am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/1 "2024-01-29T09:17:53Z")

</div>

Could not login using ovpn file in androind but same works in ios

I am able to import ovpn file without any issue, able to enter username, password & totp, but login is failed.

Android client open vpn connect version: 3.4.0 (9755)

I have tried it from different andoid devices as well with same open vpn connect version

Server used is Pritunl Free

---

<div class="post-metadata">

**Author:** ![afahre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@afahre](https://forum.pritunl.com/u/afahre)\
**Post date:** [January 30, 2024, 7:29am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/2 "2024-01-30T07:29:23Z")

</div>

OpenVPN Connect version 3.4.0++ on Android has problems with two-factor authentication. Version 3.3.4 works without problems.

Me too have the same problem with version 3.4++ on android.

---

<div class="post-metadata">

**Author:** ![babu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/9f8e36/32.png) [@babu](https://forum.pritunl.com/u/babu)\
**Post date:** [January 30, 2024, 8:52am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/3 "2024-01-30T08:52:58Z")

</div>

Thanks a lot…  
Got the old apk version from [here](https://www.apkmirror.com/apk/openvpn/openvpn-connect/openvpn-connect-3-3-4-release/) & works

---

<div class="post-metadata">

**Author:** ![afahre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@afahre](https://forum.pritunl.com/u/afahre)\
**Post date:** [January 30, 2024, 2:31pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/4 "2024-01-30T14:31:46Z")

</div>

yeah, but it’s just a temporary solution. hope they will fix it asap

---

<div class="post-metadata">

**Author:** ![babu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/9f8e36/32.png) [@babu](https://forum.pritunl.com/u/babu)\
**Post date:** [January 30, 2024, 3:38pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/5 "2024-01-30T15:38:59Z")

</div>

Yes, sharing refernce to other post [here](https://forum.pritunl.com/t/openvpn-3-4-0-for-android-problems-with-2fa/1744) where the same issue is raised and responded by Pritunl team member

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 30, 2024, 4:31pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/6 "2024-01-30T16:31:42Z")

</div>

I can’t replicate any issues on Android v3.4.0 with Google Authenticator enabled. Server is Oracle Linux 8 with `pritunl-openvpn` v2.6.6.

---

<div class="post-metadata">

**Author:** ![babu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/9f8e36/32.png) [@babu](https://forum.pritunl.com/u/babu)\
**Post date:** [January 30, 2024, 5:28pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/7 "2024-01-30T17:28:38Z")

</div>

steps to reproduce  
download new ovpn file for the user & upload it then login from open vpn connect 3.4.0

if you have tried to login with already uploaded ovpn file, then it might work

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 30, 2024, 6:16pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/8 "2024-01-30T18:16:01Z")

</div>

I used a new install and profile. What Linux distribution and server version are you using?

---

<div class="post-metadata">

**Author:** ![babu](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/9f8e36/32.png) [@babu](https://forum.pritunl.com/u/babu)\
**Post date:** [January 30, 2024, 6:43pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/9 "2024-01-30T18:43:31Z")

</div>

Amazon EC2 - Ubuntu 20.04.2 LTS (GNU/Linux 5.15.0-1017-aws x86\_64)  
pritunl v1.29.2664.67  
free version of pritunl

---

<div class="post-metadata">

**Author:** ![fmalykh](https://forum.pritunl.com/user_avatar/forum.pritunl.com/fmalykh/32/252_2.png) [@fmalykh](https://forum.pritunl.com/u/fmalykh)\
**Post date:** [January 30, 2024, 6:51pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/10 "2024-01-30T18:51:23Z")

</div>

Same thing - OpenVPN 3.4.0 will infinitely ask for Google 2FA code, Pritunl logs show  
`User connection to "XXX" denied. User failed two-step authentication`.  
Downgrading OpenVPN client to 3.3.4 fixes the issue.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 30, 2024, 7:57pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/11 "2024-01-30T19:57:54Z")

</div>

I could not reproduce the issue on Ubuntu 20.04 Pritunl v1.32.

Try disabling OpenVPN authentication cache in the top right settings if it is set.

Run the commands below to edit the authorizer find the `_check_password` function and add the log message to the first line of the function with the correct indention. Then restart the service and this will allow seeing what is getting sent to the server in the password field. The path below is for a v1.32 release, on older releases you will need to find the file similar to `/usr/lib/pritunl/lib/python3.8/site-packages/pritunl/authorizer/authorizer.py` with the correct Python version.

```auto
sudo nano /usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/authorizer/authorizer.py
ctrl+w def _check_pass
logger.info('Checking password', 'auth', user_name=self.user.name, password=self.password)
ctrl+x s
sudo systemctl restart pritunl

```

---

<div class="post-metadata">

**Author:** ![afahre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@afahre](https://forum.pritunl.com/u/afahre)\
**Post date:** [January 31, 2024, 1:02am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/12 "2024-01-31T01:02:55Z")

</div>

here are the logs when using OpenVPN client version 3.4.0++ :

[summer-waves-3000][2024-01-31 07:59:41,934][INFO] Authenticating user  
user\_name = “danang”  
factors = [“otp”]  
[summer-waves-3000][2024-01-31 07:59:41,935][INFO] Checking password  
user\_name = “danang”  
password = “122345”  
[summer-waves-3000][2024-01-31 07:59:50,035][INFO] Authenticating user  
user\_name = “danang”  
factors = [“otp”]  
[summer-waves-3000][2024-01-31 07:59:50,036][INFO] Checking password  
user\_name = “danang”  
password = “SCRV1:MTIyMzQ1:MjMwNDY4”

and here are when using the old version :

[summer-waves-3000][2024-01-31 07:56:19,900][INFO] Authenticating user  
user\_name = “ari”  
factors = [“otp”, “pin”]  
[summer-waves-3000][2024-01-31 07:56:19,903][INFO] Checking password  
user\_name = “ari”  
password = “123456”  
[summer-waves-3000][2024-01-31 07:56:26,546][INFO] Authenticating user  
user\_name = “ari”  
factors = [“otp”, “pin”]  
[summer-waves-3000][2024-01-31 07:56:26,547][INFO] Checking password  
user\_name = “ari”  
password = “635274”

The v3.4.0 logs otp code like encrypted or something.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 31, 2024, 5:24am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/13 "2024-01-31T05:24:42Z")

</div>

This will be fixed in the next release. Commit [**4ac85ff**](https://github.com/pritunl/pritunl/commit/4ac85ff18fdfa39cfffc3a3a68e643d836cdf24b) can be applied to the `authorizer.py` file to fix the issue.

---

<div class="post-metadata">

**Author:** ![afahre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@afahre](https://forum.pritunl.com/u/afahre)\
**Post date:** [January 31, 2024, 7:52am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/14 "2024-01-31T07:52:26Z")

</div>

thank youu zach

---

<div class="post-metadata">

**Author:** ![ardianre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@ardianre](https://forum.pritunl.com/u/ardianre)\
**Post date:** [July 4, 2024, 11:51pm UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/15 "2024-07-04T23:51:48Z")

</div>

Hi @afahre, i still cannot login or use vpn client in android. Can you share information which version openvpn client in android that you use please?  
I tried with 3.4.2, 3.3.4, 3.3.3, 3.2.6 version but still error after import the profile. The popup error is User Authentication Failed.  
Here’s the capture from me and there is a log that shows us if the user/pass empty, I believe that it should be filled.  
Many thanks for any guidance here 🙏

 ![IMG_20240705_064521](https://forum-static.pritunl.com/original/1X/30c31f08b98eabf64acc615b34381b8449a391c9.jpeg)

---

<div class="post-metadata">

**Author:** ![afahre](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@afahre](https://forum.pritunl.com/u/afahre)\
**Post date:** [July 19, 2024, 8:04am UTC](https://forum.pritunl.com/t/could-not-login-from-androind-using-ovpn-file-but-same-works-on-ios/1752/16 "2024-07-19T08:04:43Z")

</div>

i think you should update the server to the latest version, they already fixed the issue.
