Bug 497763 - "Not authorized to perform operation" error message is displayed when user cancels the authentication window when opening a drive that requires a password
Summary: "Not authorized to perform operation" error message is displayed when user ca...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.04.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-21 19:21 UTC by Filip
Modified: 2025-04-25 07:30 UTC (History)
4 users (show)

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


Attachments
showcase (1.17 MB, video/mp4)
2024-12-21 19:21 UTC, Filip
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip 2024-12-21 19:21:22 UTC
Created attachment 176808 [details]
showcase

SUMMARY
"Not authorized to perform operation" error message is displayed when user cancels the authentication popup when opening a drive that requires a password

STEPS TO REPRODUCE
1. Click on some drive in the Places panel that requires a password
2. Click Cancel on the Authorization window or close by clicking on the X or ESC key

OBSERVED RESULT
"Not authorized to perform operation" error message is displayed

EXPECTED RESULT
Message shouldn't be displayed because user canceled the operation

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Akseli Lahtinen 2025-02-25 13:36:13 UTC
Can confirm the error is a bit weird. It seems to come from `/kio-extras/sftp/kio_sftp.cpp:979`. kio_sftp is not handling closing the passphrase dialog (spawned by kded6) properly and instead treats it as generic connection error.
Comment 2 Akseli Lahtinen 2025-02-25 13:37:51 UTC
Er, nevermind my previous comment. I was testing completely different thing. Sorry for the noise.
Comment 3 Filip 2025-04-23 14:57:29 UTC
Bumping this issue. It's still reproducible in 25.04.0

Akseli Lahtinen, do you have 2 disks/partitions to test this?
Comment 4 Akseli Lahtinen 2025-04-23 18:04:00 UTC
(In reply to Filip from comment #3)
> Bumping this issue. It's still reproducible in 25.04.0
> 
> Akseli Lahtinen, do you have 2 disks/partitions to test this?

I don't have password protected drive. I can try to check if this happens when adding a regular folder with password to places panel, if that's possible.
Comment 5 Filip 2025-04-23 18:17:56 UTC
I might misunderstand you here, but this is not a password protected drive. I need to type my user's password to open it, not the drive's password. I thought that was a standard procedure. I actually never thought why it asks me for the password in the first place.
Comment 6 Akseli Lahtinen 2025-04-23 19:34:37 UTC
Oh, thats odd. It never asks password for me. Do you have no password when logging in? Or is the drive used by windows?
Comment 7 Filip 2025-04-24 05:38:20 UTC
I have a password when I log in. Drive is just a storage drive formatted as NTFS. I do have Windows on a third drive so you might say that Windows is using it, not sure? I don't have anything installed on it though.
Comment 8 Akseli Lahtinen 2025-04-24 17:08:32 UTC
(In reply to Filip from comment #7)
> I have a password when I log in. Drive is just a storage drive formatted as
> NTFS. I do have Windows on a third drive so you might say that Windows is
> using it, not sure? I don't have anything installed on it though.

Ah okay, that explains. I don't have windows drive to test this with, but I can try to replicate the issue some other way, maybe a places item that requires a log in when i click on it.
Comment 9 Kai Uwe Broulik 2025-04-25 07:11:26 UTC
I believe this is coming from UDisks. We merely ask UDisks to mount the device. If it returns org.freedesktop.PolicyKit.Error.NotAuthorized or org.freedesktop.UDisks2.Error.NotAuthorized we can’t know any better.
Comment 10 Kai Uwe Broulik 2025-04-25 07:30:39 UTC
Weirdly enough, we do handle this case: https://invent.kde.org/frameworks/solid/-/blob/master/src/solid/devices/backends/udisks2/udisksdevice.cpp?ref_type=heads#L779

Wonder what’s going wrong then...