Page 1 of 1

Import error "failed to parse profile" new update 3.2.7

Posted: Wed May 04, 2022 12:45 pm
by Lomic
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.

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

Posted: Wed May 04, 2022 2:27 pm
by Lomic
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.

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

Posted: Mon May 16, 2022 7:06 am
by makkio
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?

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

Posted: Fri May 20, 2022 1:29 pm
by Flotech88
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?

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

Posted: Fri May 20, 2022 3:32 pm
by Flotech88
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

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

Posted: Fri Jun 03, 2022 7:57 am
by andrixnet
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.

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

Posted: Wed Jun 08, 2022 1:18 pm
by 4Star
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.

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

Posted: Fri Jun 10, 2022 11:16 am
by fabry09
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

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

Posted: Fri Jun 10, 2022 11:23 pm
by Trav2974
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!

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

Posted: Sun Jul 03, 2022 3:36 pm
by mizuhoid
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

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

Posted: Mon Jul 18, 2022 7:01 pm
by Bekese
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?

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

Posted: Wed Jul 20, 2022 10:07 pm
by Monska85
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)

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

Posted: Sat Aug 27, 2022 11:43 am
by susli
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>

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

Posted: Wed Mar 01, 2023 5:32 pm
by dandash
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 ;-)