After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772548 - nm-connection-editor - Cannot save connection due to error: Editor initializing
nm-connection-editor - Cannot save connection due to error: Editor initializing
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: nm-applet
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-07 06:27 UTC by GB
Modified: 2020-11-12 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description GB 2016-10-07 06:27:51 UTC
My Specs:

Slackware 14.2 x86_64
nm-applet 1.2.4

When I open the nm-connection-editor I get this message at the terminal;


** Message: Cannot save connection due to error: Editor initializing...
** Message: Connection validates and can be saved
Comment 1 GB 2016-10-07 06:28:43 UTC
Sorry forgot to ask, what's this error mean, and what is going?

Bug?

Hmm
Comment 2 Thomas Haller 2016-10-07 12:02:34 UTC
the message is harmless.

Anyway, it is correct to suppress it: https://git.gnome.org/browse/network-manager-applet/commit/?id=68dfd862da899a596ca78b4c8c8131b6cef63dca
Comment 3 GB 2016-10-09 03:06:11 UTC
Great thanks for the fast reply and fix!

I'll apply the patch and let you know!
Comment 4 GB 2016-10-09 03:16:17 UTC
I'm still getting the messages;

** Message: Cannot save connection due to error: Editor initializing...
** Message: Connection validates and can be saved

Steps to Produce;

1. Opened nm-connection-editor

2. Clicked connection then Edit

Then then messages appeared...
Comment 5 GB 2016-10-09 03:17:10 UTC
So no confusion, I meant that I clicked on and Highlighted my connection and then clicked the Edit button and the messages appeared...

:)
Comment 6 GB 2016-10-09 03:26:00 UTC
My bad, I'm compiling from a build script and I had the inccorect name in my build script for the patch.

After correcting the name the patch failed...

I get Hunk 1 failed at 180

Hmm
Comment 7 GB 2016-10-09 03:41:12 UTC
SORRY call me stupid, I did the sin of copy and pasting for the patch, maybe something wrong when I did that, but I tried it over a few times and still no good...

Hmm well I created the patch on my end and it worked.





diff -Naur network-manager-applet-1.2.4.orig/src/connection-editor/nm-connection-editor.c network-manager-applet-1.2.4/src/connection-editor/nm-connection-editor.c
--- network-manager-applet-1.2.4.orig/src/connection-editor/nm-connection-editor.c	2016-08-03 04:08:11.000000000 -1000
+++ network-manager-applet-1.2.4/src/connection-editor/nm-connection-editor.c	2016-10-08 17:31:34.743708681 -1000
@@ -180,12 +180,12 @@
 {
 	NMSettingConnection *s_con;
 	GSList *iter;
-	char *validation_error = NULL;
+	gs_free char *validation_error = NULL;
 	GError *error = NULL;
 
 	if (!editor_is_initialized (editor)) {
 		validation_error = g_strdup (_("Editor initializing..."));
-		goto done;
+		goto done_silent;
 	}
 
 	s_con = nm_connection_get_setting_connection (editor->connection);
@@ -221,12 +221,12 @@
 		g_free (editor->last_validation_error);
 		editor->last_validation_error = g_strdup (validation_error);
 	}
+	
+done_silent:
 	ce_polkit_button_set_validation_error (CE_POLKIT_BUTTON (editor->ok_button), validation_error);
 	gtk_widget_set_sensitive (editor->export_button, !validation_error);
 
 	update_sensitivity (editor);
-
-	g_free (validation_error);
 }
 
 static void
Comment 8 GB 2016-10-09 03:51:33 UTC
I even downloaded it here;

https://git.gnome.org/browse/network-manager-applet/patch/?id=68dfd862da899a596ca78b4c8c8131b6cef63dca


And it still failed saying;


Hunk 1 failed at 180
Comment 9 GB 2016-10-11 02:30:37 UTC
I noticed in 1.4.2, with the patch applied, when I opened up the nm-connection-editor for the first time the messages appeared.

Afterwards the message doesn't appear...

Hmm seems odd for the first time, they still appear.
Comment 10 GB 2016-10-11 02:31:12 UTC
Reopen, for running the first time and still getting the message...
Comment 11 GB 2016-10-11 04:13:37 UTC
I just installed the NetworkManager-openvpn plugin and when I ran it for the first time I also saw these messages;

** Message: Cannot save connection due to error: Invalid setting VPN: remote
** Message: Connection validates and can be saved

This message appeared twice;

** Message: Cannot save connection due to error: Invalid setting VPN: remote
Comment 12 Thomas Haller 2016-10-11 07:17:00 UTC
these messages are printed to help understanding why a connection does not validate, and why in turn the "Save" button of the dialog is disabled. In that case, you also see the same message as the tooltip of the disabled "Save" button.

If you create a new openvpn connection, initially the "remote" field is unset, thus the connection is invalid and cannot be saved until you fix it.

Thus, it prints "Cannot save connection due to error: Invalid setting VPN: remote". That is done on purpose.

It's not clear why you say "This message appeared twice".

It will not appear twice in a row, but it might appear as the connection changes from valid to invalid and back. Say, you start nm-connection-editor with a new openvpn connection, you see:

  ** Message: Cannot save connection due to error: Invalid setting VPN: remote

then you fill in the remote setting (and any other settings that are missing), until the connection is valid and the "Save" button becomes active. Then you see 

  ** Message: Connection validates and can be saved

if you now delete the text from the "remote" field again, you see again

 ** Message: Cannot save connection due to error: Invalid setting VPN: remote


I don't see anything wrong there.



Patch 68dfd862da899a596ca78b4c8c8131b6cef63dca suppresses the message about "editor initializing", which indeed is a pointless message. But it's a harmless message.
Comment 13 GB 2016-10-11 21:40:00 UTC
I'm saying the first time I installed the openvpn plugin and opened it to condfigure it I saw these messages;

** Message: Cannot save connection due to error: Invalid setting VPN: remote
** Message: Connection validates and can be saved

Then later when I went back to the OpenVPN plugin to change something I saw this message again;

** Message: Cannot save connection due to error: Invalid setting VPN: remote

Sorry if I wasn't clear here, I'm trying to say, there is no error, nothing was done incorrectly, so this message should not be appearing.

Where is this 'remote' filed you are referring to?
Comment 14 Jiri Klimes 2016-11-15 10:01:54 UTC
(In reply to GB from comment #13)
> I'm saying the first time I installed the openvpn plugin and opened it to
> condfigure it I saw these messages;
> 
> ** Message: Cannot save connection due to error: Invalid setting VPN: remote
> ** Message: Connection validates and can be saved
> 
> Then later when I went back to the OpenVPN plugin to change something I saw
> this message again;
> 
> ** Message: Cannot save connection due to error: Invalid setting VPN: remote
> 
> Sorry if I wasn't clear here, I'm trying to say, there is no error, nothing
> was done incorrectly, so this message should not be appearing.
> 
> Where is this 'remote' filed you are referring to?

When you create a new (VPN) profile in the editor, it is not complete and you have to fill in some important fields. One of them is the 'remote' option, which is the 'Gateway:' entry in the editor.
Comment 15 André Klapper 2020-11-12 14:30:38 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).