Bug 297785 - "Send via Bluetooth" in Dolphin file manager cannot transfer file (progress bar stuck at 0%)
Summary: "Send via Bluetooth" in Dolphin file manager cannot transfer file (progress b...
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: bluetooth (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
: 304966 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-09 15:06 UTC by Abe
Modified: 2013-03-06 21:56 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch for sending files (1.52 KB, patch)
2012-06-27 17:23 UTC, Francisco Gonzalez
Details
New crash information added by DrKonqi (1.78 KB, text/plain)
2013-02-13 13:15 UTC, Jiri Slaby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abe 2012-04-09 15:06:52 UTC
KDE version 4.8.1 (same results when tested on version 4.7.3)
bluedevil version: 1.2.2
bluez version: 4.98-r2

Steps to reproduce:
(1) Enable bluetooth in KDE and pair with a bluetooth device with file transfer capability
(2) Right click a file in the Dolphin file manager 
(3) click "Send via Bluetooth", and select the paired device

What happened?
Progress bar stuck at 0% and never finish. Remove device does not get prompted for any incoming file transfer. Tested on 2 Android phones, a Nokia S40 phone and an iPhone 3GS

Expected results:
Files got sent to remote device

Reproducibility:
3 kind Kubuntu/ubuntu (Version 11.10, KDE v4.8.1) users tested the function, and none of them can transfer a file successfully. The furthest one has 83.6KB transferred and stuck there. However, bluedevil-sendfile segfault when run.

Additional information:
Using the command "bluedevil-sendfile -u <my_bluetooth_address>  -f /home/abe/testfile" immediately lead to seg fault.

The debug information is probably not useful, attached below:
Application: Bluetooth Send File Helper (bluedevil-sendfile), signal: Segmentation fault
[KCrash Handler]
#6  0x000000336a181309 in QVariant::QVariant(QVariant const&) () from /usr/lib64/qt4/libQtCore.so.4
#7  0x000000336b85b4f7 in QDBusPendingReplyData::argumentAt(int) const () from /usr/lib64/qt4/libQtDBus.so.4
#8  0x000000336e01ba2d in BlueDevil::Device::Private::_k_ensureDeviceCreated(QString const&) () from /usr/lib64/libbluedevil.so.1
#9  0x000000336e01edc3 in BlueDevil::Device::Device(QString const&, BlueDevil::Device::Type, BlueDevil::Adapter*) () from /usr/lib64/libbluedevil.so.1
#10 0x000000336e0152ab in BlueDevil::Adapter::deviceForUBI(QString const&) () from /usr/lib64/libbluedevil.so.1
#11 0x000000000040cf18 in _start ()
Comment 1 Ezio Vergine 2012-04-17 20:34:29 UTC
Same problem here, with my samsung c3300 I have the same problem, but work fine with an old nokia. Kubuntu 11.10 kde 4.8.2
Comment 2 Alex Fiestas 2012-04-29 03:17:25 UTC
Git commit ada20252d32cf6e394be7535c9d9b542ea750aec by Alex Fiestas.
Committed on 29/04/2012 at 05:13.
Pushed by afiestas into branch '1.0'.

Kill the job if an error happen, and print all of them (debug info)

M  +32   -5    src/actionplugins/sendfile/helper/sendfilesjob.cpp
M  +2    -0    src/actionplugins/sendfile/helper/sendfilesjob.h

http://commits.kde.org/bluedevil/ada20252d32cf6e394be7535c9d9b542ea750aec
Comment 3 Alex Fiestas 2012-04-29 03:18:26 UTC
Git commit e426f4901e9977f5ef034f9e5f9345ba79f4ca34 by Alex Fiestas.
Committed on 29/04/2012 at 05:15.
Pushed by afiestas into branch '1.1'.

Kill the job if an error happen, and print all of them (debug info)

M  +31   -4    src/actionplugins/sendfile/helper/sendfilesjob.cpp
M  +2    -0    src/actionplugins/sendfile/helper/sendfilesjob.h

http://commits.kde.org/bluedevil/e426f4901e9977f5ef034f9e5f9345ba79f4ca34
Comment 4 Alex Fiestas 2012-04-29 03:21:05 UTC
If anyone could post here the terminal output after this last commit it will help to fix the issue.

The job will be killed now, and debug messages has been added so we can identify the problem.

Thankls !
Comment 5 Alex Fiestas 2012-04-29 06:56:51 UTC
Just did a few releases, you can test this with: 1.1.4, 1.2.3 and 1.3-rc2, can you provide the following info?

Execute: kdebugdialog and actiavte bluedevilsendfile
Execute bluedevil-sendifle from the command line

Paste here any ourput.

Thanks !
Comment 6 Abe 2012-04-29 07:24:29 UTC
Just wanna added that:
I just tried with a nokia phone (2730 classic), and bluetooth file sending is working (I didn't apply any of the suggested patch). The 2 androids I tried aren't working still. I am currently using 
KDE version 4.8.1
bluedevil version: 1.2.2 
bluez version: 4.99 (instead of 4.98)

The jailbreak iphone is probably not a good test, so I didn't test it again with the iphone.

I can't remember which nokia I used when I first tried, in which bluetooth file sending doesn't work (as described in the inital post). It should be some even older model.

will try to upgrade to bluedevil 1.2.3 when it is available in my distro repo.  Thanks :-)
Comment 7 Modestas Vainius 2012-05-01 17:42:48 UTC
Hello,

before 1.2.3, Bluedevil was not able to send any file to my Android phone at all. I.e. it would pair successfully but when sending a file, the phone would not react at all. Bluedevil just kept spinning the transfer task forever at 0%.

With 1.2.3, things seem to have improved. Now I do get an accept file dialog on the phone, but as soon as I accept the file, Bluedevil fails with an error. The output is below (sendFileResul: and above is emitted as soon as I ack file on the phone):

$ bluedevil-sendfile --kio bluetooth://fc-a1-3e-7c-77-ba/ --files Ataskaita.pdf 
bluedevilsendfile(4526) SendFileWizard::SendFileWizard: DeviceUbi:  "bluetooth://fc-a1-3e-7c-77-ba/"
bluedevilsendfile(4526) SendFileWizard::SendFileWizard: Files
bluedevilsendfile(4526) SendFileWizard::SendFileWizard: ("Ataskaita.pdf")
bluedevilsendfile(4526) SendFileWizard::setDevice: BlueDevil::Device(0x2575850)
bluedevilsendfile(4526) SendFileWizard::setFiles: ("Ataskaita.pdf")
bluedevilsendfile(4526) SendFilesJob::SendFilesJob: Adding size :  76120
bluedevilsendfile(4526) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
bluedevilsendfile(4526) SendFilesJob::doStart:
bluedevilsendfile(4526) SendFilesJob::sendFileResult: Error:
bluedevilsendfile(4526) SendFilesJob::sendFileResult: "org.freedesktop.DBus.Error.InvalidSignature"
bluedevilsendfile(4526) SendFilesJob::sendFileResult: "Unexpected reply signature: got "", expected "o""

What is more, Bluedevil waits only approximately 20 seconds for me to ack the file transfer on the phone. I think this is too short. The output in timeout case is below:

$ bluedevil-sendfile --kio bluetooth://fc-a1-3e-7c-77-ba/ --files Ataskaita.pdf 
bluedevilsendfile(4592) SendFileWizard::SendFileWizard: DeviceUbi:  "bluetooth://fc-a1-3e-7c-77-ba/"
bluedevilsendfile(4592) SendFileWizard::SendFileWizard: Files
bluedevilsendfile(4592) SendFileWizard::SendFileWizard: ("Ataskaita.pdf")
bluedevilsendfile(4592) SendFileWizard::setDevice: BlueDevil::Device(0x192ce60)
bluedevilsendfile(4592) SendFileWizard::setFiles: ("Ataskaita.pdf")
bluedevilsendfile(4592) SendFilesJob::SendFilesJob: Adding size :  76120
bluedevilsendfile(4592) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
bluedevilsendfile(4592) SendFilesJob::doStart:
bluedevilsendfile(4592) SendFilesJob::sendFileResult: Error:
bluedevilsendfile(4592) SendFilesJob::sendFileResult: "org.freedesktop.DBus.Error.NoReply"
bluedevilsendfile(4592) SendFilesJob::sendFileResult: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

My environment: Bluedevil 1.2.3, libbluedevil 1.9.2, KDE 4.7.4, Qt 4.8.1 (Debian unstable amd64, linux 3.2)
Comment 8 Francisco Gonzalez 2012-06-27 17:23:38 UTC
Created attachment 72177 [details]
Patch for sending files

This patch fix sending files for me.
Comment 9 Francisco Gonzalez 2012-06-27 18:05:58 UTC
The patch basically checks the validity of the reply to:
client->SendFiles(map, m_filesToSend, QDBusObjectPath("/BlueDevil_sendAgent"));

The reply is not valid and
    kDebug() << reply.error().name();
    kDebug() << reply.error().message();
output is:
    "org.freedesktop.DBus.Error.InvalidSignature" 
    "Unexpected reply signature: got "", expected "o""
If we use:
    if (!reply.isValid()) {
        return;
    }
Then the file is sent. What I do not understand is why the reply is erroneous and not valid.
the method from D-Bus for sending files is:
void SendFiles(dict device, array{string} files, object agent)
which returns void, so no reply is expected, could it be the reason?
Probably using the watcher is not necessary, since the agent can get the errors.
Comment 10 Francisco Gonzalez 2012-06-27 18:07:01 UTC
The patch basically checks the validity of the reply to:
client->SendFiles(map, m_filesToSend, QDBusObjectPath("/BlueDevil_sendAgent"));

The reply is not valid and
    kDebug() << reply.error().name();
    kDebug() << reply.error().message();
output is:
    "org.freedesktop.DBus.Error.InvalidSignature" 
    "Unexpected reply signature: got "", expected "o""
If we use:
    if (!reply.isValid()) {
        return;
    }
Then the file is sent. What I do not understand is why the reply is erroneous and not valid.
the method from D-Bus for sending files is:
void SendFiles(dict device, array{string} files, object agent)
which returns void, so no reply is expected, could it be the reason?
Probably using the watcher is not necessary, since the agent can get the errors.
Comment 11 Kai Uwe Broulik 2012-07-12 22:38:26 UTC
I don’t know if this is related but:
When I want to send files to my Android phone via BlueDevil, the transfer starts but immediately afterwards it says "Finished", before the confirmation dialog on my Android phone opens. If I accept the file transfer at the phone, it fails because, well, BlueDevil is not sending anymore.
It works fine the other way round (ie. sending from Android to notebook)
Comment 12 Kai Uwe Broulik 2012-08-12 15:07:59 UTC
Confirmed, Francisco Gonzalez patch fixed it for me and now I can send files to my Android device again. Thanks!
Comment 13 Abe 2012-10-07 06:10:05 UTC
I haven't tested the patch yet, but with bluedevil 1.2.3, KDE 4.8.5, qt 4.8.2 bluez 4.99, I am still getting the error below (no dialog or prompt on the Andriod phone appears at all)

Note that receiving file from the same Android phone works.

bluedevil-sendfile 
bluedevilsendfile(24830) SendFileWizard::SendFileWizard: DeviceUbi:  ""
bluedevilsendfile(24830) SendFileWizard::SendFileWizard: Files
bluedevilsendfile(24830) SendFileWizard::SendFileWizard: ()

======================== 
Address:  "12:34:56:78:90:AB" 
Name:  "HTC Desire" 
Alias:  "HTC Desire" 
Icon:  "phone" 

 
bluedevilsendfile(24830) KSambaSharePrivate::testparmParamValue: Running testparm ("-d0", "-s", "--parameter-name", "usershare path")
bluedevilsendfile(24830) SendFileWizard::setFiles: ("/home/outline.doc")
bluedevilsendfile(24830) SendFileWizard::setFiles: ("/home/outline.doc")
bluedevilsendfile(24830) SendFileWizard::setDevice: BlueDevil::Device(0xccbeb0)
bluedevilsendfile(24830) SendFilesJob::SendFilesJob: Adding size :  20480
bluedevilsendfile(24830) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
bluedevilsendfile(24830) SendFilesJob::doStart:
bluedevilsendfile(24830) SendFilesJob::sendFileResult: Error:
bluedevilsendfile(24830) SendFilesJob::sendFileResult: "org.openobex.Error.Failed"
bluedevilsendfile(24830) SendFilesJob::sendFileResult: "Unable to request session"
Comment 14 Alex Fiestas 2012-10-08 08:28:01 UTC
*** Bug 304966 has been marked as a duplicate of this bug. ***
Comment 15 Giorgos Tsiapaliokas 2012-10-08 12:52:20 UTC
I can reproduce the issue, with an archos g9 80 with android 4
Comment 16 Kete Tefid 2012-12-24 20:08:18 UTC
The same is here. Truly confirmed
kde 4.9.3
bluedevil 1.23
bluez 4.99
On gentoo too.
I don't think that the patch is in portage now.
Comment 17 Michael Palimaka 2012-12-25 15:02:47 UTC
@maintainer, is the output or patch in above comments any assistance in solving this issue?
Comment 18 Kete Tefid 2013-02-06 11:30:18 UTC
The patch which was included in kde overlay for gentoo solves the problem. However, there is one problem remaining. If you opt for "Browse device..." and then try to copy some files to the phone, the connection suddenly stops and dolphin tries to show the content again in vain. Somehow, the connection disappears and any further actions for copying files to the phone or even viewing the content of the phone are not successful.
Can you browse a phone and copy and modify things inside it successfully? I can't do it here.
Comment 19 Jiri Slaby 2013-02-13 13:15:18 UTC
Created attachment 77253 [details]
New crash information added by DrKonqi

bluedevil-sendfile (0.1) on KDE Platform 4.9.5 "release 7" using Qt 4.8.4

- What I was doing when the application crashed:

bluedevil-sendfile -f L2cap.jar -k 00:24:7D:65:55:C5

-- Backtrace (Reduced):
#5  Private (other=..., this=0x7fff1c89bdf0) at kernel/qvariant.h:356
#6  QVariant::QVariant (this=0x7fff1c89bdf0, p=...) at kernel/qvariant.cpp:1423
#7  0x00007f8ead4818e5 in QDBusPendingReplyData::argumentAt (this=0x7fff1c89bf40, index=0) at qdbuspendingreply.cpp:270
#8  0x00007f8eadb8a6c0 in QDBusPendingReply<QMap<QString, QVariant>, void, void, void, void, void, void, void>::argumentAt<0> (this=this@entry=0x7fff1c89bf40) at /usr/include/QtDBus/qdbuspendingreply.h:176
#9  0x00007f8eadb856ee in value (this=0x7fff1c89bf40) at /usr/include/QtDBus/qdbuspendingreply.h:181
Comment 20 Jiri Slaby 2013-02-13 13:36:49 UTC
(In reply to comment #5)
> Just did a few releases, you can test this with: 1.1.4, 1.2.3 and 1.3-rc2,
> can you provide the following info?
> 
> Execute: kdebugdialog and actiavte bluedevilsendfile
> Execute bluedevil-sendifle from the command line
> 
> Paste here any ourput.

bluedevilsendfile(8923) SendFileWizard::SendFileWizard: DeviceUbi:  "00:24:7D:65:55:C5"
bluedevilsendfile(8923) SendFileWizard::SendFileWizard: Files
bluedevilsendfile(8923) SendFileWizard::SendFileWizard: ("L2cap.jar")
KCrash: Application 'bluedevil-sendfile' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
Comment 21 Alex Fiestas 2013-02-21 21:10:04 UTC
Can anybody test with BlueDevil 1.3? I fixed this but forgot to close the bug (in theory)

Thanks !
Comment 22 ceolesen 2013-02-21 22:17:34 UTC
I tested on both Fedora 17 and 18 both fully up2date incl. bluedevil 1.3
and sending a file using option "Send via Bluetooth" in Dolphin to a
Samsung Galaxy Note phablet works. Thanks.


On Thu, Feb 21, 2013 at 10:10 PM, Alex Fiestas <afiestas@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=297785
>
> --- Comment #21 from Alex Fiestas <afiestas@kde.org> ---
> Can anybody test with BlueDevil 1.3? I fixed this but forgot to close the
> bug
> (in theory)
>
> Thanks !
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 23 Jiri Slaby 2013-02-23 12:21:46 UTC
It doesn't work for me:
$ bluedevil-sendfile --version
Qt: 4.8.4
KDE Development Platform: 4.9.5 "release 8"
Bluetooth Send File Helper: 1.3.0
$ bluedevil-sendfile -f ~ku/repos/l2cap/L2cap.jar -k bluetooth://00:24:7D:65:55:C5 
bluedevilsendfile(27692) SendFileWizard::SendFileWizard: DeviceUbi:  "bluetooth://00:24:7D:65:55:C5"
bluedevilsendfile(27692) SendFileWizard::SendFileWizard: Files
bluedevilsendfile(27692) SendFileWizard::SendFileWizard: ("/home/latest/repos/l2cap/L2cap.jar")
bluedevilsendfile(27692) SendFileWizard::setDevice: BlueDevil::Device(0xd1e710)
bluedevilsendfile(27692) SendFileWizard::setFiles: ("/home/latest/repos/l2cap/L2cap.jar")
bluedevilsendfile(27692) SendFilesJob::SendFilesJob: Adding size :  8148
bluedevilsendfile(27692) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered
bluedevilsendfile(27692) SendFilesJob::doStart:
bluedevilsendfile(27692) SendFilesJob::sendFileResult: Error:
bluedevilsendfile(27692) SendFilesJob::sendFileResult: "org.openobex.Error.Failed"
bluedevilsendfile(27692) SendFilesJob::sendFileResult: "Unable to find service record"
Comment 24 Alex Fiestas 2013-02-24 13:32:34 UTC
Looking in Google, there are a lot of reports of  "Unable to find service record", maybe we find something useful in there.
(In reply to comment #23)
> It doesn't work for me:
> $ bluedevil-sendfile --version
> Qt: 4.8.4
> KDE Development Platform: 4.9.5 "release 8"
> Bluetooth Send File Helper: 1.3.0
> $ bluedevil-sendfile -f ~ku/repos/l2cap/L2cap.jar -k
> bluetooth://00:24:7D:65:55:C5 
> bluedevilsendfile(27692) SendFileWizard::SendFileWizard: DeviceUbi: 
> "bluetooth://00:24:7D:65:55:C5"
> bluedevilsendfile(27692) SendFileWizard::SendFileWizard: Files
> bluedevilsendfile(27692) SendFileWizard::SendFileWizard:
> ("/home/latest/repos/l2cap/L2cap.jar")
> bluedevilsendfile(27692) SendFileWizard::setDevice:
> BlueDevil::Device(0xd1e710)
> bluedevilsendfile(27692) SendFileWizard::setFiles:
> ("/home/latest/repos/l2cap/L2cap.jar")
> bluedevilsendfile(27692) SendFilesJob::SendFilesJob: Adding size :  8148
> bluedevilsendfile(27692) KSharedUiServerProxy::KSharedUiServerProxy:
> kuiserver registered
> bluedevilsendfile(27692) SendFilesJob::doStart:
> bluedevilsendfile(27692) SendFilesJob::sendFileResult: Error:
> bluedevilsendfile(27692) SendFilesJob::sendFileResult:
> "org.openobex.Error.Failed"
> bluedevilsendfile(27692) SendFilesJob::sendFileResult: "Unable to find
> service record"
Comment 25 ceolesen 2013-02-24 15:40:20 UTC
The command that runs when I send from Dolphin is
/usr/bin/bluedevil-sendfile -u/org/bluez/491/hci0/dev_1C_62_B8_2E_6E_F6
-f<file>
and that works as I said in my previous post.
But the command from comment #23 i.e.
bluedevil-sendfile -f<file> -k bluetooth://1C:62:B8:2E:6E:F6
doesn't work for me either.


On Sun, Feb 24, 2013 at 2:32 PM, Alex Fiestas <afiestas@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=297785
>
> Alex Fiestas <afiestas@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|NEEDSINFO                   |CONFIRMED
>          Resolution|WAITINGFORINFO              |---
>      Ever confirmed|0                           |1
>
> --- Comment #24 from Alex Fiestas <afiestas@kde.org> ---
> Looking in Google, there are a lot of reports of  "Unable to find service
> record", maybe we find something useful in there.
> (In reply to comment #23)
> > It doesn't work for me:
> > $ bluedevil-sendfile --version
> > Qt: 4.8.4
> > KDE Development Platform: 4.9.5 "release 8"
> > Bluetooth Send File Helper: 1.3.0
> > $ bluedevil-sendfile -f ~ku/repos/l2cap/L2cap.jar -k
> > bluetooth://00:24:7D:65:55:C5
> > bluedevilsendfile(27692) SendFileWizard::SendFileWizard: DeviceUbi:
> > "bluetooth://00:24:7D:65:55:C5"
> > bluedevilsendfile(27692) SendFileWizard::SendFileWizard: Files
> > bluedevilsendfile(27692) SendFileWizard::SendFileWizard:
> > ("/home/latest/repos/l2cap/L2cap.jar")
> > bluedevilsendfile(27692) SendFileWizard::setDevice:
> > BlueDevil::Device(0xd1e710)
> > bluedevilsendfile(27692) SendFileWizard::setFiles:
> > ("/home/latest/repos/l2cap/L2cap.jar")
> > bluedevilsendfile(27692) SendFilesJob::SendFilesJob: Adding size :  8148
> > bluedevilsendfile(27692) KSharedUiServerProxy::KSharedUiServerProxy:
> > kuiserver registered
> > bluedevilsendfile(27692) SendFilesJob::doStart:
> > bluedevilsendfile(27692) SendFilesJob::sendFileResult: Error:
> > bluedevilsendfile(27692) SendFilesJob::sendFileResult:
> > "org.openobex.Error.Failed"
> > bluedevilsendfile(27692) SendFilesJob::sendFileResult: "Unable to find
> > service record"
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
Comment 26 Jiri Slaby 2013-02-26 12:03:03 UTC
For me, this won't work either with the same error:
bluedevil-sendfile -f txt -u /org/bluez/27872/hci0/dev_00_24_7D_65_55_C5
Comment 27 Alex Fiestas 2013-03-06 21:56:55 UTC
So, it seems this is finally fixed in our side, the remaining bugs are in obex-data-server.

Going to close this bug because it is quite messy and we can't really work further with it, please open a new bug if sending files from dolphin is still not working in 1.3 and we'll continue debugging there.

Thanks !