Cyberduck Mountain Duck CLI

#11074 closed defect (fixed)

[cyberduck:ssh] sftp causes NPE

Reported by: umjammer Owned by:
Priority: normal Milestone:
Component: sftp Version: 7.0.1
Severity: normal Keywords: sftp
Cc: Architecture:
Platform: macOS 10.15

Description

i'm developing an application using cyberduck libraries https://github.com/iterate-ch/cyberduck.

■ i got NPE when i used sftp session.

java.lang.NullPointerException
    at net.schmizz.sshj.sftp.RemoteFile$ReadAheadRemoteFileInputStream.retrieveUnconfirmedRead(RemoteFile.java:252)
    at net.schmizz.sshj.sftp.RemoteFile$ReadAheadRemoteFileInputStream.available(RemoteFile.java:331)
    at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:381)
    at vavi.nio.file.Util$SeekableByteChannelForReading.read(Util.java:203)
    at vavi.nio.file.cyberduck.CyberduckFileSystemDriver$6.read(CyberduckFileSystemDriver.java:291)
  • error location is here

https://github.com/umjammer/vavi-nio-file-cyberduck/blob/6c8ba78010086e5593641d3064dab41adff75c2d/src/main/java/vavi/nio/file/cyberduck/CyberduckFileSystemDriver.java#L227-L262

  • program entry point is here

https://github.com/umjammer/vavi-nio-file-cyberduck/blob/6c8ba78010086e5593641d3064dab41adff75c2d/src/test/java/vavi/nio/file/cyberduck/Main2.java

  • my env
ch.cyberduck:ssh:7.0.1
  +- ch.iterate.ssh:sshj:0:22:14
$ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

■ i did

  • update cyberduck version
ch.cyberduck:ssh:7.4.1
  +- ch.iterate.ssh:sshj:0:22:15

failed

  • update sshj
com.hierynomus:sshj:0.29.0

succeeded

but got warning

java.lang.NoSuchMethodError: net.schmizz.sshj.sftp.SFTPEngine.supportsServerExtension(Ljava/lang/String;Ljava/lang/String;)Z
	at ch.cyberduck.core.sftp.SFTPQuotaFeature.isStatVFSOpenSSHSupported(SFTPQuotaFeature.java:122)
	at ch.cyberduck.core.sftp.SFTPQuotaFeature.get(SFTPQuotaFeature.java:55)
	at vavi.nio.file.cyberduck.CyberduckFileStore.getQuota(CyberduckFileStore.java:109)
	at vavi.nio.file.cyberduck.CyberduckFileStore.getTotalSpace(CyberduckFileStore.java:51)
	at vavi.net.fuse.fusejna.JavaNioFileFS.statfs(JavaNioFileFS.java:349)
	at net.fusejna.FuseFilesystem._statfs(FuseFilesystem.java:331)
	at net.fusejna.StructFuseOperations$26.callback(StructFuseOperations.java:287)
	at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520)
	at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)

■ i want you

  • update cyberduck:ssh's sshj library to 0.29.0 compatible

Thanks!

Change History (2)

comment:1 Changed on Sep 14, 2020 at 8:32:59 AM by dkocher

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed on Sep 14, 2020 at 8:35:22 AM by dkocher

The dependency has since been updated in r49669.

Note: See TracTickets for help on using tickets.