Bug 424065 - Removing connection produces weird notification
Summary: Removing connection produces weird notification
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-10 13:07 UTC by ratijas
Modified: 2025-01-24 13:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2020-07-10 13:07:42 UTC
SUMMARY

I was removing old saved Wi-Fi connections from the list via Connections — System Settings module. Each time I removed one, it gave me this weird error notification:

> Failed to remove %connection_name%
>
> Error checking authorization: connection was deleted

STEPS TO REPRODUCE
1. Remove Wi-Fi connection via Connections — System Settings Module.

OBSERVED RESULT

Error notification appears.

EXPECTED RESULT

No error. Or at least an error with a descriptive meaningful text which user can understand and take some actions about it.

SOFTWARE/OS VERSIONS

Arch Linux, KDE/Plasma
lib32-libnm-glib 1.18.5dev+12+ga8746f48ca-1
libnm 1.24.2-1
libnm-glib 1.18.5dev+12+ga8746f48ca-1
networkmanager 1.24.2-1
polkit-qt5 0.113.0-2

ADDITIONAL INFORMATION

Code responsible for posting this is Handler::replyFinished method in libs/handler.cpp, but it is not the origin. In this case, KDE/Plasma is merely a messenger, so don't shoot the messenger. It could add some more context and/or advice though.

Originally posted at FreeDesktop Gitlab: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/489

Original issue text:

=== ratijas:

I was removing old saved Wi-Fi connections from the list via Connections — System Settings module. Each time I removed one, it gave me this weird error notification:

> Failed to remove %connection_name%
> 
> Error checking authorization: connection was deleted

![Screenshot of wild notification](https://gitlab.freedesktop.org/NetworkManager/NetworkManager/uploads/05718449b33216d81991e32cb9cf1aff/Screenshot_20200707_173502.png)

Who am I wronged in this world? What kind of message is that? What am I (as a user) supposed to do with that information?

---

> Arch Linux, KDE/Plasma
> lib32-libnm-glib 1.18.5dev+12+ga8746f48ca-1
> libnm 1.24.2-1
> libnm-glib 1.18.5dev+12+ga8746f48ca-1
> networkmanager 1.24.2-1

=== Thomas Haller:

NetworkManager uses PolicyKit for authenticating requests. That means, if your system user doesn't have permissions, then an operation will fail. You see your permissions with `nmcli general permissions`. Note that PolicyKit can also prompt for a password to authenticate the user. It's mostly KDE's responsibility to integrate an agent for PolicyKit.

From the provided information it's not clear that this is an issue in NetworkManager. It looks either like a bug in plasma-nm or a misconfiguration of PolicyKit on your system.

=== ratijas:

Shame on me, I installed my Arch Linux by guides and tutorials via installer script. I have little idea about PolicyKit and its configuration. I am more of a regular™ userⓒ in this field.

Here is my `nmcli general permissions`:

PERMISSION                                                        VALUE 
org.freedesktop.NetworkManager.checkpoint-rollback                auth  
org.freedesktop.NetworkManager.enable-disable-connectivity-check  yes   
org.freedesktop.NetworkManager.enable-disable-network             yes   
org.freedesktop.NetworkManager.enable-disable-statistics          yes   
org.freedesktop.NetworkManager.enable-disable-wifi                yes   
org.freedesktop.NetworkManager.enable-disable-wimax               yes   
org.freedesktop.NetworkManager.enable-disable-wwan                yes   
org.freedesktop.NetworkManager.network-control                    yes   
org.freedesktop.NetworkManager.reload                             auth  
org.freedesktop.NetworkManager.settings.modify.global-dns         auth  
org.freedesktop.NetworkManager.settings.modify.hostname           auth  
org.freedesktop.NetworkManager.settings.modify.own                yes   
org.freedesktop.NetworkManager.settings.modify.system             yes   
org.freedesktop.NetworkManager.sleep-wake                         no    
org.freedesktop.NetworkManager.wifi.scan                          yes   
org.freedesktop.NetworkManager.wifi.share.open                    yes   
org.freedesktop.NetworkManager.wifi.share.protected               yes   

So what was supposed to happen instead of that notification? System (KDE) should have prompted me for password and confirmation or something?
Comment 1 Jan Grulich 2020-07-14 19:57:51 UTC
Based on the permissions you should be able to remove your own connections.

I see this in your permissions:
org.freedesktop.NetworkManager.settings.modify.own                yes   
org.freedesktop.NetworkManager.settings.modify.system             yes

I now tried to remove a connection on my system and getting same notification, but I'm pretty sure this was not happening before so it might be actually a NetworkManager issue after all. I will respond to NM bug.
Comment 2 Patrick Silva 2021-06-09 00:38:07 UTC
I saw the same notification a few days ago when I removed a wi-fi connection on
neon unstable. The issue in NM tracker was closed without a solution.
Comment 3 Ben Cooksley 2024-12-23 18:23:50 UTC
Bulk transfer as requested in T17796
Comment 4 Sergey Katunin 2025-01-22 10:00:15 UTC
Looks like it has been unintentionally fixed after https://invent.kde.org/plasma/plasma-nm/-/commit/341a1db2f4503d30abd85ecb0622ee67c27838b0

I manually backported this commit to KDE 5 and the problem was fixed. As I understand it from the logs, without this patch, when you click on the remove connection button, two D-Bus deletion requests were sent simultaneously. Therefore, one request actually deleted the connection, and the second request returned at the same time with the error that the connection had already been deleted.
Comment 5 Marco Martin 2025-01-24 13:32:06 UTC
(In reply to Sergey Katunin from comment #4)
> Looks like it has been unintentionally fixed after
> https://invent.kde.org/plasma/plasma-nm/-/commit/
> 341a1db2f4503d30abd85ecb0622ee67c27838b0

marking as fixed then, reopen if the problem gets back on more recent releases