Error: Failed to parse json data: unexpected character

Since my favorite VPN server of the provider CyberGhost has become extremely slow, I decided to switch to a different one, again following this official tutorial.

Here I encounter issues with the configuration, it is similar to the previous connection.

The log of my Flint 1800 gives the following error messages:

Sun Jan 28 21:25:23 2024 daemon.notice netifd: ovpnclient (24433): Failed to parse json data: unexpected character
Sun Jan 28 21:25:23 2024 daemon.notice netifd: ovpnclient (24433): uci: Entry not found

Here is the ovpn-configuration file:


client
remote 87-1-bg.cg-dialup.net 443
dev tun 
proto udp
auth-user-pass


resolv-retry infinite 
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
ncp-disable
auth SHA256
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
verb 4


<ca>
-----BEGIN CERTIFICATE-----
XXX
-----END CERTIFICATE-----

</ca>


<cert>
-----BEGIN CERTIFICATE-----
XXX
-----END CERTIFICATE-----

</cert>


<key>
-----BEGIN PRIVATE KEY-----
XXX
-----END PRIVATE KEY-----

</key>

The XXX stand for the keys and certificates.

I tried to upload on the pre-filled ovpn file and also a zip folder including this files along with the key and certificates in separate files.

I cannot make out a syntax error in the configuration file.

I hope somebody has an idea on to solve this issue, as CyberGhost VPN had worked previously on my Flint 1800.

Many thanks in advance

So the connection does not work at all?
I’m asking because this error is pretty common and I guess it can be ignored if the VPN works.

Hello,

thanks for the quick reply

Unfortunately, the connection doesn’t work at all.

With the previous configuration for the now not-working VPN server, I didn’t receive these errors and the connection worked

Could you please post the full log of the OpenVPN process?

Hi,

sure, when I am home this evening, I will post the entire log messages here

This evening I receive a different error message. It still contains the json parse error and VPN still fails to connect

"Mon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Rule 'process_mark'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Rule 'wan_in_conn_mark'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Rule 'lan_in_conn_mark_restore'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Rule 'out_conn_mark_restore'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Zone 'lan'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Zone 'wan'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Zone 'guest'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    * Zone 'ovpnclient'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Set tcp_ecn to off\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Set tcp_syncookies to on\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Set tcp_window_scaling to on\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Running script '/etc/firewall.nat6'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Running script '/etc/firewall.vpn_server_policy.sh'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Running script '/etc/firewall.swap_wan_in_conn_mark.sh'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Running script '/var/etc/gls2s.include'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):    ! Skipping due to path error: No such file or directory\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416):  * Running script '/usr/bin/gl_block.sh'\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416): Failed to parse json data: unexpected character\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416): uci: Entry not found\nMon Jan 29 21:08:58 2024 daemon.notice netifd: ovpnclient (416): cat: can't open '/tmp/run/ovpn_resolved_ip': No such file or directory\n"

Many thanks again for you efforts in trying to help me here

Hmm, none of these look really like errors I know from OpenVPN.

To me it also like rather an issue with the firmware on the router

Strange, that yesterday it was a somewhat different error message, before the missing directory was not mentioned

This is error is likely due to no vpn policy configured. So not an issue for vpn.

Can you try the ovpn on your other devices to verify if it works?

The ovpn has too many parameters that I don’t recognize. Most likely it is for windows. Do you have ovpn files for Linux?

The ovpn works fine on my Fedora Linux computer. This is the ovpn file Cyberghost provides for routers and Linux. A similiar file (different login credentials) had worked on my Flint-1800, so now I am surprised

What parameters do you think I should drop?

Fortunately I have a Cyberghost account.

Your ovpn has no problem.

Pls be sure to use the vpn connection username and password generated for that opvn file.

My config is a zip and the cert files are separate files.
image

It just works fine in my side.

I did meet a problem that one config that was generated before for DE server does not work. I just generate a new one and it works right aways.