Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cyberduck:ssh] sftp causes NPE #11074

Closed
cyberduck opened this issue Jun 17, 2020 · 1 comment
Closed

[cyberduck:ssh] sftp causes NPE #11074

cyberduck opened this issue Jun 17, 2020 · 1 comment

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Jun 17, 2020

b2c635c created the issue

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!

@cyberduck cyberduck closed this Sep 14, 2020
@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 14, 2020

@dkocher commented

The dependency has since been updated in cc78eb0.

Loading

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant