Import error "failed to parse profile" new update 3.2.7

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Lomic
OpenVpn Newbie
Posts: 2
Joined: Wed May 04, 2022 12:35 pm

Import error "failed to parse profile" new update 3.2.7

Post by Lomic » Wed May 04, 2022 12:45 pm

Hi. Encountered with the issue after last update 3.2.7 build 7957.
Phones with the issue - redmi note 9 pro and Samsung s10+.
In folder we have 4 files, key, ca, client cert and *.ovpn config.
While we importing ovpn config on new version we encountered withe issue of failed to parse profile and it list our files...
Ammm sorry not understood how to add screenshot (

On version 3.2.5 all worked fine. Without any errors.

Lomic
OpenVpn Newbie
Posts: 2
Joined: Wed May 04, 2022 12:35 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Lomic » Wed May 04, 2022 2:27 pm

How I understood after updating app loose rights to use explorer. And I can't edit it. So it will be great to fix this issue, because on the redmi note 4 or 5 rights for this app stay and new version continue work without any errors.

makkio
OpenVpn Newbie
Posts: 2
Joined: Thu Mar 10, 2022 12:06 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by makkio » Mon May 16, 2022 7:06 am

same identical problem on a samsung galaxy tab s7.
Worked some days ago, but after a device factory reset i reinstalled ovpn connect and i obtained this error.
I tried using inline certificates and keys but in that case i obtained "line too long" error either on android and in windows.

Solutions?

Flotech88
OpenVpn Newbie
Posts: 2
Joined: Fri May 20, 2022 1:00 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Flotech88 » Fri May 20, 2022 1:29 pm

Hello,

Same since 3.2.7 update, unable to import config files:
Failed to import profile (Failed to parse profile)

Very blocking when using this application "in production" ....

A new update is expected soon?

At the moment I haven't found a solution, if anyone has anything?

Flotech88
OpenVpn Newbie
Posts: 2
Joined: Fri May 20, 2022 1:00 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Flotech88 » Fri May 20, 2022 3:32 pm

I found the solution, I redownloaded the profile with my mobile from my firewall, choosing "SSL VPN profile for OpenVPN Connect mobile clients (single .ovpn file)" and importing just this config file, the connection is okay

andrixnet
OpenVpn Newbie
Posts: 2
Joined: Wed Aug 09, 2017 5:34 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by andrixnet » Fri Jun 03, 2022 7:57 am

I hit the same problem with a newly installed app (3.2.7 v7957) on a samsung tablet.
I looked under settings, it showed permissions: Files and media DENIED. I manually set it to allowed, but it can only be set to "media only".
Of course, it doesn't work to import a profile. I'm stuck.

I have an APK version 3.2.5, but due to "benevolent Google" removing permission to install from other source, I can't get it to work.

4Star
OpenVpn Newbie
Posts: 2
Joined: Wed Jun 08, 2022 1:16 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by 4Star » Wed Jun 08, 2022 1:18 pm

I had exactly the same issue, everything works fine on the PC client but cannot get the mobile to work.

I did get it working in the end, I had to use the inline profile configuration in the .ovpn file. Adding the Keys into the VPN profile allowed it to import successfully. As others have said I think it's that the client no longer realises the other files are in the same folder as the profile you're importing and can't access the things it needs.

fabry09
OpenVpn Newbie
Posts: 1
Joined: Fri Jun 10, 2022 11:14 am

Re: Import error "failed to parse profile" new update 3.2.7

Post by fabry09 » Fri Jun 10, 2022 11:16 am

Dear Openvpn Support

same problem!!!!!!!!!!!!!!!!!!!!!!

The profile does not import, is the same profile successfully imported in the last release (before 3.2.7).

Do you think OPENVPN could solve as soon as possibile????

Thank you

Trav2974
OpenVpn Newbie
Posts: 1
Joined: Fri Jun 10, 2022 11:15 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Trav2974 » Fri Jun 10, 2022 11:23 pm

4Star wrote:
Wed Jun 08, 2022 1:18 pm
I had exactly the same issue, everything works fine on the PC client but cannot get the mobile to work.

I did get it working in the end, I had to use the inline profile configuration in the .ovpn file. Adding the Keys into the VPN profile allowed it to import successfully. As others have said I think it's that the client no longer realises the other files are in the same folder as the profile you're importing and can't access the things it needs.
The inline profile configuration is the way to make it work as 4Star has said. I had to google it for help on how to correctly do the "inline configuration" but this worked for me. Here's a link to the article that helped:
https://gist.github.com/renatolfc/f6c9e2a5bd6503005676

Following that, I'm on Android and noticed that it failed to parse on the "[inline]" blocks as another user noted. So you just take those lines out completely. In other words, you won't have the 3 rows on lines 8, 9, and 10 in that github example above. Find the other 3 files and edit them in Notepad (or whatever), copy the text in those files and place them between the appropriate blocks at the end of the file (<ca></ca>, <key></key>, and <cert></cert>) and that should work. Client.key file goes in the <key> block, ca.crt file goes in the <ca> block, and client.crt goes in the <cert> block.

Save your .opvn file with those changes and drop it on your phone and import - should do the trick!

mizuhoid
OpenVpn Newbie
Posts: 1
Joined: Sun Jul 03, 2022 3:22 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by mizuhoid » Sun Jul 03, 2022 3:36 pm

The error that has been discussed here is like this?

```
Failed to import profile
Failed to parse profile: ta.key:
cannot open for read: /data/user/0/net.openvpn.openvpn/files/temp/ta.key
```

Image

Bekese
OpenVpn Newbie
Posts: 1
Joined: Mon Jul 18, 2022 6:58 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Bekese » Mon Jul 18, 2022 7:01 pm

4Star wrote:
Wed Jun 08, 2022 1:18 pm
I had exactly the same issue, everything works fine on the PC client but cannot get the mobile to work.

I did get it working in the end, I had to use the inline profile configuration in the .ovpn file. Adding the Keys into the VPN profile allowed it to import successfully. As others have said I think it's that the client no longer realises the other files are in the same folder as the profile you're importing and can't access the things it needs.
How did you add the keys into the VPN profile? can you show what the new config looks like?

Monska85
OpenVpn Newbie
Posts: 1
Joined: Wed Jul 20, 2022 10:02 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by Monska85 » Wed Jul 20, 2022 10:07 pm

Bekese wrote:
Mon Jul 18, 2022 7:01 pm
4Star wrote:
Wed Jun 08, 2022 1:18 pm
I had exactly the same issue, everything works fine on the PC client but cannot get the mobile to work.

I did get it working in the end, I had to use the inline profile configuration in the .ovpn file. Adding the Keys into the VPN profile allowed it to import successfully. As others have said I think it's that the client no longer realises the other files are in the same folder as the profile you're importing and can't access the things it needs.
How did you add the keys into the VPN profile? can you show what the new config looks like?
As described here, you can use the following syntax to add the inline configuration in your .ovpn files:

Code: Select all

<ca>
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
</key>
ATTENTION: remember to remove any occurrences of the file path configuration (e.g.: ca /path/of/your/ca/certificate)

susli
OpenVpn Newbie
Posts: 1
Joined: Sat Aug 27, 2022 11:20 am

Re: Import error "failed to parse profile" new update 3.2.7

Post by susli » Sat Aug 27, 2022 11:43 am

mizuhoid wrote:
Sun Jul 03, 2022 3:36 pm
The error that has been discussed here is like this?

```
Failed to import profile
Failed to parse profile: ta.key:
cannot open for read: /data/user/0/net.openvpn.openvpn/files/temp/ta.key
```

Image
Hello, I found an earlier post how to add ta.key file into ovpn file as inline.

I tried it and it works
you can find it here:
viewtopic.php?t=11987#p26978

my client.ovpn file looks like this:

Code: Select all

client
dev tun
proto udp
remote "your.domain port"
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
key-direction 1
cipher AES-256-CBC
verb 3

<ca>
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
[...]
-----END ENCRYPTED PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
[...]
-----END OpenVPN Static key V1-----
</tls-auth>

dandash
OpenVpn Newbie
Posts: 1
Joined: Wed Mar 01, 2023 5:20 pm

Re: Import error "failed to parse profile" new update 3.2.7

Post by dandash » Wed Mar 01, 2023 5:32 pm

Hello, same problem after update to 3.3.0 (same as 3.2.7).

MY SOLUTION is EASY:

If you want to import ovpn profile, select *.ovpn and all other files required in ovpn config at once.

Import Profile -> FILE -> BROWSE -> Browse files in other apps -> (I have RS File Manager or Total Commander)-> select all files you want -> confirm selection -> Import .ovpn profile? -> OK -> Profile successfully imported (Type your own profile name) -> ADD.

DONE ;-)

Post Reply