postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 837 forks source link

The mqtt connection cannot be disconnected #13141

Open XiaoMing0000 opened 1 week ago

XiaoMing0000 commented 1 week ago

Is there an existing issue for this?

Describe the Issue

The MQTT connection did not disconnect, and the Postman client did not send a DISCONNECT packet.

Steps To Reproduce

  1. Establish an MQTT v5 connection;
  2. Fill in the message content and click the send button;
  3. Click the button to disconnect.

Screenshots or Videos

No response

Operating System

Windows

Postman Version

11.12.0

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

jonathanhaviv commented 1 week ago

@XiaoMing0000 would you be able to share a screen recording of the issue? I'm having a bit of trouble trying to replicate this.

XiaoMing0000 commented 1 week ago

https://github.com/user-attachments/assets/48fcfb06-2ee0-410f-9baf-119c0942c6b1

When the Postman client pushes a message to the server using QoS1 or QoS2, if the server returns an incorrect packetIdentifier to the Postman client, the client is unable to disconnect when the "disconnect" button is clicked. The Postman client should disconnect and throw an exception upon receiving an incorrect packetIdentifier, similar to how mqtt.fx disconnects immediately when receiving an incorrect packetIdentifier.

Another issue is that after the Postman client connects to the server, if I do not click the "disconnect" button and instead click the close tab button 'X' on the current MQTT tab, the connection does not disconnect (this was not shown in the video). The connection only disconnects one by one when I close the Postman client. Normally, shouldn't the connection be cleared when the tab is closed?

jonathanhaviv commented 1 week ago

@XiaoMing0000 Thank you! This additional context was helpful. We'll let you know once we have released a fix for these issues.