Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

"Browse device" not working #10

Closed
GoodGuyNick opened this issue Dec 5, 2016 · 99 comments
Closed

"Browse device" not working #10

GoodGuyNick opened this issue Dec 5, 2016 · 99 comments

Comments

@GoodGuyNick
Copy link

GoodGuyNick commented Dec 5, 2016

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: vikoadi#27

@b4j4
Copy link
Owner

b4j4 commented Dec 5, 2016

@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
Copy link
Author

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

@b4j4
Copy link
Owner

b4j4 commented Dec 5, 2016

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

@b4j4
Copy link
Owner

b4j4 commented Jan 3, 2017

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

@stibb
Copy link

stibb commented Jan 6, 2017

Same problem on elementary os 0.4

@tsjnachos117
Copy link

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
Copy link
Owner

b4j4 commented Jan 14, 2017

@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
Copy link

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
Copy link

tsjnachos117 commented Feb 2, 2017

@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
Copy link
Owner

b4j4 commented Feb 2, 2017

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
Copy link

tsjnachos117 commented Feb 2, 2017

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
Copy link

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
Copy link
Owner

b4j4 commented Feb 3, 2017

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

@tsjnachos117
Copy link

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
Copy link

markcross commented Feb 3, 2017

@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
Copy link
Owner

b4j4 commented Feb 3, 2017

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

@anthonytex
Copy link

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
Copy link
Owner

b4j4 commented Feb 8, 2017

I install both but still not working

@tsjnachos117
Copy link

tsjnachos117 commented Feb 8, 2017

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
Copy link

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
Copy link
Owner

b4j4 commented Feb 9, 2017

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

@anthonytex
Copy link

anthonytex commented Feb 9, 2017

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
Copy link
Owner

b4j4 commented Feb 9, 2017

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

@anthonytex
Copy link

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
Copy link

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
Copy link

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.

@C0rn3j
Copy link

C0rn3j commented Nov 4, 2017

@tsjnachos117

You can then try mounting with the indicator (perhaps you should close Dolphin first, and maybe test with some desktop other than KDE),

My DE is Cinnamon and I primarily use Nautilus. I just used KDE for testing and before I couldn't really find anything.

I've tried multiple times even after rebooting.

@b4j4
Copy link
Owner

b4j4 commented Nov 6, 2017

I use Arch Linux, sometimes it work, sometimes not.
@andyholmes what you use in the extension to mount the file system, the DBus command?

@andyholmes
Copy link

andyholmes commented Nov 6, 2017

@Bajoja Yep, I use mountAndWait() then I call getDirectories() that returns the directory/name pairs and that's what I show in the menu. For me the top directory always causes sshfs to disconnect while listing files though, so I use the Camera directory. I think the Android app uses some built-in SFTP server class that's not very good.

Internally, think kdeconnect send a temporary password with user 'kdeconnect' but that's never exposed in the interface.

@andyholmes
Copy link

andyholmes commented Nov 7, 2017

If this works in Dolphin, it must be a Nautilus problem, maybe the way it lists directories over SSHFS. I thought maybe the server class in the Android app had changed, but I don't think it has. In my newer extension I do it almost exactly how KDE Connect does and I still get crashes in the top-level directory.

https://github.com/andyholmes/gnome-shell-extension-gsconnect/blob/master/src/service/plugins/sftp.js#L127
https://github.com/KDE/kdeconnect-kde/blob/master/plugins/sftp/mounter.cpp#L124

@b4j4
Copy link
Owner

b4j4 commented Nov 9, 2017

@andyholmes thanks, the way you pointed solve the problem, i will launch a new version with the browse of the paths getted from the Dbus method getDirectory, it will be optional and it can be enabled on settings.

@b4j4
Copy link
Owner

b4j4 commented Nov 10, 2017

The last commit should solve the problem, just compile and install it, then go to settings and enable the option to show directories instead of broswe device and voilá.

@b4j4 b4j4 closed this as completed Dec 24, 2017
@bhughesshelton
Copy link

I am experiencing this issue on Manjaro with Plasma, trying to connect to a Galaxy S5 with Google Android, but only when Thunar is set as the default file manager (i.e. If I set Plasma to prefer Dolphin, all works as it should). Each attempt to connect to the device creates a new directory and throws an error 'A folder named /home/user/.cache/kioexec/krun/randomNum/ already exists.' that the directory already exists. I am able to send data back and forth over CLI, notifications work properly, etc.

@xgdgsc
Copy link

xgdgsc commented Nov 15, 2018

Not working for me on Kubuntu 18.04 with xiaomi 8 after clicking "All FIles", shows The file or folder does not exist.

@swedneck
Copy link

swedneck commented Nov 19, 2018

I get a message saying that /home/user/.cache/kioexec/krun// already exists when i try to browse my phone, this number changes each time i try to browse the phone and deleting the folder does not help.
My phone also doesn't show up in thunar.

@ArchangeGabriel
Copy link

ArchangeGabriel commented Nov 19, 2018

Apparently this feature only works with Dolphin…

@bastafidli
Copy link

Not working for me on Kubuntu 18.04 with xiaomi 8 after clicking "All FIles", shows The file or folder does not exist.

On ubuntu 18.04 adding backports ppa and upgrading to kde connect 1.3.3 solved the problem

@freddii
Copy link

freddii commented Dec 3, 2018

Rolling back to KDE Connect 1.8.4 from F-droid fixed it.

@alexanderadam
Copy link

alexanderadam commented Dec 19, 2018

Could it be related to this issue from 2015?
I'm using Dolphin on Ubuntu 18.04 and the latest Android version (1.10.1) from F-Droid.

I wasn't able to test it with 1.8.4 because the installation had an "unknown error". Nevermind. The "Downgrade" feature of F-Droid doesn't work. Manually uninstalling and installing works. What's more important: I can confirm that downgrading works!

It's much slower than it used to be but I'm happy that it works at all. 😉
So I guess it's probably a bug in the Android app then? Does anyone know whether there is a corresponding bug for it in the app repository? On GitHub the issue tracker seems to be disabled.

@C0rn3j
Copy link

C0rn3j commented Jan 20, 2019

I have the same issue I had when I initially posted here in 2017.

I am on Arch, running kdeconnect 1.3.3 and on LineageOS I am running 1.10.1.

I can open the device fine in Dolphin directly:

image

However if I try to open it through the tray via right click > devicename > Browse files I get this error:

image

@ArchangeGabriel
Copy link

@C0rn3j Is Dolphin your only/default file browser?

@C0rn3j
Copy link

C0rn3j commented Jan 20, 2019

Neither only or default, default is Nautilus.

I don't see the device in Nautilus at all.

@ArchangeGabriel
Copy link

Then that’s your issue. Only Dolphin works with KDE Connect.

@C0rn3j
Copy link

C0rn3j commented Jan 20, 2019

If that is true then kdeconnect should make that button open Dolphin, not try whatever is the default file manager only to throw an error.

If you are correct, you should be able to reproduce it by associating Nautilus in mimeapps

~/.config/mimeapps.list

[Added Associations]
inode/directory=org.gnome.Nautilus.desktop;

@ArchangeGabriel
Copy link

Well, more importantly KDE Connect should be made working with other files browsers. But anyway, this is not the right place for this.

@tsjnachos117
Copy link

Actually, I think that Dolphin (or kio) might be interfering. kdeconnect 1.3.3 should mount to /run/user/(user id number)/*, not ~/.cache/kioexec/krun/*. Try this: fusermount -u ~/.cache/kioexec/krun/*, and then try mounting again.

@C0rn3j
Copy link

C0rn3j commented Jan 21, 2019

[1] % fusermount -u ~/.cache/kioexec/krun/*
fusermount: extra arguments after the mountpoint

@tsjnachos117
Copy link

What is the output of mount | grep -e ssh? Likewise for mount | grep fuse?

@dylskiMarcin
Copy link

Hi @tsjnachos117, I have the same problem as C0rn3j.
I'm using Manjaro with Cinnamon 4.0.9 and Deepin as default file manager.

$ mount | grep -e ssh
kdeconnect@[--IP--]:/ on /run/user/1000/9193b7e04a70e48 type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

$ mount | grep fuse
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000) kdeconnect@[--IP--]:/ on /run/user/1000/9193b7e04a70e48 type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

There directory /run/user/1000/9193b7e04a70e48/ is present but not accessible.

Bellow I attach gist with kdeinit5 output after "KDE Connect -> Browse device"
https://gist.github.com/dylskiMarcin/034b7e6446d15449357215bd0f18fcc1

@ArchangeGabriel
Copy link

kdeconnect 1.3.4 which was just released seems to finally fix this issue according to the changelog:

  • [kio] Fix file browsing with non-KIO file managers

I should be able to confirm soon. :)

@eriefisher
Copy link

Just installed 1.3.4 from Ubuntu on my antix with xfce system. kdeconnect now goes farther but when trying to browse device it open the text editor instead of thunar. I need to find an open with config or some way to tell it to open thunar. The previous version would fail as mentioned earlier but navigating to the mount path pulled from mtab would work. Just a lot of work to see files.

Anyone know how to change the open with parameters?
kdeconnect

@tp0
Copy link

tp0 commented May 3, 2019

@eriefisher
Workaround: copy/type that location in that dialog into Thunar's location bar (Ctrl+L) and then add it into Thunar's bookmarks.

@eriefisher
Copy link

eriefisher commented May 4, 2019

@tp0
Yes, thank you. I know I can navigate/bookmark. Everything is accessible, just not through the application. Does this thing work properly with KDE?

@awsms
Copy link

awsms commented Mar 24, 2020

While trying to browse my device, using the "Browse device" button on the indicator:

A folder named /home/user/.cache/kioexec/krun/14868_0/ already exists.

Wut? Lol

Nevermind, I'm absolutely not familiar with KDE stuff. I installed Dolphin and it works fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests