Gnome-shell-extension-gsconnect: Mount does not work

Created on 13 Apr 2020  路  28Comments  路  Source: GSConnect/gnome-shell-extension-gsconnect

Describe the bug
Mounting does not work.(It is not a duplicate of #801 because /usr/lib/gvfsd-sftp is a valid executable)
Output of file /usr/lib/gvfsd-sftp
/usr/lib/gvfsd-sftp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=745abb019f0a47431f69bd9e5bc5d84165b34873, for GNU/Linux 3.2.0, stripped

Steps To Reproduce:

Click mount in the menu
Expected behavior
The device folder should show in nautilus

Support Log
(Strangely the word gsconnect or anything related to it does not appear.But every other things of gsconnect works)
System Details (please complete the following information):

  • GSConnect version: 36

    • Installed from: extensions.gnome.org

  • GNOME/Shell version:3.36
  • Distro/Release: Arch

Additional Notes:

It used to work before

downstream upstream

All 28 comments

Can you provide any logs showing any errors or what is going wrong?

The log:
gsconnect.B1F0I0.txt
(That time it did not appear because I did not follow the instructions properly)

Doesn't look like Android is responding. Could you try restarting the Android app (eg. force close)?

The android app is responding because every other feature of GSConnect is working

I tried it anyway.Force restarting the app does not work.Also I tried to see the output of journalctl and run gvfsd in the terminal as per the commands in issue #801 .Nothing was printed when I clicked 'mount'

If you aren't getting a packet in response like this:

{
  "id": 1586020295189,
  "type": "kdeconnect.sftp",
  "body": {
    "ip": "192.168.1.68",
    "port": 1741,
    "user": "kdeconnect",
    "password": "4HM2mHfE48jlJpcbpNymT3bnKjO1",
    "path": "/",
    "multiPaths": [
      "/primary"
    ],
    "pathNames": [
      "primary"
    ]
  }
}

Then Android is not sending a response to GSConnect. In that case, there's nothing GSConnect can do because it doesn't have any information to mount the remote device.

Does that mean it is a bug with KDEConnect?

I tried force stopping and clearing all data previously but that did not work.Also,There is storage locations configured and filesystem expose is on.

If it's not sending that packet, then it most likely means Android is failing to start the Sftp server for some reason. You can try debugging the Android app:

$ adb logcat --pid=$(adb shell pidof -s org.kde.kdeconnect_tp)

But it's worth mentioning if this started happening after upgrading Arch, it might still be a bug in gvfs.

In the kdeconnect logcat,nothing gets printed when I click mount,but when I click other options some things get printed(Not errors but just some info)
I tried downgrading gvfs to January 2020,still it does not work.

I also tried downgrading to the february version and it still does not work

I'm also hit by the same problem, here is the logcat when launching kdeconnect:


Click to show logcat

04-14 16:08:21.126 17773 17863 W Gralloc3: mapper 3.x is not supported
04-14 16:08:21.134 17773 17773 I KdeConnect: Connection state changed, trying to connect
04-14 16:08:21.143 17773 17773 I LanLinkProvider: broadcastUdpPacket: relax cowboy
04-14 16:08:23.548 17773 17877 I KDE/LanLinkProvider: Broadcast identity package received from terence-arch
04-14 16:08:23.634 17773 17877 I KDE/LanLinkProvider: Starting SSL handshake with terence-arch trusted:true
04-14 16:08:23.863 17773 17887 I KDE/LanLinkProvider: Handshake as server successful with terence-arch secured with TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
04-14 16:08:23.863 17773 17887 I KDE/LanLinkProvider: Creating a new link for device c0256986-6476-47f3-8c16-1f7f47e060c8
04-14 16:08:23.863 17773 17887 I KDE/BackgroundService: addLink, known device: c0256986-6476-47f3-8c16-1f7f47e060c8
04-14 16:08:23.866 17773 17887 I KDE/Device: Got certificate 
04-14 16:08:23.866 17773 17887 I KDE/Device: addLink LanLinkProvider -> terence-arch active links: 1
04-14 16:08:23.872 17773 17887 I KDE/addPlugin: Permissions OK SftpPlugin
04-14 16:08:23.873 17773 17887 I KDE/addPlugin: Optional Permissions OK SftpPlugin
04-14 16:08:23.873 17773 17888 I KDE/addPlugin: Optional Permissions OK SftpPlugin
04-14 16:08:23.884 17773 17887 I KDE/addPlugin: Permissions OK MprisReceiverPlugin
04-14 16:08:23.884 17773 17887 I KDE/addPlugin: Optional Permissions OK MprisReceiverPlugin
04-14 16:08:23.885 17773 17887 I KDE/addPlugin: Permissions OK SharePlugin
04-14 16:08:23.885 17773 17887 I KDE/addPlugin: Optional Permissions OK SharePlugin
04-14 16:08:23.888 17773 17887 I KDE/addPlugin: Permissions OK BatteryPlugin
04-14 16:08:23.888 17773 17887 I KDE/addPlugin: Optional Permissions OK BatteryPlugin
04-14 16:08:23.895 17773 17887 I KDE/addPlugin: Permissions OK NotificationsPlugin
04-14 16:08:23.895 17773 17887 I KDE/addPlugin: Optional Permissions OK NotificationsPlugin
04-14 16:08:23.896 17773 17887 I KDE/addPlugin: Permissions OK PhotoPlugin
04-14 16:08:23.896 17773 17887 I KDE/addPlugin: Optional Permissions OK PhotoPlugin
04-14 16:08:23.897 17773 17887 I KDE/addPlugin: Permissions OK TelephonyPlugin
04-14 16:08:23.898 17773 17887 I KDE/addPlugin: Optional Permissions OK TelephonyPlugin
04-14 16:08:23.898 17773 17888 I KDE/addPlugin: Optional Permissions OK MprisReceiverPlugin
04-14 16:08:23.898 17773 17888 I KDE/addPlugin: Optional Permissions OK SharePlugin
04-14 16:08:23.898 17773 17888 I KDE/addPlugin: Optional Permissions OK BatteryPlugin
04-14 16:08:23.898 17773 17888 I KDE/addPlugin: Optional Permissions OK NotificationsPlugin
04-14 16:08:23.899 17773 17887 I KDE/addPlugin: Permissions OK FindRemoteDevicePlugin
04-14 16:08:23.899 17773 17887 I KDE/addPlugin: Optional Permissions OK FindRemoteDevicePlugin
04-14 16:08:23.900 17773 17887 I KDE/addPlugin: Permissions OK ClipboardPlugin
04-14 16:08:23.900 17773 17887 I KDE/addPlugin: Optional Permissions OK ClipboardPlugin
04-14 16:08:23.905 17773 17887 I KDE/addPlugin: Permissions OK SMSPlugin
04-14 16:08:23.905 17773 17887 I KDE/addPlugin: Optional Permissions OK SMSPlugin
04-14 16:08:23.905 17773 17888 I KDE/addPlugin: Optional Permissions OK PhotoPlugin
04-14 16:08:23.906 17773 17887 I KDE/addPlugin: Permissions OK PingPlugin
04-14 16:08:23.906 17773 17887 I KDE/addPlugin: Optional Permissions OK PingPlugin
04-14 16:08:23.946 17773 17887 W MediaPlayer: Use of stream types is deprecated for operations other than volume control
04-14 16:08:23.946 17773 17887 W MediaPlayer: See the documentation of setAudioStreamType() for what to use instead with android.media.AudioAttributes to qualify your playback use case
04-14 16:08:23.979 17773 17887 I KDE/addPlugin: Permissions OK FindMyPhonePlugin
04-14 16:08:23.979 17773 17887 I KDE/addPlugin: Optional Permissions OK FindMyPhonePlugin
04-14 16:08:23.980 17773 17887 I KDE/addPlugin: Permissions OK SystemVolumePlugin
04-14 16:08:23.980 17773 17887 I KDE/addPlugin: Optional Permissions OK SystemVolumePlugin
04-14 16:08:23.980 17773 17887 I KDE/addPlugin: Permissions OK PresenterPlugin
04-14 16:08:23.980 17773 17887 I KDE/addPlugin: Optional Permissions OK PresenterPlugin
04-14 16:08:23.981 17773 17887 D RemoteKeyboardPlugin: Creating for device terence-arch
04-14 16:08:23.984 17773 17887 I KDE/addPlugin: Permissions OK RemoteKeyboardPlugin
04-14 16:08:23.984 17773 17887 I KDE/addPlugin: Optional Permissions OK RemoteKeyboardPlugin
04-14 16:08:24.004 17773 17887 I KDE/addPlugin: Permissions OK MprisPlugin
04-14 16:08:24.004 17773 17887 I KDE/addPlugin: Optional Permissions OK MprisPlugin
04-14 16:08:24.005 17773 17887 I KDE/addPlugin: Permissions OK ContactsPlugin
04-14 16:08:24.006 17773 17887 I KDE/addPlugin: Optional Permissions OK ContactsPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK TelephonyPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK FindRemoteDevicePlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK ClipboardPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK SMSPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK PingPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK FindMyPhonePlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK SystemVolumePlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK PresenterPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK RemoteKeyboardPlugin
04-14 16:08:24.006 17773 17888 I KDE/addPlugin: Optional Permissions OK MprisPlugin
04-14 16:08:24.007 17773 17887 I KDE/addPlugin: Permissions OK BigscreenPlugin
04-14 16:08:24.007 17773 17887 I KDE/addPlugin: Optional Permissions OK BigscreenPlugin
04-14 16:08:24.007 17773 17888 I KDE/addPlugin: Optional Permissions OK ContactsPlugin
04-14 16:08:24.007 17773 17888 I KDE/addPlugin: Optional Permissions OK BigscreenPlugin
04-14 16:08:24.007 17773 17888 I KDE/addPlugin: Permissions OK RunCommandPlugin
04-14 16:08:24.007 17773 17888 I KDE/addPlugin: Optional Permissions OK RunCommandPlugin
04-14 16:08:24.008 17773 17888 I KDE/addPlugin: Permissions OK MousePadPlugin
04-14 16:08:24.008 17773 17888 I KDE/addPlugin: Optional Permissions OK MousePadPlugin
04-14 16:08:24.008 17773 17887 I KDE/addPlugin: Optional Permissions OK RunCommandPlugin
04-14 16:08:24.008 17773 17887 I KDE/addPlugin: Optional Permissions OK MousePadPlugin
04-14 16:08:24.072 17773 17888 W Device  : Ignoring packet with type kdeconnect.runcommand.request because no plugin can handle it

Are you also not getting a response from the Android app when you click Mount?

Yep

Sorry, I don't know how else to help here. If the Android app is not responding, it's probably a bug in the app, but that seems unlikely.

Without an error in GSConnect, gvfs or kdeconnect-android there's not much advice I can offer.

I tried debugging the extension.In the file service/plugins/sftp.js,in the try catch block in line 175,the exception Gio.IOErrorEnum.FAILED is thrown while the extension starts.When I click mount in the menu that exception is not thrown.
But this error is not found in the logs.

Okay, that's something to work with. It looks like if something goes wrong this._mounting might not get reset. Can you build from git or make the change in e86d991 in your local build?

Do you know what the error message for the thrown error was?

I did the change in https://github.com/andyholmes/gnome-shell-extension-gsconnect/commit/e86d991420d4010b26da15cf76763611fdf53d0b.
Now whenever I click mount Gio.IOErrorEnum.FAILED is thrown

At least we're getting an error now, is there a message with that error?

How to get the message?
I used e.code to get the error

The error should be in the log, but you can get it with e.message.

'Connection failed' is the message

Can you check now with gvfs to see if it prints anything more? You shouldn't need to restart GSConnect.

$ pkill gvfs; pkill nautilus
$ GVFS_DEBUG=1 $(find /usr/lib* -name gvfsd 2>/dev/null) --replace

sftp: Added new job source 0x5616f7739080 (GVfsBackendSftp) sftp: Queued new job 0x5616f771a730 (GVfsJobMount) sftp: spawn_ssh: /usr/bin/ssh -oForwardX11 no -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -p 1760 -s 192.168.43.1 sftp sftp: handle_login #1 initial_connection = 1 - user: (null), host: 192.168.43.1, port: 1760 sftp: handle_login #1 - password_save: 0 sftp: handle_login #1 - ret_val: 1 sftp: stderr: Unable to negotiate with 192.168.43.1 port 1760: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 sftp: send_reply(0x5616f771a730), failed=1 (Connection failed)

Ah, looks like this is hitting users of Arch/Manjaro because they build gvfs against openssh, while everyone else seems to build against libgcrypt.

There's a patch in kdeconnect-android for this, but it hasn't landed yet. @albertvaka mentioned implied he is planning a release soon, but it's not out yet.

I will close this issue when kdeconnect-android is updated and it works.

Thanks for tracking that down, I would have never noticed Arch was building with a different crypto library.

I built KDE Connect android from master branch and mounting worked.

Now the android app is updated in play store

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikolowry picture nikolowry  路  4Comments

jorgecodecom picture jorgecodecom  路  6Comments

danieldeng2 picture danieldeng2  路  4Comments

sk0gen picture sk0gen  路  4Comments

Noobsai picture Noobsai  路  4Comments