-
Notifications
You must be signed in to change notification settings - Fork 29
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
InvalidHeaderException (Header must be at least 2 bytes long) #38
Comments
OK, when you say 'on connection' do you mean on first connection, i.e. you have not connected before or on subsequent connections after disconnects. If the input buffer is corrupt somehow then it can't be on first connection as its clean, it maybe after this. Are you seeing any other exceptions when in use? |
Hi Steve, Thank you for the response (which definitely helped). You are correct, the issue is on the second or third connection attempt - which leads me to believe that it is a resource disposal/synchronous issue - with good certainty that it is likely on my end. Regards and thanks again, Gawie |
May have fixed this please try version 3.3.5 |
Hi Steve,
Thanks, will give it a go over the weekend.
Regards, Gawie
…On Fri, 27 Jan 2023, 18:22 Steve Hamblett, ***@***.***> wrote:
May have fixed this please try version 3.3.5
—
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2NHRJ5JRWEVGXLNEBN3B3WUPY3XANCNFSM6AAAAAASY6MLTM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Version 3.3.6 released, please check if this fixes the problem. |
Closing, presumed fixed. |
Hello,
I am getting the following error seemingly random - but on connection.
mqtt-client::InvalidHeaderException: The supplied header is invalid. Header must be at least 2 bytes long.
It does not stop the code from working - but obviously leaves one worried to the underlying issue.
Call Stack:
MqttHeader.readFrom (package:mqtt5_client/src/messages/mqtt_header.dart:69:7)
#1 new MqttHeader.fromByteBuffer (package:mqtt5_client/src/messages/mqtt_header.dart:19:5)
#2 MqttByteBuffer.isMessageAvailable (package:mqtt5_client/src/utility/mqtt_byte_buffer.dart:66:29)
#3 MqttServerConnection._onData (package:mqtt5_client/src/connectionhandling/server/mqtt_server_connection.dart:60:26)
#4 _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#5 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#6 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#7 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#8 _StreamController._add (dart:async/stream_controller.dart:648:7)
#9 _StreamController.add (dart:async/stream_controller.dart:596:5)
#10 _Socket._onData (dart:io-patch/socket_patch.dart:2324:41)
#11 _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339: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 new _RawSocket. (dart:io-patch/socket_patch.dart:1849:33)
#18 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322:14)
#19 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#20 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#21 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
#22 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
The text was updated successfully, but these errors were encountered: