Hi everyone,
I’ve been running into a persistent issue with the Printer Extension recently that I just can’t put my finger on, I was able to find what (I think) the issue is but was not able to reproduce yet, basically, this is the issue I’m having:
there are times when the Printer Extension enters into some of sort of loop and keeps printing the same order over and over, so far, what I’ve been able to find is:
- it only happens for some orders sometimes (although recently I think it’s happening more often)
- it might happen that a couple of orders would print just fine, and then an order comes in and enters into a loop
- when this happens what we do to “fix it” is change the status of the order being printed to “pending” (default status is received and the one set to autoprint) and then reload the autoprint page
- the above works fine for a bit until it gets stuck again
I’ve been monitoring this the last two weeks while connected via Anydesk to the computer where the Autoprint page is opened and I was able to get a screenshot of the issue as it happens:
1) Autoprint page is loaded (first time) – I see an error that the autoprint tries to connect to a socket.io url on the printer but regardless of this error, orders are printed
2) order print gets stucked, and it shows an error on the console:
3) same issue with another order, this time I took a screenshot of the “getSales” endpoint response:
4) and once this issue appears, then it gets stuck:
5) I edited the autoprint.js file to add some console.log’s to try to get more info about the issue:
Based on the above I was able to identify two possible issues:
1) it seems that at some point the code tries to either connect or instantiate the printer object but “loses” the ip address and port, see screenshot from 5) where you can see it’s POSTing to the site url instead of the printer ip/port
2) once this happens it enters into some sort of loop trying to either connect to the printer or send the print job to the printer
3) however, even though the console.log says it can’t connect to the printer, the printer somehow is busy printing orders non-stop
The website is running the latest version of TastyIgniter and also the latest version of the Printer Extension, I did made some changes to the autoprint.js but only to add console.log’s to try to find the issue (unsuccessfully though). The printer is an Epson TM-m30.
These are the settings defined on TastyIgniter for this printer:
Connection Tab:
Print settings Tab:
Auto print Tab:
Dockets Tab:
Did anyone run into a similar issue? I’m a bit desperate at this point as I’m unable to find where exactly the issue is.