Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Show 'Invalid header flag bits, must be 0x0 for connack packet' when connect #1851

Unanswered
ghzjtian asked this question in Q&A
Discussion options

Test Information

  • MQTTJS version: 5.5.3
  • Chrome: Version 124.0.6367.80
  • Frontend Vue version: 3.2.47
  • MQTT broker version: 3.1.1

Issue

When i use mqttjs wss to connect to old broker, it return [ 0x22, 0x02, 0x00, 0x00 ], but the MQTTJS throw error , the message is connection error: Error: Invalid header flag bits, must be 0x0 for connack packet , I know that from 5.0.0, it will check the format of message according to the MQTT Official Document.

I searched online but couldn't find the answer.
I cannot modify this custom MQTT broker either.

So, my question is : how to close the format check logic?

You must be logged in to vote

Replies: 1 comment

Comment options

So, my question is : how to close the format check logic?

The parsing/encoding of mqtt packets are handeld by mqtt-packet, dunno if there is an option to disable this check there, you should check or maybe @mcollina knows

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /