Bug 383255 - iOS device shows up in Device Notifier as two cameras
Summary: iOS device shows up in Device Notifier as two cameras
Status: CONFIRMED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.57.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-08 01:31 UTC by Nate Graham
Modified: 2023-05-04 13:06 UTC (History)
6 users (show)

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


Attachments
Notification showing two camera devices when an iPhone 5 is plugged in (31.02 KB, image/png)
2017-08-08 01:31 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2017-08-08 01:31:21 UTC
Created attachment 107136 [details]
Notification showing two camera devices when an iPhone 5 is plugged in

Steps to reproduce:
1. Plug in an iOS device


Expected results:
- A system tray notification appears notifying the user about the presence of a new camera device


Actual results:
- A system tray notification appears notifying the user about the presence of TWO camera devices. See attached screenshot.


Reproducibility:
- Seems to affect all recent iOS versions (iOS 10.x+) and all iOS devices I had available (iPhone 5, iPad 2, iPad Air 2). Only able to test with Kubuntu 17.04.


Additional information:
- Both entries are completely identical and whichever one is opened first is fully functional.
Comment 1 Nate Graham 2018-05-09 21:55:24 UTC
Still happening with kio-extras 17.12.3. I wonder if this is actually in plasmashell?
Comment 2 David Edmundson 2018-05-14 14:46:02 UTC
I don't think so. Plasma is showing one device, and that device has two identically named actions.

Can you go to /opt/kde5/share/solid   and grep for "Open with File Manager"   and see which actions are appearing.
Comment 3 Nate Graham 2018-05-14 15:22:39 UTC
$  (master) grep -ri "Name=Open with File Manager" /usr/share/solid/
/usr/share/solid/actions/test-predicate-openinwindow.desktop:Name=Open with File Manager
/usr/share/solid/actions/solid_camera.desktop:Name=Open with File Manager
/usr/share/solid/actions/solid_mtp.desktop:Name=Open with File Manager
/usr/share/solid/actions/solid_audiocd.desktop:Name=Open with File Manager
Comment 4 David Edmundson 2018-05-15 07:25:15 UTC
I don't have the audiocd one..but it seems unlike that's the cause.

Can you modify the name of all 4 of them and see which two are being invoked?

My gut feeling is we need to modify test-predicate-openinwindow.desktop to ignore devices that also report themselves as cameras.
Comment 5 Christoph Feck 2018-06-06 19:44:46 UTC
If you can provide the information requested in comment #4, please add it.
Comment 6 Nate Graham 2018-06-07 03:48:26 UTC
Oops sorry, I missed the last comment.

Results of that test indicate that they are actually are two instances of solid_camera.desktop.
Comment 7 Nate Graham 2018-09-28 19:29:30 UTC
Another data point: the first time an affected device is plugged in, the Device Notifier shows two entries. After unplugging the device and then plugging it back in, only one entry is shown. However, accessing the device no longer works; navigating to camera:/Apple%2520iPhone%25205%2520(PTP%2520mode)@usb:001,017/ (or whatever the URL is) produces an empty directory and a Dolphin error message that says:

"Could not read. Reason: Could not claim the USB device"

It looks like there may actually be two processes spawned here, and after unplugging the device, one of them doesn't die and therefore blocks access at a later time.
Comment 8 David Edmundson 2018-10-01 22:50:35 UTC
>Results of that test indicate that they are actually are two instances of solid_camera.desktop.

Under what paths?
Please run dpkg -S on both
Comment 9 Nate Graham 2018-10-05 22:34:36 UTC
It's just two instances of /usr/share/solid/actions/solid_camera.desktop, which come from:

$ dpkg -S /usr/share/solid/actions/solid_camera.desktop
kamera: /usr/share/solid/actions/solid_camera.desktop

Also, setting this to CONFIRMED because Kai told me he can reproduce it over chat this morning.
Comment 10 Nate Graham 2019-04-19 00:51:55 UTC
*** Bug 406294 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2019-04-19 00:52:25 UTC
Idea from duped bug 406294: show the protocol of each one after the text.
Comment 12 Nate Graham 2019-04-19 01:13:41 UTC
Two things seem to have a.desktop file that offers an item with this name:

plasma-workspace/applets/devicenotifier/test-predicate-openinwindow.desktop (this one opens Dolphin with camera:/)

kio-extras/mtp/solid_mtp.desktop (This one opens dolphin with mtp:/<device name>)

Maybe the MTP one should be "Browse files" and the camera one should be "View photos"
Comment 13 Nate Graham 2019-04-19 04:36:52 UTC
Actually scratch that. test-predicate-openinwindow.desktop is a red herring; the other entry comes from solid_camera.desktop, which comes from Kamera.
Comment 14 Nate Graham 2019-04-19 04:38:37 UTC
Whoops, this isn't the same issue as Bug 406294 at all. Well, at least we can fix that one. :)
Comment 15 postix 2023-05-04 13:06:52 UTC
Just wondering, is this still the case?