Closed krahulrd closed 3 weeks ago
@krahulrd code 1006
is abnormal and usually the sign of a bug.
What we'd expect as a bare minimum:
What might be insightful:
If it can, great. If it cannot, it will be harder to track down.
Lastly, if the crash occurs with a Premium Support account, we can start an email exchange with the client and offer a screenshare.
@tresf Thanks for the quick turnaround!
Yes, this issue is reproducible here: https://demo.qz.io/#hidContent
Steps to reproduce in the above URL:
Connect
button > List Devices
> Use This
> Claim Device
> Open Stream
.List Devices
> Use Device
> Claim Device
> Open Stream
.
Right after the first click of List Devices, QZ Tray crashes and I see the below error:(index):2988 Error: Connection closed before response received at _qz.websocket.connection.onclose (qz-tray.js:203:72)
After a few seconds, QZ Tray is coming back.
Our application also faces the same issue whenever a user reloads or closes the browser tab and then tries to connect again. As a backup, we have implemented retry mechanisms, but sometimes this is problematic. If QZ Tray completely crashes, the retry mechanism won't work.
Please let me know if any further information is needed.
Our QZ Tray version is 2.2.2 on a Mac device, but this issue occurs regardless of the OS and QZ Tray version.
Our QZ Tray version is 2.2.2 on a Mac device, but this issue occurs regardless of the OS and QZ Tray version.
Hmm... if it's a HARD crash, I would expect the symptoms to vary between OSs, since they use different libraries.
For Mac, we use one called hid4java
, but for Windows, we use one called purejavahidapi
.
If it's a SOFT crash, I would expect it to be rather consistent. I remember in the past we had some listeners to cleanup, maybe we missed one. I'll take a look.
Just a status update, we're still actively investigating the crash on the MacOS side. We'll provide an update here once we're able to narrow it down.
Turns out macOS was a resurfacing of #137, a regression caused by #1177. We should have that patched soon.
This also means that you may revert to QZ Tray 2.2.2 and it should prevent the macOS HID crashes while you await the patch to land (e.g. QZ Tray 2.2.4).
Upstream patch:
Downstream patch:
Ready for testing here:
Wow! Thanks for the update and great turnaround.
Wow! Thanks for the update and great turnaround.
Did it fix it for you? We haven't merged #1267 yet.
Hello Team,
We are integrating QZTray with a weight scale on our website. Currently, we are utilizing the
openStream()
method from hid to fetch the stream of weight data. As per our application requirements, we need to open and close this connection multiple times. However, when we open a new connection, it sometimes emits the close event with code 1006 and throws the error:Error: Connection closed before response received
As customers, we do not have control over this close event. We would like to understand why the connection is closing abruptly only when using the
openStream()
method.Note: The same connection works fine for the
readData()
method.Thank you.