Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unable to load VPN connection editor #319

Open
krzykorzeniewski opened this issue Nov 11, 2023 · 9 comments
Open

Error: unable to load VPN connection editor #319

krzykorzeniewski opened this issue Nov 11, 2023 · 9 comments

Comments

@krzykorzeniewski
Copy link

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

@leigh123linux leigh123linux transferred this issue from linuxmint/cinnamon Nov 11, 2023
@claudiux
Copy link
Member

@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
Copy link
Contributor

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

@claudiux
Copy link
Member

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

@leigh123linux
Copy link
Contributor

@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
Copy link
Member

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

@ghisvail
Copy link

ghisvail commented Aug 8, 2024

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

@dkosovic
Copy link

dkosovic commented Aug 11, 2024

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 0f4d212 (to fix a segmentation fault amongst other issues as described in issue linuxmint/cinnamon#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
Copy link

Hi:

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

Thank you!

@dkosovic
Copy link

dkosovic commented Sep 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants