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

App crashes on startup #1

Closed
mevans opened this issue Oct 10, 2018 · 4 comments
Closed

App crashes on startup #1

mevans opened this issue Oct 10, 2018 · 4 comments

Comments

@mevans
Copy link

mevans commented Oct 10, 2018

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)

@shaqian
Copy link
Owner

shaqian commented Oct 11, 2018

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.

@mevans
Copy link
Author

mevans commented Oct 14, 2018

Yeah I've already checked that by copying over a lot of the example project.

@shaqian
Copy link
Owner

shaqian commented Oct 14, 2018

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?

@shaqian
Copy link
Owner

shaqian commented Feb 2, 2019

Archiving the issue for now. Feel free to reopen if you have other questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants