YunoHost-Apps / vpnclient_ynh

VPN Client app for YunoHost
GNU Affero General Public License v3.0
41 stars 25 forks source link

[Bookworm] issue when loading a config file (.cube, .ovpn, .conf). Output: `Error: Unsupported image type : application/json` #131

Open sankayop opened 1 month ago

sankayop commented 1 month ago

Describe the bug

After a clean install of yunohost bookworm, I've installed the app vpnClient and tried to load a neutrinet.cube file. Unfortunately, it stops with the error: Error: Unsupported image type : application/json. This happens from both the GUI and CI interface. Also with .ovpn or .conf file extensions.

Context

Steps to reproduce

sudo yunohost app config set vpnclient

Expected behavior

========================================
>>>> Auto-configuration
========================================
Info: The VPN is not enabled
Enable VPN [yes | no]: yes
Info: VPNclient only interfaces with *dedicated, public IP VPNs accepting inbound traffic*, preferably with an associated `.cube` (or `.ovpn/.conf`) configuration file. Checkout the [list of known compatible providers](https://yunohost.org/providers/vpn) for more info.
Configuration file: /home/user1/ovpn/neutrinet.cube
Warning: unable to retrieve string to translate with key 'Unsupported image type : application/json' for default locale 'locales/en.json' file (don't panic this is just a warning)
Error: Unsupported image type : application/json
Configuration file:                      

Logs

https://paste.yunohost.org/ucozajivaz (but nothing to be seen)

Note:

Perhaps related, another issue: https://github.com/YunoHost/issues/issues/2462

retiolus commented 2 weeks ago

I have the same error

sankayop commented 1 week ago

Yesterday was the release of the stable Yunohost 12.0.6. As a consequence, after updating my beta testing version, I was hoping that the bugfix brought by @axol on https://github.com/YunoHost/issues/issues/2462 would solve the issue and it did it partially. ;) Now, I don't have an "Unsupported image type" anymore but a "Unsupported file type" which is more correct but unfortunately still not solving my issue. (The rest of the error remain the same.)

Now, my feeling is that the issue here is different from https://github.com/YunoHost/issues/issues/2462 because both the .json and the .cube files have a similar text structure. It seems that the error is actually a false true issue.

========================================
>>>> Auto-configuration
========================================
Info: The VPN is not enabled
Enable VPN [yes | no]: yes
Info: VPNclient only interfaces with *dedicated, public IP VPNs accepting inbound traffic*, preferably with an associated `.cube` (or `.ovpn/.conf`) configuration file. Checkout the [list of known compatible providers](https://yunohost.org/providers/vpn) for more info.
Configuration file: /home/user1/ovpn/neutrinet.cube
Error: Unsupported file type 'application/json', expected a type among '.cube, .ovpn, .conf'.
Configuration file:

I saw that there is a lot of activities for the yunohost team since the release but if one could have a look, I would be very grateful.

Have a nice weekend

alexAubin commented 1 week ago

Indeed :+1: Should be fixed by : https://github.com/YunoHost-Apps/vpnclient_ynh/pull/132

Lab-8916100448256 commented 22 hours ago

Well, actually that PR was a work in progress. It does not fully fix the issue. I still don't understand what needs to be done to fix this