Bug 391386

Summary: Fake "The device is already mounted" warning
Product: [Applications] dolphin Reporter: Frederick Zhang <frederick888>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugs.kde.org.facelift226, bugseforuns, dragan.legic, elvis.angelaccio, FlowXP, i, jeckferson, kde, luca.pedrielli, nate, pip.kde, stefan.bruens
Priority: NOR    
Version: 17.12.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot of warning
Wrong warning of "permission denied" when mounting Samba (CIFS) share
# dbus-monitor --system > logfile

Description Frederick Zhang 2018-03-04 17:39:01 UTC
Created attachment 111176 [details]
screenshot of warning

Every time I mount a disk or removable device, it shows a warning of "The device is already mounted" warning but actually the device has been successfully mounted without errors.

This happens in recent versions of Dolphins. I did not have this issue about one month ago.

Logs:

Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Listener adapter polkit_qt_listener_initiate_authentication
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: GSimpleAsyncResult: 0x55aa03655920
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: polkit_qt_listener_initiate_authentication callback for  0x55aa02fc78e0
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Initiating authentication
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Message of action:  "Authentication is required to mount Samsung SSD 950 PRO 512GB (/dev/nvme0n1p6)"
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Action description has been found
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: WinId of the dialog is  35651614 35651614
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: WinId of the shown dialog is  35651614 35651614
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Trying again
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: REQUEST
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: Request:  "Password: "
Mar 05 04:29:30 FredArch polkit-kde-authentication-agent-1[801]: "Password: "
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: Dialog accepted
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: COMPLETED
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: Completed:  true
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: Finishing obtaining privileges
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: Listener adapter polkit_qt_listener_initiate_authentication_finish
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: polkit_qt_listener_initiate_authentication_finish callback for  0x55aa02fc78e0
Mar 05 04:29:34 FredArch polkit-kde-authentication-agent-1[801]: Finish obtain authorization: true
Mar 05 04:29:34 FredArch polkitd[547]: Operator of unix-session:c2 successfully authenticated as unix-user:frederick to gain TEMPORARY authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.1236 [dolphin [kdeinit5]] (owned by unix-user:frederick)
Mar 05 04:29:34 FredArch kwin_x11[771]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 61096, resource id: 27548565, major code: 10 (UnmapWindow), minor code: 0
Mar 05 04:29:34 FredArch kwin_x11[771]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 61101, resource id: 27548565, major code: 4 (DestroyWindow), minor code: 0
Mar 05 04:29:34 FredArch udisksd[597]: Mounted /dev/nvme0n1p6 at /run/media/frederick/プログラム on behalf of uid 1000
Mar 05 04:29:34 FredArch ntfs-3g[5039]: Version 2017.3.23 external FUSE 29
Mar 05 04:29:34 FredArch ntfs-3g[5039]: Mounted /dev/nvme0n1p6 (Read-Write, label "プログラム", NTFS 3.1)
Mar 05 04:29:34 FredArch ntfs-3g[5039]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,uhelper=udisks2
Mar 05 04:29:34 FredArch ntfs-3g[5039]: Mount options: rw,nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/nvme0n1p6,blkdev,blksize=4096
Mar 05 04:29:34 FredArch ntfs-3g[5039]: Global ownership and permissions enforced, configuration type 7
Comment 1 kts 2018-03-05 10:20:57 UTC
I observed this bug in Arch Linux 17.12.2 (latest dolphin).
The workaround is to mount them from tray removable icon.
Comment 2 Patrick Silva 2018-03-09 19:51:41 UTC
I can confirm this problem on Arch Linux, dolphin 17.12.3.
Comment 3 Patrick Silva 2018-03-15 19:47:30 UTC
*** Bug 391886 has been marked as a duplicate of this bug. ***
Comment 4 Patrick Silva 2018-03-15 19:48:19 UTC
*** Bug 391290 has been marked as a duplicate of this bug. ***
Comment 5 Rog131 2018-03-19 14:31:21 UTC
*** Bug 392045 has been marked as a duplicate of this bug. ***
Comment 6 luca 2018-03-28 13:33:55 UTC
i can confirm:
- debian testing
- plasma 5.12.3
- frameworks 5.44.0
- qt 5.9.2
Comment 7 luca 2018-03-28 14:54:02 UTC
and 
- udisks2 2.7.6-2
Comment 8 Guo Yunhe 2018-03-29 08:47:32 UTC
I can confirm this problem on openSUSE Tumbleweed 20180324

KDE Frameworks: 5.44.0
Qt: 5.10.0
Kernel: 4.15.11
Dolphin: 17.12.3
Comment 9 Guo Yunhe 2018-03-29 08:52:06 UTC
with udisks2-2.7.6
Comment 10 Paul 2018-03-29 11:15:33 UTC
(In reply to Guo Yunhe from comment #8)
> I can confirm this problem on openSUSE Tumbleweed 20180324
> 

Downgrading udisks2 2.7.6 -> 2.6.5 "solves" the problem on openSUSE TW.

https://forums.opensuse.org/showthread.php/530169
Comment 11 Patrick Silva 2018-03-29 17:59:40 UTC
downgrade to udisks2 2.6.5 does not solve the problem on Arch Linux.
Comment 12 Frederick Zhang 2018-03-31 12:20:48 UTC
Similar problem happens to Samba as well.

I have several Samba shares which are listed in /etc/fstab with x-systemd.automount and credentials=/etc/smb_creds. When I click on one of them, it sometimes gives a warning of something like "did not have the permission to read /etc/smb_creds", which is also fake. (Sorry I forgot the exact wording, this is not always reproducible.)
Comment 13 Frederick Zhang 2018-04-02 08:54:20 UTC
Created attachment 111779 [details]
Wrong warning of "permission denied" when mounting Samba (CIFS) share
Comment 14 Frederick Zhang 2018-04-10 17:22:06 UTC
Guys please vote for this issue :)
Comment 15 Nate Graham 2018-04-10 17:58:49 UTC
Kai or Stefan, do you know if this the same issue or the same root cause as Bug 389479 or Bug 391706?
Comment 16 luca 2018-05-01 19:21:52 UTC
Created attachment 112356 [details]
# dbus-monitor --system > logfile

maybe it can help.
dbus calls when I receive "Device /dev/sdg1 is already mounted at `/media/ilprof/Elements'" in dolphin
Comment 17 luca 2018-05-01 19:23:22 UTC
error time=1525200651.152829 sender=:1.4 -> destination=:1.123 error_name=org.freedesktop.UDisks2.Error.AlreadyMounted reply_serial=177
   string "Device /dev/sdg1 is already mounted at `/media/ilprof/Elements'.
Comment 18 Patrick Silva 2018-05-04 13:52:37 UTC
Fix for bug 370975 solved the problem on my Arch Linux.
Comment 19 Nate Graham 2018-05-04 14:06:01 UTC
Thanks for mentioning that!

*** This bug has been marked as a duplicate of bug 370975 ***