Closed nn1ks closed 5 years ago
Getting this too :/
I also have this problem,how do I should to do ? I need a help.
Thanks @mix1009! I added the fix in v0.0.4. Please have a try.
Thanks @mix1009! I added the fix in v0.0.4. Please have a try.
I tried version 0.0.4 and still noticed the same issue
Getting this as well when attempting to start a shell. It also seems that the error handling is throwing a nested error.
D/SshPlugin(11675): Session connected E/SshPlugin(11675): Error starting shell: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-23 D/AndroidRuntime(11675): Shutting down VM E/AndroidRuntime(11675): FATAL EXCEPTION: main E/AndroidRuntime(11675): Process: se.jonsen.unarchive_android, PID: 11675 E/AndroidRuntime(11675): java.lang.IllegalStateException: Reply already submitted E/AndroidRuntime(11675): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:135) E/AndroidRuntime(11675): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230) E/AndroidRuntime(11675): at sq.flutter.ssh.SshPlugin$MethodResultWrapper$2.run(SshPlugin.java:81) E/AndroidRuntime(11675): at android.os.Handler.handleCallback(Handler.java:873) E/AndroidRuntime(11675): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(11675): at android.os.Looper.loop(Looper.java:193) E/AndroidRuntime(11675): at android.app.ActivityThread.main(ActivityThread.java:6898) E/AndroidRuntime(11675): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(11675): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) E/AndroidRuntime(11675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I've got a similar issue when connecting to sftp.
First it break on exception :
PlatformException(unknown_client, Unknown client, null)
at line 569 of decodeEnvelope() of message_codecs.dart
And right after app crashes :
13:48:09.814 18 info flutter.tools I/flutter (29029): PlatformException(unknown_client, Unknown client, null)
13:48:09.824 19 info flutter.tools E/AndroidRuntime(29029): FATAL EXCEPTION: Thread-3
13:48:09.824 21 info flutter.tools E/AndroidRuntime(29029): java.lang.NullPointerException: Attempt to read from field 'com.jcraft.jsch.ChannelSftp sq.flutter.ssh.SshPlugin$SSHClient._sftpSession' on a null object reference
13:48:09.824 22 info flutter.tools E/AndroidRuntime(29029): at sq.flutter.ssh.SshPlugin$14.run(SshPlugin.java:519)
13:48:09.825 23 info flutter.tools E/AndroidRuntime(29029): at java.lang.Thread.run(Thread.java:764)
plugin v0.0.4, Flutter v1.9.1
I've got a similar issue when connecting to sftp.
First it break on exception :
PlatformException(unknown_client, Unknown client, null)
at line 569 of decodeEnvelope() of message_codecs.dartAnd right after app crashes :
13:48:09.814 18 info flutter.tools I/flutter (29029): PlatformException(unknown_client, Unknown client, null) 13:48:09.824 19 info flutter.tools E/AndroidRuntime(29029): FATAL EXCEPTION: Thread-3 13:48:09.824 21 info flutter.tools E/AndroidRuntime(29029): java.lang.NullPointerException: Attempt to read from field 'com.jcraft.jsch.ChannelSftp sq.flutter.ssh.SshPlugin$SSHClient._sftpSession' on a null object reference 13:48:09.824 22 info flutter.tools E/AndroidRuntime(29029): at sq.flutter.ssh.SshPlugin$14.run(SshPlugin.java:519) 13:48:09.825 23 info flutter.tools E/AndroidRuntime(29029): at java.lang.Thread.run(Thread.java:764)
plugin v0.0.4, Flutter v1.9.1
I found out that I need to call client.connect() before client.connectSFTP(). Now it works
This is fixed 0.0.5. Archiving the issue.
Thanks, Qian
Hey @shaqian , I have the same issue as @Nico04 even after upgrading to version 0.0.5 It throws an error whenever it tries to connect on sftp client thanks
i still got the same error: E/AndroidRuntime( 7667): FATAL EXCEPTION: Thread-5 E/AndroidRuntime( 7667): Process: com.example.online_disk, PID: 7667 E/AndroidRuntime( 7667): java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Vector com.jcraft.jsch.ChannelSftp.ls(java.lang.String)' on a null object reference E/AndroidRuntime( 7667): at sq.flutter.ssh.SshPlugin$8.run(SshPlugin.java:433) E/AndroidRuntime( 7667): at java.lang.Thread.run(Thread.java:923) I/Process ( 7667): Sending signal. PID: 7667 SIG: 9 Lost connection to device.
i did call client.connect() before client.connectSFTP()
when trying calling client.sftpLs("/")
, it crashes.
my system config is: Flutter 1.24.0-8.0.pre.373 • channel master • https://github.com/flutter/flutter.git Framework • revision 8de72126e9 (8 hours ago) • 2020-11-26 07:48:03 +0800 Engine • revision 20caf54969 Tools • Dart 2.12.0 (build 2.12.0-76.0.dev)
When using the
.connect()
method the app crashes and throws the following error:This occurred since I updated to Flutter 1.7 On iOS everything is working