shamblett / mqtt5_client

A server and browser based MQTT 5 client for dart
Other
51 stars 29 forks source link

updated from version 2.1.0 to 3.3.3 and getting exception when parsing mqtt incoming messages #37

Closed igala closed 1 year ago

igala commented 1 year ago

E/flutter (18370): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: MqttByteBuffer::clear - attempt to clear a byte buffer where postion is not zero, it is 12 E/flutter (18370): #0 MqttByteBuffer.clear (package:mqtt5_client/src/utility/mqtt_byte_buffer.dart:191:7) E/flutter (18370): #1 MqttServerConnection._onData (package:mqtt5_client/src/connectionhandling/server/mqtt_server_connection.dart:78:23) E/flutter (18370): #2 _rootRunUnary (dart:async/zone.dart:1399:47) E/flutter (18370): #3 _CustomZone.runUnary (dart:async/zone.dart:1300:19) E/flutter (18370): #4 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1209:7) E/flutter (18370): #5 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11) E/flutter (18370): #6 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) E/flutter (18370): #7 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19) E/flutter (18370): #8 _StreamController._add (dart:async/stream_controller.dart:648:7) E/flutter (18370): #9 _StreamController.add (dart:async/stream_controller.dart:596:5) E/flutter (18370): #10 new _WebSocketImpl._fromSocket. (

igala commented 1 year ago

checking with previous versions 3.3.2 and 3.30 behaves pretty much the same

shamblett commented 1 year ago

I don't suppose you have a fuller log do you,? The incoming message in question and what was going on at the time will help me here.

shamblett commented 1 year ago

May have fixed this please try version 3.3.5

shamblett commented 1 year ago

Version 3.3.6 released, please check if this fixes the problem.

shamblett commented 1 year ago

Closing, no further updates so presumed fixed.