~emersion/goguma#111: 
Double "FAIL * ACCOUNT_REQUIRED" from server causes crash

From tcpdump:

C: CAP LS 302
S: :server CAP * LS :account-tag.batch.draft/account-registration=before-connect.draft/channel-rename.draft/chathistory.draft/multiline=max-bytes=8192.echo-message.extended-join.labeled-response.message-tags.sasl=PLAIN.server-time.userhost-in-names
C: NICK.val:e2e.zone
C: USER val:e2e.zone 0 * val:e2e.zone
C: CAP REQ sasl
C: AUTHENTICATE PLAIN <redacted>
C: CAP END
S: :server. CAP * ACK :sasl
S: AUTHENTICATE :+
S: FAIL * ACCOUNT_REQUIRED :You must authenticate
S: FAIL * ACCOUNT_REQUIRED :You must authenticate

(I assume the first fail is because the client bursts commands, and the server does not properly queue them)

This causes Goguma to crash with:

10-24 22:12:38.214 10580 10604 I flutter : [1] Connecting to fdfc:0:0:103::1...
10-24 22:12:38.235 10580 10604 I flutter : [1] Connection opened
10-24 22:12:38.235 10580 10604 I flutter : [1] Starting SASL PLAIN authentication
10-24 22:12:38.839 10580 10604 I flutter : Bad state: Future already completed
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/1" title="~emersion/goguma#1: Enable TCP keepalive">#1</a>      Client._waitMessage.<anonymous closure> (package:goguma/client.dart:309)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/11" title="~emersion/goguma#11: Display events in buffer view">#11</a>     Client._handleMessage (package:goguma/client.dart:540)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/12" title="~emersion/goguma#12: Nick auto-completion in composer">#12</a>     Client.connect.<anonymous closure> (package:goguma/client.dart:221)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/20" title="~emersion/goguma#20: Pin conversations">#20</a>     _StringAdapterSink.add (dart:convert/string_conversion.dart:238)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/21" title="~emersion/goguma#21: Mute conversations">#21</a>     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:170)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/22" title="~emersion/goguma#22: Autocomplete nicks and channels">#22</a>     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:145)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/23" title="~emersion/goguma#23: TCP sockets get stalled">#23</a>     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/32" title="~emersion/goguma#32: Linkify irc:// URLs and channel names">#32</a>     _StringAdapterSink.add (dart:convert/string_conversion.dart:238)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/33" title="~emersion/goguma#33: Add post-connection SASL auth UI">#33</a>     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/34" title="~emersion/goguma#34: Add post-connection registration UI">#34</a>     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:317)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/35" title="~emersion/goguma#35: Handle uncaught exceptions">#35</a>     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/36" title="~emersion/goguma#36: Spawn a foreground service on Android when chathistory is unsupported">#36</a>     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/46" title="~emersion/goguma#46: buffer-details-page: improve user details">#46</a>     _Socket._onData (dart:io-patch/socket_patch.dart:2314)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/55" title="~emersion/goguma#55: Swipe-to-dismiss conversations">#55</a>     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1839)
10-24 22:12:38.843 10580 10604 I flutter : <a href="/~emersion/goguma/56" title="~emersion/goguma#56: Don&#39;t bubble up error on bouncer network removal while offline">#56</a>     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322)
10-24 22:12:38.843 10580 10604 I flutter : (elided 44 frames from dart:async)
Status
RESOLVED CLOSED
Submitter
~vlorentz
Assigned to
No-one
Submitted
3 months ago
Updated
15 days ago
Labels
bug

~emersion REPORTED CLOSED 15 days ago

Fixed in 471dbf1666704a814643505c49acffa4531fb8f8.

Register here or Log in to comment, or comment via email.