dartssh2
dartssh2 copied to clipboard
`dartssh` Unhandled exception: Bad state: No element
$ dartssh user@hostname
Unhandled exception:
Bad state: No element
#0 ListQueue.removeFirst (dart:collection/queue.dart:822:25)
#1 SSHClient._authWithNextPublicKey (package:dartssh2/src/ssh_client.dart:827:35)
#2 SSHClient._tryNextAuthMethod (package:dartssh2/src/ssh_client.dart:799:16)
#3 SSHClient._startAuthentication (package:dartssh2/src/ssh_client.dart:771:5)
#4 SSHClient._handleServiceAccept (package:dartssh2/src/ssh_client.dart:501:16)
#5 SSHClient._dispatchMessage (package:dartssh2/src/ssh_client.dart:453:16)
#6 SSHClient._onPacket (package:dartssh2/src/ssh_client.dart:432:7)
#7 SSHTransport._handleMessage (package:dartssh2/src/ssh_transport.dart:639:19)
#8 SSHTransport._processPackets (package:dartssh2/src/ssh_transport.dart:312:7)
#9 SSHTransport._processData (package:dartssh2/src/ssh_transport.dart:257:7)
#10 SSHTransport._onSocketData (package:dartssh2/src/ssh_transport.dart:235:7)
#11 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#13 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#14 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#15 _StreamController._add (dart:async/stream_controller.dart:648:7)
#16 _StreamController.add (dart:async/stream_controller.dart:596:5)
#17 _Socket._onData (dart:io-patch/socket_patch.dart:2314:41)
#18 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#19 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#20 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#21 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#22 _StreamController._add (dart:async/stream_controller.dart:648:7)
#23 _StreamController.add (dart:async/stream_controller.dart:596:5)
#24 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1839:33)
#25 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322:14)
#26 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#27 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#28 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
#29 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
Server version: OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Thanks for the report. This has been fixed in dartssh2 2.6.0.
Update:
$ dart pub global list
dartssh2 2.6.0
...
$ dartssh user@host
Password:
Unhandled exception:
SSHAuthFailError(All authentication methods failed)
#0 SSHClient._tryNextAuthMethod (package:dartssh2/src/ssh_client.dart:805:20)
#1 SSHClient._handleUserauthFailure (package:dartssh2/src/ssh_client.dart:537:5)
#2 SSHClient._dispatchMessage (package:dartssh2/src/ssh_client.dart:476:16)
#3 SSHClient._onPacket (package:dartssh2/src/ssh_client.dart:451:7)
#4 SSHTransport._handleMessage (package:dartssh2/src/ssh_transport.dart:644:19)
#5 SSHTransport._processPackets (package:dartssh2/src/ssh_transport.dart:317:7)
#6 SSHTransport._processData (package:dartssh2/src/ssh_transport.dart:259:7)
#7 SSHTransport._onSocketData (package:dartssh2/src/ssh_transport.dart:237:7)
#8 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#9 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#10 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#11 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#12 _StreamController._add (dart:async/stream_controller.dart:648:7)
#13 _StreamController.add (dart:async/stream_controller.dart:596:5)
#14 _Socket._onData (dart:io-patch/socket_patch.dart:2314:41)
#15 _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#16 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#17 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#18 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#19 _StreamController._add (dart:async/stream_controller.dart:648:7)
#20 _StreamController.add (dart:async/stream_controller.dart:596:5)
#21 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1839:33)
#22 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322:14)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)