https://bugs.kde.org/show_bug.cgi?id=526368

            Bug ID: 526368
           Summary: konqueror/dolphin do not prompt for sftp password
                    (kpasswdserver6) -- WITH WORKAROUND
    Classification: Frameworks and Libraries
           Product: frameworks-kio
      Version First 6.25.0
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

PROBLEM:
Often, when running konqueror (and this week it happened while running
dolphin), the sftp connection frame (tab/window/view) stalls, and shows nothing
(perhaps due to a canceled "ssh password" prompt dialog, or too many
connections, not sure at this point, I cannot reliably reproduce). No further
sftp connection is possible, in either dolphin or konqueror, regardless of
which of the two the issue first occurred in. Refreshing the location, pressing
f5, opening a new window, entering a different sftp location, even on a
different host, none of these show the password prompt or any contents or
errors.

OBSERVED RESULT
no ssh password prompt dialog


EXPECTED RESULT
ssh password prompt dialog

SOFTWARE/OS VERSIONS
Operating System: fc42.x86_64
KDE Frameworks Version:  kf6-6.25.0-1
Qt Version: qt6-qtbase-6.10.2-2

===============
TLDR WORKAROUND:
Run:
$ qdbus org.kde.kpasswdserver6 /MainApplication quit
===============


This has been happening to me across several versions of kf6/konqueror (cf
https://bugs.kde.org/show_bug.cgi?id=502413 as an example of one of the related
issues), and affects both dolphin and konqueror (not sure what else).
I'm not sure what exactly triggers the issue.

For context, I run mate as my wm, but most of the apps I use are kde apps
(kate, kwrite, konsole, konqueror)

Once the problem is observed, on ps -ef, I see new:

 00:00:00 /usr/libexec/kf6/kioworker /usr/lib64/qt6/plugins/kf6/kio/sftp.so
sftp  local:/run/user/500/konquerorYpLyEX.5.kioworker.socket

lines, one for each attempt. Killing konqueror and dolphin does not kill these.

Killing these kioworker processes and attempting to connect to sftp does not
cause the password prompt to appear.

I think I used to be able to just kill kinit or something like that, so both
konqueror and kinit, and then I would relaunch konqueror and I could get the
prompt again. This is no longer the case. Killing kded6 does not fix the issue.

ssh command on the terminal works no problem. 

 ssh-add -l does not hang.
$ ssh-add -l
The agent has no identities.

ssh-add prompted for password, added the identity, but neither konqueror nor
dolphin were able to connect.

a plain "$ ksshaskpass" prompts me for a password


after a lot of back and forth with chatgpt, it eventually suggested I run:

dbus-run-session -- dolphin

and that caused the password prompt to appear in that dolphin window (the
default url was an sftp conenction).

of note:
kwallet is not running

$ QT_LOGGING_RULES="kf.kio.*=true" dbus-run-session -- dolphin
[...]
dbus-daemon[1457262]: [session uid=500 pid=1457262 pidfd=5] Successfully
activated service 'org.kde.kpasswdserver6'
kf.kio.kiod: loadModule "kpasswdserver"
kf.kio.kpasswdserver: User = "" , WindowId = 79691784
kf.kio.workers.sftp: 
kf.kio.workers.sftp: Creating the SSH session and setting options
kf.kio.workers.sftp: Trying to connect to the SSH server
kf.kio.workers.sftp: username= "" , host= "[host name]" , port= [port]
[...]
kf.kio.workers.sftp: Getting the SSH server hash
kf.kio.workers.sftp: Checking if the SSH server is known
kf.kio.workers.sftp: Trying to authenticate with the server
kf.kio.workers.sftp: Trying to authenticate with public key
kf.kio.workers.sftp: Entering authentication callback, prompt= "Passphrase"
kf.kio.kpasswdserver: User = "" , WindowId = 79691784 seqNr = 0 , errorMsg = ""
kf.kio.kpasswdserver: key= "sftp-host-alias-here:-1" , user= "" seqNr: request=
0 , result= -1
kf.kio.kpasswdserver: Widget for 79691784 QWidget(0x0)
kf.kio.kpasswdserver: Showing password dialog KPasswordDialog(0x560ba03f0440,
name="KPasswordDialog") , window-id= 79691784

but these lines do not appear when run without the "dbus-run-session" part


these did appear in both:

kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  1449218
kf.kio.workers.sftp: debug =  
kf.kio.core.connection: Got a new connection
kf.kio.core.connection: Got a new connection
kf.kio.core.connection: Got a new connection
kf.kio.core.connection: KIO::ConnectionBackend(0x55f722230510) Got 110 bytes
kf.kio.core.connection: KIO::ConnectionBackend(0x55f42ae366b0) Got 111 bytes
kf.kio.core.connection: KIO::ConnectionBackend(0x55f722230510) Beginning of
command 85 of size 4
kf.kio.core.connection: Got a new connection
kf.kio.core.connection: QLocalSocket(0x55f7222681f0) Want to read 4 bytes;
appending to already existing bytes 0
kf.kio.core.connection: KIO::ConnectionBackend(0x55f42ae366b0) Beginning of
command 85 of size 4
kf.kio.core.connection: emitting task 85 4
[...]
kf.kio.workers.sftp: "" @ "[host name]" : 0
kf.kio.workers.sftp: 
kf.kio.workers.trash: listdir:  QUrl("trash:/")
kf.kio.workers.sftp: list directory:  QUrl("sftp://[host name]/files")
kf.kio.workers.sftp: checking cache: info.username = "" , info.url =
"sftp://[host name]"
kf.kio.core: 0x7f4cd3cfd6c0 Creating threaded worker


killing that and trying just dolphin reveals the problem continues there (no
password prompt)


$ qdbus | grep kpasswd
 org.kde.kpasswdserver6


$ dbus-run-session -- env | grep DBUS
KONSOLE_DBUS_SERVICE=:1.71
KONSOLE_DBUS_SESSION=/Sessions/30
KONSOLE_DBUS_ACTIVATION_COOKIE=[cookie string]
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-[random string],guid=[random
string]
KONSOLE_DBUS_WINDOW=/Windows/8

$ env | grep DBUS
KONSOLE_DBUS_SERVICE=:1.71
KONSOLE_DBUS_SESSION=/Sessions/30
KONSOLE_DBUS_ACTIVATION_COOKIE=[same cookie string]
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/500/bus
KONSOLE_DBUS_WINDOW=/Windows/8

$ systemctl --user --type=service | grep -E 'kde|kiod|wallet'
  dbus-:[email protected]                     loaded active
running dbus-:[email protected]


THIS FINALLY FIXED IT:

$ qdbus org.kde.kpasswdserver6 /MainApplication quit

After running this and launching both dolphin and konqueror all sftp
connections are working correctly, and I am being prompted for sftp password.


Perhaps related (or useful info here for the following bugs):

https://bugs.kde.org/show_bug.cgi?id=502413
https://bugs.kde.org/show_bug.cgi?id=513949
https://bugs.kde.org/show_bug.cgi?id=488321
https://bugs.kde.org/show_bug.cgi?id=488752
https://bugs.kde.org/show_bug.cgi?id=494735
https://bugs.kde.org/show_bug.cgi?id=494737
https://bugs.kde.org/show_bug.cgi?id=514625
https://bugs.kde.org/show_bug.cgi?id=500360

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to