Error importing OVPN: Line too Long

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Locked
Fahrenheit
OpenVpn Newbie
Posts: 16
Joined: Thu Jun 26, 2014 3:56 pm

Error importing OVPN: Line too Long

Post by Fahrenheit » Thu Jun 26, 2014 6:21 pm

Hi,

I created an .ovpn file and have imported it into TunnelBlick on my Mac, and it successfully connects. However, when trying to import into OpenVPN Connect, I get this error:

EVENT: PROFILE_MERGE_EXCEPTION info='line too long'

I've tried copying the profile to the phone, downloading it, renaming to a short name, even moved it to the root folder /.  Any thoughts on why its failing on Android, but working on other platforms?  Thanks!


Sent from Galaxy Nexus

Fahrenheit
OpenVpn Newbie
Posts: 16
Joined: Thu Jun 26, 2014 3:56 pm

Re: Error importing OVPN: Line too Long

Post by Fahrenheit » Thu Jun 26, 2014 7:52 pm

FYI, the .ovpn profile works on the other "OpenVPN for Android" client. However I would prefer using OpenVPN Connect for various reasons.

Sent from Galaxy Nexus

Fahrenheit
OpenVpn Newbie
Posts: 16
Joined: Thu Jun 26, 2014 3:56 pm

Re: Error importing OVPN: Line too Long

Post by Fahrenheit » Tue Jul 01, 2014 5:15 pm

Bug opened up here: http://community.openvpn.net/openvpn/ticket/418

Logcat:

Code: Select all

07-01 01:59:27.661 I/ActivityManager(  833): Timeline: Activity_launch_request id:net.openvpn.openvpn time:6743131
07-01 01:59:27.669 I/ActivityManager(  474): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.openvpn.openvpn/.OpenVPNClient bnds=[360,640][360,640]} from pid 833
07-01 01:59:27.692 I/ActivityManager(  474): Start proc net.openvpn.openvpn for activity net.openvpn.openvpn/.OpenVPNClient: pid=21159 uid=10161 gids={50161, 3003, 1028, 1023}
07-01 01:59:27.872 D/dalvikvm(21159): DexOpt: couldn't find field Landroid/app/ActivityThread;.mActiveResources
07-01 01:59:27.872 W/dalvikvm(21159): VFY: unable to resolve instance field 1
07-01 01:59:27.872 D/dalvikvm(21159): VFY: replacing opcode 0x54 at 0x0006
07-01 01:59:27.872 D/dalvikvm(21159): DexOpt: couldn't find field Landroid/app/ActivityThread;.mPackages
07-01 01:59:27.872 W/dalvikvm(21159): VFY: unable to resolve instance field 4
07-01 01:59:27.872 D/dalvikvm(21159): VFY: replacing opcode 0x54 at 0x0000
07-01 01:59:27.895 D/OpenVPNClient(21159): CLI: onCreate intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.openvpn.openvpn/.OpenVPNClient bnds=[360,640][360,640] }
07-01 01:59:28.208 D/dalvikvm(21159): Trying to load lib /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50
07-01 01:59:28.215 D/dalvikvm(21159): Added shared lib /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50
07-01 01:59:28.215 D/dalvikvm(21159): No JNI_OnLoad found in /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50, skipping init
07-01 01:59:28.215 D/OpenVPNService(21159): PolarSSL self test: not compiled
07-01 01:59:28.223 D/AppRate (21159): init
07-01 01:59:28.270 D/OpenVPNClient(21159): CLI: onStart
07-01 01:59:28.286 D/OpenVPNService(21159): SERV: Service onCreate called
07-01 01:59:28.286 D/OpenVPNService(21159): SERV: crypto_self_test
07-01 01:59:28.286 D/OpenVPNService(21159): PolarSSL self test: not compiled
07-01 01:59:28.286 I/JellyBeanHack(21159): Build.VERSION.SDK_INT=19
07-01 01:59:28.294 D/ProxyList(21159): ProxyList.load: no proxy file present
07-01 01:59:28.294 D/OpenVPNService(21159): SERV: onBind intent=Intent { act=net.openvpn.openvpn.BIND cmp=net.openvpn.openvpn/.OpenVPNService }
07-01 01:59:28.380 D/libEGL  (21159): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
07-01 01:59:28.387 D/libEGL  (21159): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
07-01 01:59:28.387 D/libEGL  (21159): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
07-01 01:59:28.458 D/OpenGLRenderer(21159): Enabling debug mode 0
07-01 01:59:28.465 D/PrefUtil(21159): get_boolean: pause_vpn_on_blanked_screen=false
07-01 01:59:28.465 I/OpenVPNService(21159): ConnectivityReceiver: CONNECTIVITY_ACTION conn=true fo=false
07-01 01:59:28.465 D/OpenVPNClientBase(21159): CLIBASE: onServiceConnected: net.openvpn.openvpn.OpenVPNService@41f48678
07-01 01:59:28.465 D/OpenVPNService(21159): SERV: client attach n_clients=1
07-01 01:59:28.465 D/OpenVPNClient(21159): CLI: post bind
07-01 01:59:28.536 D/OpenVPNService(21159): SERV: refresh profiles:
07-01 01:59:28.661 I/ActivityManager(  474): Displayed net.openvpn.openvpn/.OpenVPNClient: +979ms
07-01 01:59:28.661 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41be7b90 u0 net.openvpn.openvpn/.OpenVPNClient t28} time:6744128
07-01 01:59:28.700 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41bcf990 time:6744167
07-01 01:59:31.590 W/InputMethodManagerService(  474): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@426898b8 attribute=null, token = android.os.BinderProxy@42751cd8
07-01 01:59:32.872 I/ActivityManager(21159): Timeline: Activity_launch_request id:net.openvpn.openvpn time:6748338
07-01 01:59:32.872 I/ActivityManager(  474): START u0 {cmp=net.openvpn.openvpn/.FileDialog (has extras)} from pid 21159
07-01 01:59:33.247 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.247 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.255 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.262 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.270 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.270 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.286 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.286 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.294 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.301 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.403 I/ActivityManager(  474): Displayed net.openvpn.openvpn/.FileDialog: +389ms
07-01 01:59:33.708 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41fba728 time:6749178
07-01 01:59:33.755 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41bf2448 u0 net.openvpn.openvpn/.FileDialog t28} time:6749225
07-01 01:59:33.770 D/OpenVPNClient(21159): CLI: onStop
07-01 01:59:34.137 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: onActivityResult request=2 result=-1
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: IMPORT_PROFILE: /sdcard/vpn.ovpn
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: onStart
07-01 01:59:39.176 D/OpenVPNService(21159): SERV: onStartCommand action=net.openvpn.openvpn.ACTION_IMPORT_PROFILE_VIA_PATH
07-01 01:59:39.231 I/OpenVPNService(21159): EVENT: PROFILE_MERGE_EXCEPTION info='line too long'
07-01 01:59:39.286 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41bcf990 time:6754751
07-01 01:59:39.575 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41be7b90 u0 net.openvpn.openvpn/.OpenVPNClient t28} time:6755041
07-01 01:59:42.442 V/PanelView(  632): animationTick called with dtms=0; nothing to do (h=346.0 v=956.39233)
07-01 01:59:42.442 V/PanelView(  632): animationTick called with dtms=-11; nothing to do (h=346.0 v=956.39233)
07-01 01:59:43.825 V/PanelView(  632): animationTick called with dtms=0; nothing to do (h=1184.0 v=-4000.0)

Fahrenheit
OpenVpn Newbie
Posts: 16
Joined: Thu Jun 26, 2014 3:56 pm

Re: Error importing OVPN: Line too Long

Post by Fahrenheit » Tue Jul 01, 2014 7:17 pm

I figured it out! The problem is the format that the .ovpn file was saved in. Since I edited it on a Mac, it was saved in the "Mac" newline format (Mac line breaks). This accounts for why the profile imported fine in TunnelBlick for Mac.

The file needs to be in "Unix" newline format to import properly on Android. I used Textastic to change the format:

Image

Changing the line break format allowed me to import successfully into OpenVPN Connect for Android. Interestingly enough, the .ovpn file has to be in "Unix" format to import into OpenVPN for IOS as well. Cheers!

--

synthnassizer
OpenVPN User
Posts: 22
Joined: Tue Dec 20, 2011 9:15 pm

Re: Error importing OVPN: Line too Long

Post by synthnassizer » Wed Apr 01, 2015 9:12 pm

Hi thank you for the solution,
I kind of think the ovpn here is misleading.
I guess historically (i've been using openvpn with win and linux clients) ovpn is the file extention of the windows configuration file.
conf on the other hand has always been the unix/linux file extension of choice.

I, and believe others too, would not have a problem to understand that the configuration file requires unix line break if it had a conf extension..

matt_chadows_@hotmail.com
OpenVpn Newbie
Posts: 1
Joined: Wed Jul 01, 2015 4:13 am

Re: Error importing OVPN: Line too Long

Post by matt_chadows_@hotmail.com » Wed Jul 01, 2015 1:45 pm

Fahrenheit wrote:Bug opened up here: http://community.openvpn.net/openvpn/ticket/418

Logcat:

Code: Select all

07-01 01:59:27.661 I/ActivityManager(  833): Timeline: Activity_launch_request id:net.openvpn.openvpn time:6743131
07-01 01:59:27.669 I/ActivityManager(  474): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.openvpn.openvpn/.OpenVPNClient bnds=[360,640][360,640]} from pid 833
07-01 01:59:27.692 I/ActivityManager(  474): Start proc net.openvpn.openvpn for activity net.openvpn.openvpn/.OpenVPNClient: pid=21159 uid=10161 gids={50161, 3003, 1028, 1023}
07-01 01:59:27.872 D/dalvikvm(21159): DexOpt: couldn't find field Landroid/app/ActivityThread;.mActiveResources
07-01 01:59:27.872 W/dalvikvm(21159): VFY: unable to resolve instance field 1
07-01 01:59:27.872 D/dalvikvm(21159): VFY: replacing opcode 0x54 at 0x0006
07-01 01:59:27.872 D/dalvikvm(21159): DexOpt: couldn't find field Landroid/app/ActivityThread;.mPackages
07-01 01:59:27.872 W/dalvikvm(21159): VFY: unable to resolve instance field 4
07-01 01:59:27.872 D/dalvikvm(21159): VFY: replacing opcode 0x54 at 0x0000
07-01 01:59:27.895 D/OpenVPNClient(21159): CLI: onCreate intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.openvpn.openvpn/.OpenVPNClient bnds=[360,640][360,640] }
07-01 01:59:28.208 D/dalvikvm(21159): Trying to load lib /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50
07-01 01:59:28.215 D/dalvikvm(21159): Added shared lib /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50
07-01 01:59:28.215 D/dalvikvm(21159): No JNI_OnLoad found in /data/app-lib/net.openvpn.openvpn-1/libovpncli.so 0x41bd1d50, skipping init
07-01 01:59:28.215 D/OpenVPNService(21159): PolarSSL self test: not compiled
07-01 01:59:28.223 D/AppRate (21159): init
07-01 01:59:28.270 D/OpenVPNClient(21159): CLI: onStart
07-01 01:59:28.286 D/OpenVPNService(21159): SERV: Service onCreate called
07-01 01:59:28.286 D/OpenVPNService(21159): SERV: crypto_self_test
07-01 01:59:28.286 D/OpenVPNService(21159): PolarSSL self test: not compiled
07-01 01:59:28.286 I/JellyBeanHack(21159): Build.VERSION.SDK_INT=19
07-01 01:59:28.294 D/ProxyList(21159): ProxyList.load: no proxy file present
07-01 01:59:28.294 D/OpenVPNService(21159): SERV: onBind intent=Intent { act=net.openvpn.openvpn.BIND cmp=net.openvpn.openvpn/.OpenVPNService }
07-01 01:59:28.380 D/libEGL  (21159): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
07-01 01:59:28.387 D/libEGL  (21159): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
07-01 01:59:28.387 D/libEGL  (21159): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
07-01 01:59:28.458 D/OpenGLRenderer(21159): Enabling debug mode 0
07-01 01:59:28.465 D/PrefUtil(21159): get_boolean: pause_vpn_on_blanked_screen=false
07-01 01:59:28.465 I/OpenVPNService(21159): ConnectivityReceiver: CONNECTIVITY_ACTION conn=true fo=false
07-01 01:59:28.465 D/OpenVPNClientBase(21159): CLIBASE: onServiceConnected: net.openvpn.openvpn.OpenVPNService@41f48678
07-01 01:59:28.465 D/OpenVPNService(21159): SERV: client attach n_clients=1
07-01 01:59:28.465 D/OpenVPNClient(21159): CLI: post bind
07-01 01:59:28.536 D/OpenVPNService(21159): SERV: refresh profiles:
07-01 01:59:28.661 I/ActivityManager(  474): Displayed net.openvpn.openvpn/.OpenVPNClient: +979ms
07-01 01:59:28.661 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41be7b90 u0 net.openvpn.openvpn/.OpenVPNClient t28} time:6744128
07-01 01:59:28.700 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41bcf990 time:6744167
07-01 01:59:31.590 W/InputMethodManagerService(  474): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@426898b8 attribute=null, token = android.os.BinderProxy@42751cd8
07-01 01:59:32.872 I/ActivityManager(21159): Timeline: Activity_launch_request id:net.openvpn.openvpn time:6748338
07-01 01:59:32.872 I/ActivityManager(  474): START u0 {cmp=net.openvpn.openvpn/.FileDialog (has extras)} from pid 21159
07-01 01:59:33.247 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.247 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.255 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.262 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.270 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.270 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.286 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.286 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.294 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.301 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:33.403 I/ActivityManager(  474): Displayed net.openvpn.openvpn/.FileDialog: +389ms
07-01 01:59:33.708 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41fba728 time:6749178
07-01 01:59:33.755 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41bf2448 u0 net.openvpn.openvpn/.FileDialog t28} time:6749225
07-01 01:59:33.770 D/OpenVPNClient(21159): CLI: onStop
07-01 01:59:34.137 W/Resources(21159): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f0a0045}
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: onActivityResult request=2 result=-1
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: IMPORT_PROFILE: /sdcard/vpn.ovpn
07-01 01:59:39.114 D/OpenVPNClient(21159): CLI: onStart
07-01 01:59:39.176 D/OpenVPNService(21159): SERV: onStartCommand action=net.openvpn.openvpn.ACTION_IMPORT_PROFILE_VIA_PATH
07-01 01:59:39.231 I/OpenVPNService(21159): EVENT: PROFILE_MERGE_EXCEPTION info='line too long'
07-01 01:59:39.286 I/ActivityManager(21159): Timeline: Activity_idle id: android.os.BinderProxy@41bcf990 time:6754751
07-01 01:59:39.575 I/ActivityManager(  474): Timeline: Activity_windows_visible id: ActivityRecord{41be7b90 u0 net.openvpn.openvpn/.OpenVPNClient t28} time:6755041
07-01 01:59:42.442 V/PanelView(  632): animationTick called with dtms=0; nothing to do (h=346.0 v=956.39233)
07-01 01:59:42.442 V/PanelView(  632): animationTick called with dtms=-11; nothing to do (h=346.0 v=956.39233)
07-01 01:59:43.825 V/PanelView(  632): animationTick called with dtms=0; nothing to do (h=1184.0 v=-4000.0)

Sent from my GT-I9190 using Tapatalk

darwis
OpenVpn Newbie
Posts: 1
Joined: Tue Feb 16, 2016 5:39 pm

Re: Error importing OVPN: Line too Long

Post by darwis » Tue Feb 16, 2016 8:28 pm

[quote="Fahrenheit"]Hi,

I created an .ovpn file and have imported it into TunnelBlick on my Mac, and it successfully connects. However, when trying to import into OpenVPN Connect, I get this error:

EVENT: PROFILE_MERGE_EXCEPTION info='line too long'

I've tried copying the profile to the phone, downloading it, renaming to a short name, even moved it to the root folder /.  Any thoughts on why its failing on Android, but working on other platforms?  Thanks!


Sent from Galaxy Nexus[/quote]

mchp92
OpenVPN User
Posts: 23
Joined: Thu Feb 11, 2016 7:46 am

Re: Error importing OVPN: Line too Long

Post by mchp92 » Tue Feb 16, 2016 10:02 pm

I think there is a line IN your file which is too long. Not the file name

User avatar
dazo
OpenVPN Inc.
Posts: 155
Joined: Mon Jan 11, 2010 10:14 am
Location: dazo :: #openvpn-devel @ libera.chat

Re: Error importing OVPN: Line too Long

Post by dazo » Fri Nov 03, 2017 4:55 pm

mchp92 wrote:
Tue Feb 16, 2016 10:02 pm
I think there is a line IN your file which is too long. Not the file name
Which is why changing the line feed from the classic mac new line style (CR only) worked. With CR only, the whole configuration file seems to be processed as a single line. It requires LF (Unix) or CR/LF (DOS/Windows) to be capable of separating the lines.

buger
OpenVpn Newbie
Posts: 2
Joined: Thu Dec 28, 2017 6:09 pm

Re: Error importing OVPN: Line too Long

Post by buger » Thu Dec 28, 2017 6:14 pm

Hi,

Unfortunately I have the same problem but I think format of the file is correct as I'm editing it on ubuntu (screen in attachment, coding UTF-8, line ending:unix/linux).

Image


Do you have any idea what to do then? I googled it many times but with no luck

Thanks,
Lukasz

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Error importing OVPN: Line too Long

Post by TinCanTech » Thu Dec 28, 2017 6:23 pm

dazo wrote:
Fri Nov 03, 2017 4:55 pm
It requires LF (Unix) or CR/LF (DOS/Windows) to be capable of separating the lines
Line endings: Windows

buger
OpenVpn Newbie
Posts: 2
Joined: Thu Dec 28, 2017 6:09 pm

Re: Error importing OVPN: Line too Long

Post by buger » Thu Dec 28, 2017 10:39 pm

Changing to Windows didn't work, so I generated config file once again but without including cert inside config file. I created .p12 cert file on the OpenVPN server and the import it manually on Android host. In that solution import went fine and tunnel was established (I have another problem with traffic going through the server but that's for different thread and I need to google it first). Thanks for your reply.

Locked