Closed mevans closed 5 years ago
Hi mevans,
Did you try to connect the client before connecting SFTP?
String result = await client.connect();
if (result == "session_connected") {
result = await client.connectSFTP();
}
I will add logic in Android to check if client is null before getting session. (iOS already does this)
Thanks for reporting this.
Yeah I've already checked that by copying over a lot of the example project.
Thanks for the reply.
I just published 0.0.2. Can you please test if your app still crashes with the new version? Also does the example project work as expected?
Archiving the issue for now. Feel free to reopen if you have other questions.
App crashes on startup with the error:
E/AndroidRuntime(19915): FATAL EXCEPTION: Thread-2 E/AndroidRuntime(19915): Process: xyz.mevans.ftpclient, PID: 19915 E/AndroidRuntime(19915): java.lang.NullPointerException: Attempt to read from field 'com.jcraft.jsch.Session sq.flutter.ssh.SshPlugin$SSHClient._session' on a null object reference E/AndroidRuntime(19915): at sq.flutter.ssh.SshPlugin$6.run(SshPlugin.java:278) E/AndroidRuntime(19915): at java.lang.Thread.run(Thread.java:764)