firebug / websocket-monitor

Not compatible with Firefox Quantum (57 and newer)
Other
145 stars 24 forks source link

Support MQTT Protocol #57

Closed eliihen closed 8 years ago

eliihen commented 8 years ago

Thanks to the great work by @tuukka, we should now have working MQTT parsing. Hooray!

Closes #56

janodvarko commented 8 years ago

This is great!

I am seeing one problem: 1) Load http://www.hivemq.com/demos/websocket-client/ 2) Click the "Connect" button 3) Select the first sent packet 4) Check out the Payload side panel tab, the content isn't properly encoded ->.BUG

But, the inline preview works fine.

Honza

eliihen commented 8 years ago

@janodvarko

Shoot, yeah, I totally forgot about that. Try now - the payload tab now shows the parsed MQTT payload, and I also added an MQTT tab for good measure.

janodvarko commented 8 years ago

Works for me now, thanks!

Honza

janodvarko commented 8 years ago

Ah, yet one problem, the 'payload property isn't encoded in the Details tab.

Honza

janodvarko commented 8 years ago

Also, I am seeing: Console Service ERROR [JavaScript Error: "TypeError: data.payload is null" {file: "resource://websocketmonitor-at-getfirebug-dot-com/data/components/frame-list.js" line: 139}]

Honza

eliihen commented 8 years ago

@janodvarko

I pushed https://github.com/firebug/websocket-monitor/commit/a0f488bf3fa046e7db11cdbd7d4206c122534e54 and https://github.com/firebug/websocket-monitor/commit/ce16ba959b20e166610251add780eca79fb1f355 to master (if that is cool with you) adressing these issues.

janodvarko commented 8 years ago

@esphen Thanks for quick response!

I pushed a0f488b and ce16ba9 to master (if that is cool with you) adressing these issues.

Yes (I wanted to suggest that before)

And the error is gone...

But, I realized that seeing the encoded data in (a) the Payload tab and (b) the "Payload" field in the Details tab was actually correct - it's binary data as I understand now (in e.g. socket.io it's just plain text). These places display the entire 'ws frame payload' and we have MQTT tab for displaying MQTT payload now. This is how it works for all the other protocols too.

So, I pushed https://github.com/firebug/websocket-monitor/commit/da1ac851839d235f88a8220a66d629cadda64595

What do you think?

Honza

eliihen commented 8 years ago

@janodvarko

Yeah, that looks fine by me. The MQTT payload is visible in both the inline preview and the MQTT panel, so we're not losing that in any way. Might as well stay consistent with the other protocols, as you suggest.