Bug 504148

Summary: Can't establish an SFTP connection over KIO
Product: [Frameworks and Libraries] kio-extras Reporter: postix <postix>
Component: SFTPAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description postix 2025-05-13 13:03:28 UTC
STEPS TO REPRODUCE
1. Open Dolphin 25.04.1
2. Enter a valid sftp address such as sftp://postix@host _or_ fish://postix@host in the address bar
3. Hit enter

OBSERVED RESULT
Dolphin keeps saying "Loading ..." and "Connecting ..." forever. 
Journalctl logs `kf.kio.core: Invalid URL: QUrl("")`


EXPECTED RESULT
Dolphin connects successfully or at least aborts and shows a useful error.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250509
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 postix 2025-05-13 13:10:26 UTC
`sftp -i ~/.ssh/id_rsa postix@host` works fine
Comment 2 postix 2025-05-13 13:11:23 UTC
If I try to add a new network folder in the remote section of Dolphin, it keeps saying "Examining" forever and nothing useful is logged.
Comment 3 postix 2025-05-13 13:22:37 UTC
```
> KIO_SFTP_LOG_VERBOSITY=10 KDE_FORK_SLAVES=1 QT_LOGGING_RULES="log_kio_sftp=true;kf.kio.workers.sftp=true;" dolphin --new-window sftp://postix@host
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32483
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: list directory:  QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32490
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: file system free space of QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
```

The following keeps being repeatedly logged once per minute or so:

```
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32607
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: file system free space of QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
```
Comment 4 postix 2025-05-13 13:24:54 UTC
Follow up from the post above:

When I click now with the cursor into the address bar in Dolphin and hit "enter" to (again try to) open the remote directory, kio logs `kf.kio.core: Invalid URL: QUrl("")` as once stated above.
Comment 5 postix 2025-05-13 13:38:12 UTC
For the time being I've worked around it by

`sshfs -o IdentityFile=~/.ssh/id_rsa,default_permissions postix@host:/ /mnt/foo`