b4j4 / indicator-kdeconnect

AppIndicator for KDE Connect
GNU Lesser General Public License v2.1
371 stars 38 forks source link

"Browse device" not working #10

Closed GoodGuyNick closed 6 years ago

GoodGuyNick commented 7 years ago

I don't know whether the problem is in the sftp or in the indicator-kdeconnect. When pressing "Browse device" it opens empty folder with 1TB free space. Path to the folder: /home/user/.config/kdeconnect/3eaf8b118bef4c06/kdeconnect_sftp/3eaf8b118bef4c06/ PC - Xubuntu 16.04.01, Smartphone - CM 12.1

Same issue was reported here: https://github.com/vikoadi/indicator-kdeconnect/issues/27

b4j4 commented 7 years ago

@GoodGuyNick i think the problem is sftp, from nautilus based file manager, because i test on dolphin and it work great. Nautilus only open sftp to android 4.4 and below.

GoodGuyNick commented 7 years ago

I think it only works on dolphin, because I tested on pcmanfm, thunar and double commander.

b4j4 commented 7 years ago

In this case we have to wait for some fix on sftp, or wharever the problem is.

b4j4 commented 7 years ago

If someone know what the sftp problem or how to fix it, let me know.

stibb commented 7 years ago

Same problem on elementary os 0.4

tsjnachos117 commented 7 years ago

Does this project use code from Primitive FTP? I ask this because I've been having issues with Primative FTP (unable to browse my device), which I figure may or may not be related.

b4j4 commented 7 years ago

@tsjnachos117 the SFTP is on KDEConnect level so i'm not sure what code they use but i think they use SFTP over SSH

markcross commented 7 years ago

I'm on LXLE 16.04.1 Eclectica, I can only get the Browse Device to work this Dolphin as well.

Nautilus support would be cool, as I install that from DropBox support.

Nautilus seems to have sftp support but my phone doesn't seem to be exposing any ports which is quite right but how the hell does KDEconnect speak to it from the PC?!!

Oh well at least Dolphin works by copying and pasting the URL from the duff link in pcman and pasting into Dolphin

tsjnachos117 commented 7 years ago

@Bajoja Primitive FTP can use either FTP or SFTP. It comes pre-configured to do both, although I like to disable FTP.

@markcross I'm on Ubuntu 16.04.1, and I can't browser my Galaxy S6 at all, not even with Dolphin. Just out of curiosity, what happens if you use PCManFM to browse ~/.config/kdeconnect/(insert your device's ID-thing here)/kdeconnect_sftp/(your device's ID-thing again)/?

b4j4 commented 7 years ago

It's interesting how some people managed with androids higher than 4.4 in nautilus, I only get in nautilus with androids 4.4 and lower, does any android privacy policy is influencing? Because sometimes on my android 6.0 I can only access only the memory stick.

tsjnachos117 commented 7 years ago

I don't use Nautilus, but I do use Nemo, which is fairly similar. I've only tried using this app on an Android 5.1 device. I do have an old Moterolla Droid Razr HD Android 4.1.2 phone, so maybe I'll try using that. I'll also try on my CyannogenMod Tablet (Samsung Galaxy 2 Tab), which runs CM 12.1 (which is based on Android 5.1). Maybe CM will have different results than regular Android.

tsjnachos117 commented 7 years ago

Hmm... I get the same results on all of my devices. My Galaxy S6 (Android 5.1) with stock firmware, my Razr HD with root (Android 4.1.2), and my tablet (Cyanogenmod 12.1) all refuse to let me browse the device.

b4j4 commented 7 years ago

Oh my god this is more serious than i imagined ...

tsjnachos117 commented 7 years ago

IDK if this holds any relevance, but I should mention I only tested Dolphin with my S6. On my other devices, I only used Nemo.

If it's any consolation, everything else KDE Connect is supposed to do seems to work perfectly well.

markcross commented 7 years ago

@tsjnachos117

what happens if you use PCManFM to browse ~/.config/kdeconnect/(insert your device's ID-thing here)/kdeconnect_sftp/(your device's ID-thing again)/?

I just get a blank window with no file / folder listing

screenshot from 2017-02-03 10-55-36

screenshot from 2017-02-03 10-57-21

Huawei H60L04 on H60L04C900B521 - Android 5.1.1

b4j4 commented 7 years ago

The Android 4.4 that I test and work, is a Huawei to.

anthonytex commented 7 years ago

Hi all for those who have problem with phone browsing: make sure to have installed sshfs that should be an optional dependency for both kdeconnect and openSSH. Without it it's impossible to browse your device becouse KC is based on sshfs for remote browsing according to its source.

b4j4 commented 7 years ago

I install both but still not working

tsjnachos117 commented 7 years ago

Same here. I've been using sshfs to transfer files between computers since before I had even heard of KDE Connect (I also sometimes use scp, but mounting a remote directory often makes file transfers more convenient).

I do have a theory: maybe KDE Connect tries to remotely access the wrong folder. On my device, /sdcard works well with Primitive FTP, but the directories inside /storage do not. If KDE Connect also uses something in /storage, maybe that's the problem. I'll bet sime Android distros (I don't like calling them "ROMs") handle /storage partitions differently than others. I f so, that could explain why KC's file browsing works on your Android 4.4 Huawei device while refusing to work on mine: your system handles partitions differently then mine.

Of course, my theory could be wrong.

anthonytex commented 7 years ago

I'm sorry guys i hoped it would have been so simple: by the way i'm using it on Arch plus nemo and it's working good with android 7.

b4j4 commented 7 years ago

Maybe there's another package needed and we are missing that. @anthonytex what brand it's your phone?

anthonytex commented 7 years ago

I've tested it with a Oneplus 3 and on nexus 5x the first with Archlinux with nemo file manager the second, on another machine, with Archlinux and mate desktop (compiled with gtk3 to be clear) that should use caja (?) : both are working fine. Archlinux's kdeconnect package has these dependencies:

hicolor-icon-theme kcmutils kwayland libfakekey qca-qt5 kde-cli-tools (optional) - configuration UI sshfs (optional) - remote filesystem browser extra-cmake-modules (make) kdoctools (make) python (make)

which distro are you using?

b4j4 commented 7 years ago

I use Fedora 25 with Gnome, so Nautilus as file manager

anthonytex commented 7 years ago

Well the only different with kdeconnect on arch and fedora ( speaking of dependencies) is kwayland that is called "kf5-kwayland" am i wrong? (and maybe this hicolor-icon-theme)

tsjnachos117 commented 7 years ago

I'm using Ubuntu 16.04. I have the 64-bit version installed, which may be a factor. I have one machine running Arch, but I can't use it for more than 2-3 minuets (barely long enough to boot) before it freezes and/or kernel panics (video driver bug), so I can't test KDE Connect until the bug gets resolved.

anthonytex commented 7 years ago

Just downloaded Ubuntu live 16.10: for me it's working also here. Well have you try directly with kde? Just for test what happens there? I'm not able to reproduce this bug. I will try with other phones on the next days.

b4j4 commented 7 years ago

I will test Ubuntu 16.10 too.

TdsMG commented 7 years ago

I've experienced the same problem on my computer (Ubuntu 16.04, Android 6.0). Please feel free to request any log or file that may be useful to identify the bug.

moondownr commented 7 years ago

Xubuntu 16.04, Thunar, same problem (empty folder opens). edit: Xiaomi Redmi 4 Prime, Android 6.0.1

anthonytex commented 7 years ago

I suggest you to add also informations about devices and Android versions that are afflicted by this problem to be more clear :)

jlopezay commented 7 years ago

I have changed form Kubuntu 16.10 to Linux Mint Cinnamon 18 last week. Kdeconnect was working ok in Kubuntu with Dolphin. Actually, with Linux Mint and the same Android device I have an empty folder using Nemo.

Device: Bq Aquaris M5 Android version: 6.0.1

Hi again,

I been making more tests. Using other two android devices I can browse the files without problems, but I still have a empty folder when i try to browse my Bq phone.

I have tried with another computer (kubuntu) and my Bq phone and all is working correctly.

I don't know what more should try. Could somebody, please, give some advise?

Kind Regards.

tsjnachos117 commented 7 years ago

I've got Arch working, and have tried kde-connect using the AUR mentioned on the project's front page (or whatever you call it... README.md). I have no file browsing on Arch, either. I'm running the Cinnamon Desktop, which might be a factor. I'll try with KDE when I can.

BTW, what ports are used for file browsing? Maybe my firewall is interfering? Everything else seems to work.

tsjnachos117 commented 7 years ago

Nope, not working on Arch with Plasma 5, either. I've got an empty folder, as per usual. I did get a rather interesting error when I clicked KDEConnect's file browser icon: A folder named /home/[my user]/.cache/kioexec/krun/[12345]_0/ already exists. The "[12345]" at the end changed everytime I clicked the icon, but the name always ended with "_0". I tried running rm -rf ~/.cache/kioexec, but that didn't make any difference.

Shortly after, I realized that I wasn't clicking on the indicator, but rather some kind of systray icon. When I tried with indicator-kde, I didn't get any error messages, although my device was still inaccessible.

When I tried to manually browse my device, Dolphin gave me the following error: The file or folder /home/[my user]/.config/kdeconnect/[my device id]/kdeconnect_sftp/[my device id]/storage/emulated/0 does not exist., which means the problem is the probably usage of /storage/emulated/0. On my particular Android (I don't like using the term "ROM"), /sdcard usually works best. However, when I tried to manually browse /home/[my user]/.config/kdeconnect/[my device id]/kdeconnect_sftp/[my device id]/sdcard, Dolphin game me the same "does not exist" error as when I tried to browse /home/[blablabla, you get the idea]/storage/emulated/0.

ghost commented 7 years ago

Same here 16.10, empty folder. Also SMS send not working. And if you have launcher set for hiding, browsing via remote input won't show it up.

b4j4 commented 7 years ago

@antigone2, Why SMS send not working? Need more information.

tsjnachos117 commented 7 years ago

I just downloaded a brand new version of KDE Connect from F-Droid. File browsing IS working on 3 different GNU/Linux computers!!! It now seems that I can browse the root directory (/) of my device. As I half-expected, /storage is empty, while /sdcard is not. however, that's probably just a weird quark with my Android distro (it's certainly not a problem, since the contents of /storage/*/* are the same as /sdcard).

@antigone2: I've found that it sometimes takes a minute or two for the phone to send the message. On one occasion, I though sending an SMS had failed, causing me to retry a few times. After a few seconds, I gave up, started sending the message via my phone... and just like that each "failed" attempt went through, confusing the person I was talking to.

If the message doesn't go through after maybe 60 seconds, make sure KDE Connect is running on your phone. If your phone has been locked recently, KDE Connect may have been suspended* automatically by your phone. According to this other issue, there's not much the developer can do, although you may - depending on your Android distro - be able to disable auto-suspending apps, though doing so may lower your battery life.

*that is, your phone has temporarily frozen the app to save power.

ghost commented 7 years ago

Well, now I am actually unable to launch indicator-kdeconnect, even after purging and reinstalling, so problem "solved". For the lack of time I am at the moment unable to look to it more, but if I found something I would let know.

b4j4 commented 7 years ago

@tsjnachos117 what is the version of kdeconnect you download? The last version on Play Store is 1.6.1

tsjnachos117 commented 7 years ago

What do you mean by "PlayStore os"? Are you refering to Google Play?

I'm running 1.6.1 from F-Droid.

b4j4 commented 7 years ago

@tsjnachos117 i'm sorry, I wanted to write "Play Store is"

jlopezay commented 7 years ago

Hi again,

I been making more tests. Using other two android devices I can browse the files without problems, but I still have a empty folder when i try to browse my Bq phone.

I have tried with another computer (kubuntu) and my Bq phone and all is working correctly.

I don't know what more should try. Could somebody, please, give some advise?

Kind Regards.

ghost commented 7 years ago

Same issue on Ubuntu 16.04 with MATE desktop. Phone is Sony Xperia Z3.

dmarcostx commented 7 years ago

Test

Computer: kdeconnect 1.0.3-0neon+16.04+build23 on KDE neon 5.9 More information about computer: sshfs 2.5-1ubuntu1, dolphin 4:16.12.3-0neon+16.04+build22, Linux kernel version 4.8.0-48-generic 64 bits and indicator-kdeconnect not installed Phone: kdeconnect 1.6.1 newest available from Goole Play on Xiaomi Redmi 2 Pro with MIUI newest available Global Stable 8.2.1.0 (LHJMIDL) on Android 5.1.1 LMY47V

Tested: Browse device Test result: Not working Test error: /home/marcos/.config/kdeconnect/7f0004561a6f65b1/kdeconnect_sftp/7f0004561a6f65b1/storage/emulated/0 does not exist

tsjnachos117 commented 7 years ago

I have been having some trouble on and off with this feature. However, I've found the some troubleshooting steps that usually work quite well. Here are the steps I use, in no particular order:

  1. Make sure your phone/tablet is connected to the same WiFi network as your desktop/laptop.

  2. Open kdeconnect on your Android homescreen. This may seem like an unnecessary step, but I think Android periodically kills background processes it deems "unnecessary", so re-opening kdeconnect can help in that regard.

  3. Go into your Android device's settings, select Applications, and find kdeconnect. Tap the "Force Stop" button. Then manually re-open the app.

  4. Kill kdeconnect on your PC. You can do this from the terminal by typing pkill -x indicator-kdecon; pkill -x kdeconnectd. Then re-open indicator-kdeconnect using your desktop environment's application menu.

  5. Make sure your firewall is configured to allow kdeconnect to use ports 1714-1764 for input and output. kdeconnect uses both TCP and UDP.

If non of the above works, I guess more work needs to be done to fix this bug.

b4j4 commented 7 years ago

@tsjnachos117 don't work on nautilus. It's a temporary? like when you restart your computer you have to do this all again?

tsjnachos117 commented 7 years ago

My issues don't happen too often. When they do occur, I don't even bother to reboot any of my devices, since the above steps are faster, and 100% effective (in my case at least).

Of course, I still can't access /storage, but that's not an issue for me. It might prove to be an issue for others, though.

pank commented 7 years ago

I can't browse the content of my phone either for what it is worth. I'm using

Apr 26 11:46:09 W530 systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-fd380b39\x2da7b3\x2d490c\x2d8939\x2d7b40ceadaddd.device.
Apr 26 11:46:09 W530 systemd[1]: Dependency failed for /media/extra_data.
Apr 26 11:46:09 W530 systemd[1]: media-extra_data.mount: Job media-extra_data.mount/start failed with result 'dependency'.
Apr 26 11:46:09 W530 systemd[1]: dev-disk-by\x2duuid-fd380b39\x2da7b3\x2d490c\x2d8939\x2d7b40ceadaddd.device: Job dev-disk-by\x2duuid-fd380b39\x2da7b3\x2d490c\x2d8939\x2d7b40ceadaddd.device/start failed with res
Apr 26 11:46:09 W530 systemd[1]: dev-disk-by\x2duuid-677c252d\x2d9498\x2d4a7a\x2d8f91\x2d333a47e094c6.device: Job dev-disk-by\x2duuid-677c252d\x2d9498\x2d4a7a\x2d8f91\x2d333a47e094c6.device/start timed out.
Apr 26 11:46:09 W530 systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-677c252d\x2d9498\x2d4a7a\x2d8f91\x2d333a47e094c6.device.
Apr 26 11:46:09 W530 systemd[1]: Dependency failed for /media/external_data.
Apr 26 11:46:09 W530 systemd[1]: media-external_data.mount: Job media-external_data.mount/start failed with result 'dependency'.

Also, when I click Send SMS nothing happens. The error seems to be this

Apr 26 11:51:04 W530 indicator-kdeco[4178]: DeviceIndicator.vala:132: Failed to execute child process “/usr/share/indicator-kdeconnect/Sms.py” (Permission denied)

edit: This brings up the sms dialog. It only doesn't work when I try to launch it from the indicator.

python /usr/share/indicator-kdeconnect/Sms.py
b4j4 commented 7 years ago

@pank the SMS execution problem is fixed on this commit 4dfbedf, please don't post different bugs on a bug.

getmeacuboftea commented 7 years ago

I have the same problem when using the browse device feature, nemo file manager. When i try to access folder (ls command) ~/.config/kdeconnect/2171a4a07e1ff93f/kdeconnect_sftp/2171a4a07e1ff93f it give Operation not permitted error and ~/.config/kdeconnect/2171a4a07e1ff93f/kdeconnect_sftp/2171a4a07e1ff93f/storage/self it give the Permission deny error, but when i try folder ~/.config/kdeconnect/2171a4a07e1ff93f/kdeconnect_sftp/2171a4a07e1ff93f/storage and ~/.config/kdeconnect/2171a4a07e1ff93f/kdeconnect_sftp/2171a4a07e1ff93f/storage/self/primary everything work properly. I guess it's a permission problem on Android 6.0, i have the same problem with file manager on Android when i can't open /storage/self but /storage/self/primary open properly. Maybe it have something to do with selinux on android. Dolphin/kde work properly without any problem.

b4j4 commented 7 years ago

For all the people here who want to test something on dev branch where i have a working version of this. You should go to indicator-kdeconnect-settings and active the option "Show device directories" captura de ecra de 2017-05-19 18-57-04