linuxmint / cinnamon-control-center

A collection of configuration plugins used in cinnamon-settings
GNU General Public License v2.0
62 stars 65 forks source link

Error: unable to load VPN connection editor #319

Open krzykorzeniewski opened 10 months ago

krzykorzeniewski commented 10 months ago

Distribution

Mint 21.2

Package version

Cinnamon 5.8.4

Graphics hardware in use

NVIDIA Geforce RTX 3060Ti LHR

Frequency

Always

Bug description

When trying to establish VPN connection using Secure Socket Tunneling Protocol (SSTP) the following error message shows up in the "Add VPN" window: "Error: unable to load VPN connection editor". Basically when trying to establish connection using this protocol there is no option to fill Gateway, Username, password fields etc.

Steps to reproduce

  1. Install sstp-client: sudo apt install sstp-client, then use sudo apt install network-manager-sstp and reset the network manager: sudo systemctl restart NetworkManager
  2. Go to Network, Add VPN, select Secure Socket Tunneling Protocol (SSTP)

Screenshot from 2023-11-11 11-36-33

Expected behavior

Instead of the error message being shown, there should be option to fill in neccessary information such as Gateway or User Name

Additional information

No response

claudiux commented 10 months ago

@k0rz3ni3wsky Once you've created your connection, use nm-connection-editor to edit it more precisely. @leigh123linux Maybe add a direct access to nm-connection-editor from c-c-c?

leigh123linux commented 10 months ago

@claudiux I think the issue is bigger than that, other network plugins fail in a similar way.

claudiux commented 10 months ago

@leigh123linux We're not going to rewrite the NetworkManager code, are we?

leigh123linux commented 10 months ago

@leigh123linux We're not going to rewrite the NetworkManager code, are we? We should consider rebasing the network code in the c-c-c network panel.

claudiux commented 10 months ago

@leigh123linux You're right. In particular, the different types of VPN are poorly managed. Anything else?

ghisvail commented 1 month ago

Same issue when setting up an OpenConnect VPN connection on Mint 22

dkosovic commented 3 weeks ago

I did the following modification to print out an error when trying to load a GTK3 VPN plug-in with cinnamon-control-center:

diff --git a/panels/network/connection-editor/ce-page-vpn.c b/panels/network/connection-editor/ce-page-vpn.c
index a2aaa5d..fc70538 100644
--- a/panels/network/connection-editor/ce-page-vpn.c
+++ b/panels/network/connection-editor/ce-page-vpn.c
@@ -93,10 +93,12 @@ load_vpn_plugin (CEPageVpn *page, NMConnection *connection)
 {
        CEPage *parent = CE_PAGE (page);
         GtkWidget *ui_widget, *failure;
+        GError *err = NULL;

         page->editor = nm_vpn_editor_plugin_get_editor (page->plugin,
                                                         connection,
-                                                        NULL);
+                                                        &err);
+
         ui_widget = NULL;
         if (page->editor)
                 ui_widget = GTK_WIDGET (nm_vpn_editor_get_widget (page->editor));
@@ -104,6 +106,8 @@ load_vpn_plugin (CEPageVpn *page, NMConnection *connection)
        if (!ui_widget) {
                g_clear_object (&page->editor);
                 page->plugin = NULL;
+                g_warning ("Could not load VPN editor plugin: %s", err ? err->message : "Unknown error");
+                g_error_free (err);
                return;
        }
         vpn_cinnamonify_editor (ui_widget);

The error turns out to be the following for GTK3 VPN plugins like sstp, l2tp and openconnect that are using NMACertChooser :

(cinnamon-control-center:90815): WARNING **: 21:00:00.001: Could not load VPN editor plugin: .:181:1 Invalid object type 'NMACertChooser'

There used to be a workaround in place for NMACertChooser but was removed with commit https://github.com/linuxmint/cinnamon-control-center/commit/0f4d212874c4fbee18b860963d0a5c7bd54dcfd1 (to fix a segmentation fault amongst other issues as described in issue https://github.com/linuxmint/cinnamon/issues/10616)

Note: NMACertChooser is not a native GTK3 widget, but a widget from libnma which is a library used for integrating GUI tools with NetworkManager.

udorronsoro commented 6 days ago

Hi:

Any news on when this will be fixed or if there's a temporary workaround?

Thank you!

dkosovic commented 6 days ago

nm-connection-editor was suggested earlier as a workaround to create/edit the VPN connections.