qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Asynchronous Requests Bug #41

Closed tresf closed 9 years ago

tresf commented 9 years ago

Edit: This should be fixed via 1b8c7fe

@robertcasto @bberenz

We're experiencing issues with only the premium customers where the signed requests are causing some intermittent issues.

I suspect that our asynchronous use of signRequest() is the culprit.

This is a pretty major bug as it breaks printing for those who've subscribed.

I think we may be able to solve this by using async: false within our $.ajax calls. Does that sound reasonable, or should we instead queue them up?

In the case of the one client, append64 is getting fired after print despite them being called the the opposite order.

-Tres

akberenz commented 9 years ago

Since signing is not a long process, it might be best have users set the async variable to false. If users still have issues with signing then we can look at a queue system.

tresf commented 9 years ago

Thanks, will address tonight.

Edit: Our bug submitter client tested this change and it fixed the race condition 100% of the time. I am going to change this in the sample.html and contacting all premium customers that have been issued a certificate.

This fix is staged for QZ Tray 1.9.1.