Bug 336397 - Getting "Unknown error code 150" when opening USB connected Android device in MTP mode (need to restart Dolphin, plug and unplug device, etc)
Summary: Getting "Unknown error code 150" when opening USB connected Android device in...
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: 19.04.0
Platform: Fedora RPMs Linux
: HI normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: usability
: 397725 427195 430930 449256 449660 450535 451709 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-18 18:07 UTC by Nikola Skoric
Modified: 2023-10-09 12:16 UTC (History)
24 users (show)

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


Attachments
Screenshot of the error. (124.68 KB, image/png)
2014-06-18 18:09 UTC, Nikola Skoric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Skoric 2014-06-18 18:07:27 UTC
I connected Samsung Galaxy S4 phone to Kubuntu 14.4 using a USB cable. MTP mode was already chosen on the phone. In "Available devices" there are 2 options: "Portable Media Player" and "SAMSUNG_Android". First option has one "Open with File Manager" action, second option has two "Open with File Manager" actions. When I choose any of those 3 actions I end up in Dolphin with "Samsung Galaxy models" folder. I try to open that folder and after a minute of waiting I get the following error:
--------8<-----------------
Unknown error code 150
Unspecified error
Please send a full bug report at https://bugs.kde.org.
--------8<-----------------

So I sent a bug report :-) Is there any other info I can attach?

Reproducible: Always

Steps to Reproduce:
1. Connect Samsung Galaxy S4 via USB cable
2. In "Available devices" tray menu choose "Portable Media Player", then "Open with File Manager"
3. (You get Dolphin with one folder: Samsung Galaxy models (MTP)) Click "Samsung Galaxy models (MTP)"
4. Wait for a minute while Dolphin tries to load the folder "camera:/Samsung%2520Galaxy%2520models%2520(MTP)@usb:002,005/"
5. You get the error message:
Unknown error code 150
Unspecified error
Please send a full bug report at https://bugs.kde.org.
Actual Results:  
Did not open "Samsung Galaxy models (MTP)" folder.

Expected Results:  
Folder "Samsung Galaxy models (MTP)" opened.
Comment 1 Nikola Skoric 2014-06-18 18:09:17 UTC
Created attachment 87263 [details]
Screenshot of the error.

Screenshot of the error.
Comment 2 Frank Reininghaus 2014-06-21 07:49:38 UTC
Thanks for the bug report! According to the screenshot, the "camera:" protocol was used to access the phone, so I'll reassign.

I think that using "mtp:" is the recommended way to access MTP devices. You might want to install the "MTP" kioslave on your system, see, e.g.,

http://philipp.schmidt-rheinhausen.de/blog/2013/07/whats-up-with-kio-mtp/
Comment 3 lbickley 2016-09-21 19:37:14 UTC
This fails in the same manner with OpenSUSE Leap 42.1, KDE Plasma Version: 5.5.5, OS Type: 64-bit. - connecting to Samsung Galaxy S7 via USB.

Dolphin initially shows proper directories and files - but get a "150 error" on any attempt to transfer files.

Can be duplicated easily. Connect Samsung Galaxy phone via USB to Linux workstation. Use Dolphin as file manager to look at Samsung files. Attempt to transfer file to desktop. After "150 error" occurs file access fails as well.
Comment 4 lbickley 2016-09-22 04:00:09 UTC
btw: The default device is MTP: per either  (see directory /usr/share/kde4/apps/solid/actions/ ):

Note: See "exec=..." in script below

File: solid_mtp.desktop
-------------------------------
[Desktop Entry]
X-KDE-Solid-Predicate=PortableMediaPlayer.supportedProtocols == 'mtp'
Type=Service
Actions=open;

[Desktop Action open]
Exec=kioclient exec mtp:udi=%i/
Icon=system-file-manager
Name=Open with File Manager
Name[bs]=Otvori menadžerom datoteka
...

NOTE: I also tried with SAME or somewhat better results:

[Desktop Entry]
X-KDE-Solid-Predicate=PortableMediaPlayer.supportedProtocols == 'mtp'
Type=Service
Actions=open;

[Desktop Action open]
Exec=dolphin "mtp:/"
Icon=system-file-manager
Name=Open with File Manager
Name[bs]=Otvori menadžerom datoteka
...

Lyle
Comment 5 Fred 2016-10-08 06:38:52 UTC
Same behavior here, in mtp mode.
Comment 6 EMR_Kde 2016-10-30 00:54:15 UTC
same problem here, Leap 42.1
Comment 7 bweinel 2018-07-21 00:55:56 UTC
Same issue occurring here with a Samsung Galaxy S8 and KDE on Kubuntu 16.04.
Comment 8 Elvis Angelaccio 2018-08-26 14:09:46 UTC
*** Bug 397725 has been marked as a duplicate of this bug. ***
Comment 9 jbf 2018-10-05 22:32:32 UTC
Same behavior in MTP & Camera mode. Rebooted laptop after initial failure, but encountered further errors with no file transfer. I can provide dmesg output if needed. See list of installed software below: Here's the error messages:
****
Unknown error code 150
Bad parameters
Please send a full bug report at http://bugs.kde.org.
****
camera:/Samsung%2520Galaxy%2520models%2520(MTP)@usb:003,008
Galaxy 7 Phone
Fedora 28, up-to-date
****
mtp:/SAMSUNG-SM-G930V/
The process for the mtp protocol died unexpectedly.
****
List of installed kio software:
kf5-kio-widgets-5.48.0-1.fc28.x86_64
audiocd-kio-doc-16.08.3-6.fc28.noarch
kio_mtp-0.75-17.20141221gitc418634.fc28.x86_64
audiocd-kio-16.08.3-6.fc28.x86_64
kf5-kio-gui-5.48.0-1.fc28.x86_64
kf5-kio-file-widgets-5.48.0-1.fc28.x86_64
kf5-kio-core-5.48.0-1.fc28.x86_64
kio-upnp-ms-1.0.0-13.20111102git.fc28.x86_64
kf5-kio-ntlm-5.48.0-1.fc28.x86_64
kf5-kio-doc-5.48.0-1.fc28.noarch
kf5-kio-widgets-libs-5.48.0-1.fc28.x86_64
audiocd-kio-libs-16.08.3-6.fc28.x86_64
kf5-kio-core-libs-5.48.0-1.fc28.x86_64
kio-extras-18.04.3-1.fc28.x86_64
Comment 10 Peter Möller 2018-12-11 19:17:19 UTC
same with Galaxy S9.

Instead of filing a new Bug, I will add the description here:

SUMMARY
Connecting Samsung S9 via USB to OpenSUSE leap 15.0 produces "unknown error code 150, wrong parameter"

STEPS TO REPRODUCE
1. Connect S9 via USB
2. Select "Open with Filemanager" in Device watcher/Geräteüberwachung
3. in S9 answer with "allow access"
4: Dolphin shows the primary folder "Samsung Galaxy models (MTP)
5. Click on it to open the folder

OBSERVED RESULT
You get the error message on red background

EXPECTED RESULT
the folder is opened and one may seen the content of it

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: OpenSUSE leap 15.0 (Linux (x86_64) release 4.12.14-lp150.12.25-default)  
(available in About System)
KDE Plasma Version: 5.12.6
KDE Frameworks Version: 5.45.0
Qt Version: 5.9.4
Dolphin: 17.12.3

ADDITIONAL INFORMATION
Since I'm on my way to replace my smartphone, I can report, that I don't have this problem with old S6
Comment 11 postix 2019-05-26 11:55:54 UTC
I can confirm this issue with a Samsung Galaxy S4 Mini and Galaxy S4 both LineageOS 14.1 and a Samsung Galaxy S7 (Stock ROM, Android 8.0).

For the step reproduce see the posts above.

OS: Manjaro Linux 
KDE-Plasma-Version: 5.15.5
KDE-Frameworks-Version: 5.57.0
Qt-Version: 5.12.3
Kernel-Version: 5.1.1-2-MANJARO
Comment 12 Nate Graham 2019-05-26 13:57:08 UTC
Can confirm with the latest versions of everything.

However there's a fairly easy workaround: After clicking "Allow" on the phone, instead of trying to open the folder with the existing Dolphin window, you open a new one from the Devices notifier. This is annoying, but does work for me.

Also KDE Connect provides more reliable methods of accessing files on an Android device too.
Comment 13 britalmeida 2019-12-29 11:26:33 UTC
I have a similar issue with an iPhone 5 and KDE 5 on Slackware. It see PTP instead of MTP.

I connect the phone using a cable and I have to press "Trust Computer" in the phone.
I open the camera with dolphin and I can navigate an copy files just fine.
Until! at some random point, while copying or browsing a folder, I get an error "The process for the camera control protocol died unexpectedly." or an unspecified error, or a timeout error.
After this, I can still navigate other folders, but if I refresh the folder where the error occurred or any of its parents, I will see the "Unknown error code 150" or "Could not read. Reason: Directory not found".
After getting in this bad state, I need to disconnect the phone and reboot the computer in order to try again.

Usually I can do enough voodoo steps (rebooting, re-plugging, keeping the phone unlocked, etc) so that after many tried I am able to do a full copy of my pictures. However, this takes me a lot of time and patience and some days I'm not able to make it work even once. It's just not very deterministic :/
Comment 14 Christoph Feck 2020-10-01 10:27:56 UTC
*** Bug 427195 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2021-01-05 16:34:56 UTC
*** Bug 430930 has been marked as a duplicate of this bug. ***
Comment 16 olcay seker 2021-12-11 21:30:32 UTC
Bug is still relevant.

Operating System: KDE neon 5.23
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-41-generic (64-bit)
Graphics Platform: X11
Comment 17 Harald Sitter 2022-01-07 09:15:36 UTC
Chances are this has either been fixed ages ago or most recently for at least 22.04
Comment 18 Patrick Silva 2022-01-27 19:07:08 UTC
*** Bug 449256 has been marked as a duplicate of this bug. ***
Comment 19 Patrick Silva 2022-02-05 21:13:50 UTC
*** Bug 449660 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2022-02-07 15:31:32 UTC
Please test again with the (upcoming) 22.04 version before re-opening, as that version has more fixes here.
Comment 21 Patrick Silva 2022-02-18 19:33:46 UTC
*** Bug 450535 has been marked as a duplicate of this bug. ***
Comment 22 Patrick Silva 2022-03-20 01:18:12 UTC
*** Bug 451709 has been marked as a duplicate of this bug. ***
Comment 23 tagwerk19 2023-10-09 05:43:34 UTC
(In reply to Nate Graham from comment #20)
> Please test again with the (upcoming) 22.04 version before re-opening, as
> that version has more fixes here.
Cross reference to Bug 206120 and comment down at:
    https://bugs.kde.org/show_bug.cgi?id=206120#c49
Experienced on Fedora 38 (in KVM guest)
Comment 24 Peter Möller 2023-10-09 12:16:52 UTC
jesus, is this an old one ;-). Ok, I gave it a try with actual Dolphin 22.12.3.
Result: works as expected now :-)